From 8b9fca043a50b1a6ccbaed012a07f572229835d9 Mon Sep 17 00:00:00 2001 From: dominoxp Date: Fri, 23 Jan 2026 00:30:37 +0100 Subject: [PATCH] Init --- PKG-INFO | 18 + README.md | 847 + setup.cfg | 4 + setup.py | 46 + swagger_client.egg-info/PKG-INFO | 18 + swagger_client.egg-info/SOURCES.txt | 470 + swagger_client.egg-info/dependency_links.txt | 1 + swagger_client.egg-info/requires.txt | 4 + swagger_client.egg-info/top_level.txt | 2 + swagger_client/__init__.py | 251 + swagger_client/api/__init__.py | 15 + swagger_client/api/activitypub_api.py | 228 + swagger_client/api/admin_api.py | 3226 +++ swagger_client/api/issue_api.py | 8211 ++++++ swagger_client/api/miscellaneous_api.py | 1231 + swagger_client/api/notification_api.py | 803 + swagger_client/api/organization_api.py | 6942 +++++ swagger_client/api/package_api.py | 978 + swagger_client/api/repository_api.py | 21800 ++++++++++++++++ swagger_client/api/settings_api.py | 390 + swagger_client/api/user_api.py | 7506 ++++++ swagger_client/api_client.py | 639 + swagger_client/configuration.py | 300 + swagger_client/models/__init__.py | 235 + swagger_client/models/access_token.py | 293 + swagger_client/models/action_artifact.py | 357 + .../models/action_artifacts_response.py | 149 + swagger_client/models/action_runner.py | 253 + swagger_client/models/action_runner_label.py | 175 + .../models/action_runners_response.py | 149 + swagger_client/models/action_task.py | 455 + swagger_client/models/action_task_response.py | 153 + swagger_client/models/action_variable.py | 237 + swagger_client/models/action_workflow.py | 371 + swagger_client/models/action_workflow_job.py | 565 + .../models/action_workflow_jobs_response.py | 149 + .../models/action_workflow_response.py | 149 + swagger_client/models/action_workflow_run.py | 591 + .../models/action_workflow_runs_response.py | 149 + swagger_client/models/action_workflow_step.py | 253 + swagger_client/models/activity.py | 462 + swagger_client/models/activity_pub.py | 125 + .../models/add_collaborator_option.py | 130 + swagger_client/models/add_time_option.py | 180 + swagger_client/models/annotated_tag.py | 287 + swagger_client/models/annotated_tag_object.py | 181 + swagger_client/models/api_error.py | 153 + .../models/apply_diff_patch_file_options.py | 314 + swagger_client/models/attachment.py | 291 + swagger_client/models/badge.py | 201 + swagger_client/models/branch.py | 347 + swagger_client/models/branch_protection.py | 961 + .../models/change_file_operation.py | 246 + swagger_client/models/change_files_options.py | 316 + swagger_client/models/changed_file.py | 349 + swagger_client/models/combined_status.py | 298 + swagger_client/models/comment.py | 399 + swagger_client/models/commit.py | 367 + .../models/commit_affected_files.py | 153 + swagger_client/models/commit_date_options.py | 149 + swagger_client/models/commit_meta.py | 179 + swagger_client/models/commit_stats.py | 181 + swagger_client/models/commit_status.py | 350 + swagger_client/models/commit_user.py | 179 + swagger_client/models/compare.py | 149 + .../models/contents_ext_response.py | 151 + swagger_client/models/contents_response.py | 651 + .../models/create_access_token_option.py | 150 + .../models/create_action_workflow_dispatch.py | 150 + .../models/create_branch_protection_option.py | 905 + .../models/create_branch_repo_option.py | 182 + swagger_client/models/create_email_option.py | 125 + swagger_client/models/create_file_options.py | 316 + swagger_client/models/create_fork_option.py | 153 + .../models/create_gpg_key_option.py | 154 + swagger_client/models/create_hook_option.py | 268 + .../models/create_hook_option_config.py | 95 + .../models/create_issue_comment_option.py | 124 + swagger_client/models/create_issue_option.py | 338 + swagger_client/models/create_key_option.py | 183 + swagger_client/models/create_label_option.py | 231 + .../models/create_milestone_option.py | 212 + .../create_o_auth2_application_options.py | 209 + .../models/create_or_update_secret_option.py | 154 + swagger_client/models/create_org_option.py | 329 + .../models/create_pull_request_option.py | 403 + .../models/create_pull_review_comment.py | 207 + .../models/create_pull_review_options.py | 201 + .../models/create_push_mirror_option.py | 237 + .../models/create_release_option.py | 292 + swagger_client/models/create_repo_option.py | 448 + swagger_client/models/create_status_option.py | 216 + swagger_client/models/create_tag_option.py | 180 + .../models/create_tag_protection_option.py | 181 + swagger_client/models/create_team_option.py | 293 + swagger_client/models/create_user_option.py | 405 + .../models/create_variable_option.py | 154 + .../models/create_wiki_page_options.py | 181 + swagger_client/models/cron.py | 237 + swagger_client/models/delete_email_option.py | 125 + swagger_client/models/delete_file_options.py | 316 + swagger_client/models/deploy_key.py | 345 + .../models/dismiss_pull_review_options.py | 149 + .../models/edit_attachment_options.py | 125 + .../models/edit_branch_protection_option.py | 851 + swagger_client/models/edit_deadline_option.py | 124 + swagger_client/models/edit_git_hook_option.py | 125 + swagger_client/models/edit_hook_option.py | 237 + .../models/edit_issue_comment_option.py | 124 + swagger_client/models/edit_issue_option.py | 333 + swagger_client/models/edit_label_option.py | 231 + .../models/edit_milestone_option.py | 209 + swagger_client/models/edit_org_option.py | 300 + .../models/edit_pull_request_option.py | 403 + swagger_client/models/edit_reaction_option.py | 125 + swagger_client/models/edit_release_option.py | 265 + swagger_client/models/edit_repo_option.py | 1015 + .../models/edit_tag_protection_option.py | 181 + swagger_client/models/edit_team_option.py | 293 + swagger_client/models/edit_user_option.py | 599 + swagger_client/models/email.py | 235 + swagger_client/models/external_tracker.py | 209 + swagger_client/models/external_wiki.py | 125 + swagger_client/models/file_commit_response.py | 341 + swagger_client/models/file_delete_response.py | 177 + swagger_client/models/file_links_response.py | 181 + swagger_client/models/file_response.py | 175 + swagger_client/models/files_response.py | 177 + swagger_client/models/general_api_settings.py | 237 + .../models/general_attachment_settings.py | 209 + .../models/general_repo_settings.py | 265 + swagger_client/models/general_ui_settings.py | 181 + swagger_client/models/generate_repo_option.py | 433 + swagger_client/models/get_files_options.py | 125 + swagger_client/models/git_blob_response.py | 293 + swagger_client/models/git_entry.py | 265 + swagger_client/models/git_hook.py | 181 + swagger_client/models/git_object.py | 181 + swagger_client/models/git_tree_response.py | 265 + .../models/gitignore_template_info.py | 153 + swagger_client/models/gpg_key.py | 457 + swagger_client/models/gpg_key_email.py | 153 + swagger_client/models/hook.py | 345 + swagger_client/models/identity.py | 151 + swagger_client/models/inline_response200.py | 149 + swagger_client/models/inline_response2001.py | 149 + swagger_client/models/internal_tracker.py | 181 + swagger_client/models/issue.py | 773 + swagger_client/models/issue_config.py | 149 + .../models/issue_config_contact_link.py | 175 + .../models/issue_config_validation.py | 149 + swagger_client/models/issue_deadline.py | 123 + swagger_client/models/issue_form_field.py | 227 + .../models/issue_form_field_type.py | 95 + .../models/issue_form_field_visible.py | 95 + swagger_client/models/issue_labels_option.py | 125 + swagger_client/models/issue_meta.py | 177 + swagger_client/models/issue_template.py | 331 + .../models/issue_template_string_slice.py | 95 + swagger_client/models/label.py | 287 + swagger_client/models/label_template.py | 205 + .../models/license_template_info.py | 237 + .../models/licenses_template_list_entry.py | 181 + swagger_client/models/lock_issue_option.py | 123 + swagger_client/models/markdown_option.py | 209 + swagger_client/models/markup_option.py | 237 + .../models/merge_pull_request_option.py | 313 + .../models/merge_upstream_request.py | 149 + .../models/merge_upstream_response.py | 123 + swagger_client/models/migrate_repo_options.py | 682 + swagger_client/models/milestone.py | 367 + .../models/new_issue_pins_allowed.py | 149 + swagger_client/models/node_info.py | 287 + swagger_client/models/node_info_services.py | 153 + swagger_client/models/node_info_software.py | 209 + swagger_client/models/node_info_usage.py | 179 + .../models/node_info_usage_users.py | 181 + swagger_client/models/note.py | 151 + swagger_client/models/notification_count.py | 125 + swagger_client/models/notification_subject.py | 289 + swagger_client/models/notification_thread.py | 289 + swagger_client/models/notify_subject_type.py | 95 + swagger_client/models/o_auth2_application.py | 321 + swagger_client/models/organization.py | 405 + .../models/organization_permissions.py | 237 + swagger_client/models/package.py | 341 + swagger_client/models/package_file.py | 293 + swagger_client/models/payload_commit.py | 369 + .../models/payload_commit_verification.py | 235 + swagger_client/models/payload_user.py | 179 + swagger_client/models/permission.py | 175 + swagger_client/models/pr_branch_info.py | 235 + swagger_client/models/public_key.py | 373 + swagger_client/models/pull_request.py | 1109 + swagger_client/models/pull_request_meta.py | 201 + swagger_client/models/pull_review.py | 465 + swagger_client/models/pull_review_comment.py | 487 + .../models/pull_review_request_options.py | 149 + swagger_client/models/push_mirror.py | 317 + swagger_client/models/reaction.py | 177 + swagger_client/models/reference.py | 179 + swagger_client/models/release.py | 539 + .../models/rename_branch_repo_option.py | 126 + swagger_client/models/rename_org_option.py | 126 + swagger_client/models/rename_user_option.py | 126 + .../models/repo_collaborator_permission.py | 179 + swagger_client/models/repo_commit.py | 257 + swagger_client/models/repo_topic_options.py | 125 + swagger_client/models/repo_transfer.py | 175 + swagger_client/models/repository.py | 1796 ++ swagger_client/models/repository_meta.py | 201 + swagger_client/models/review_state_type.py | 95 + swagger_client/models/search_results.py | 153 + swagger_client/models/secret.py | 179 + swagger_client/models/server_version.py | 125 + swagger_client/models/state_type.py | 95 + swagger_client/models/stop_watch.py | 291 + .../models/submit_pull_review_options.py | 149 + swagger_client/models/tag.py | 263 + swagger_client/models/tag_protection.py | 261 + swagger_client/models/team.py | 348 + swagger_client/models/time_stamp.py | 95 + swagger_client/models/timeline_comment.py | 867 + swagger_client/models/topic_name.py | 125 + swagger_client/models/topic_response.py | 237 + swagger_client/models/tracked_time.py | 289 + swagger_client/models/transfer_repo_option.py | 152 + .../update_branch_protection_priories.py | 123 + swagger_client/models/update_file_options.py | 373 + .../models/update_repo_avatar_option.py | 125 + .../models/update_user_avatar_option.py | 125 + .../models/update_variable_option.py | 182 + swagger_client/models/user.py | 703 + swagger_client/models/user_badge_option.py | 123 + swagger_client/models/user_heatmap_data.py | 149 + swagger_client/models/user_settings.py | 333 + .../models/user_settings_options.py | 333 + swagger_client/models/watch_info.py | 265 + swagger_client/models/wiki_commit.py | 205 + swagger_client/models/wiki_commit_list.py | 153 + swagger_client/models/wiki_page.py | 319 + swagger_client/models/wiki_page_meta_data.py | 207 + swagger_client/rest.py | 323 + test/__init__.py | 1 + test/test_access_token.py | 40 + test/test_action_artifact.py | 40 + test/test_action_artifacts_response.py | 40 + test/test_action_runner.py | 40 + test/test_action_runner_label.py | 40 + test/test_action_runners_response.py | 40 + test/test_action_task.py | 40 + test/test_action_task_response.py | 40 + test/test_action_variable.py | 40 + test/test_action_workflow.py | 40 + test/test_action_workflow_job.py | 40 + test/test_action_workflow_jobs_response.py | 40 + test/test_action_workflow_response.py | 40 + test/test_action_workflow_run.py | 40 + test/test_action_workflow_runs_response.py | 40 + test/test_action_workflow_step.py | 40 + test/test_activity.py | 40 + test/test_activity_pub.py | 40 + test/test_activitypub_api.py | 48 + test/test_add_collaborator_option.py | 40 + test/test_add_time_option.py | 40 + test/test_admin_api.py | 258 + test/test_annotated_tag.py | 40 + test/test_annotated_tag_object.py | 40 + test/test_api_error.py | 40 + test/test_apply_diff_patch_file_options.py | 40 + test/test_attachment.py | 40 + test/test_badge.py | 40 + test/test_branch.py | 40 + test/test_branch_protection.py | 40 + test/test_change_file_operation.py | 40 + test/test_change_files_options.py | 40 + test/test_changed_file.py | 40 + test/test_combined_status.py | 40 + test/test_comment.py | 40 + test/test_commit.py | 40 + test/test_commit_affected_files.py | 40 + test/test_commit_date_options.py | 40 + test/test_commit_meta.py | 40 + test/test_commit_stats.py | 40 + test/test_commit_status.py | 40 + test/test_commit_user.py | 40 + test/test_compare.py | 40 + test/test_contents_ext_response.py | 40 + test/test_contents_response.py | 40 + test/test_create_access_token_option.py | 40 + test/test_create_action_workflow_dispatch.py | 40 + test/test_create_branch_protection_option.py | 40 + test/test_create_branch_repo_option.py | 40 + test/test_create_email_option.py | 40 + test/test_create_file_options.py | 40 + test/test_create_fork_option.py | 40 + test/test_create_gpg_key_option.py | 40 + test/test_create_hook_option.py | 40 + test/test_create_hook_option_config.py | 40 + test/test_create_issue_comment_option.py | 40 + test/test_create_issue_option.py | 40 + test/test_create_key_option.py | 40 + test/test_create_label_option.py | 40 + test/test_create_milestone_option.py | 40 + ...test_create_o_auth2_application_options.py | 40 + test/test_create_or_update_secret_option.py | 40 + test/test_create_org_option.py | 40 + test/test_create_pull_request_option.py | 40 + test/test_create_pull_review_comment.py | 40 + test/test_create_pull_review_options.py | 40 + test/test_create_push_mirror_option.py | 40 + test/test_create_release_option.py | 40 + test/test_create_repo_option.py | 40 + test/test_create_status_option.py | 40 + test/test_create_tag_option.py | 40 + test/test_create_tag_protection_option.py | 40 + test/test_create_team_option.py | 40 + test/test_create_user_option.py | 40 + test/test_create_variable_option.py | 40 + test/test_create_wiki_page_options.py | 40 + test/test_cron.py | 40 + test/test_delete_email_option.py | 40 + test/test_delete_file_options.py | 40 + test/test_deploy_key.py | 40 + test/test_dismiss_pull_review_options.py | 40 + test/test_edit_attachment_options.py | 40 + test/test_edit_branch_protection_option.py | 40 + test/test_edit_deadline_option.py | 40 + test/test_edit_git_hook_option.py | 40 + test/test_edit_hook_option.py | 40 + test/test_edit_issue_comment_option.py | 40 + test/test_edit_issue_option.py | 40 + test/test_edit_label_option.py | 40 + test/test_edit_milestone_option.py | 40 + test/test_edit_org_option.py | 40 + test/test_edit_pull_request_option.py | 40 + test/test_edit_reaction_option.py | 40 + test/test_edit_release_option.py | 40 + test/test_edit_repo_option.py | 40 + test/test_edit_tag_protection_option.py | 40 + test/test_edit_team_option.py | 40 + test/test_edit_user_option.py | 40 + test/test_email.py | 40 + test/test_external_tracker.py | 40 + test/test_external_wiki.py | 40 + test/test_file_commit_response.py | 40 + test/test_file_delete_response.py | 40 + test/test_file_links_response.py | 40 + test/test_file_response.py | 40 + test/test_files_response.py | 40 + test/test_general_api_settings.py | 40 + test/test_general_attachment_settings.py | 40 + test/test_general_repo_settings.py | 40 + test/test_general_ui_settings.py | 40 + test/test_generate_repo_option.py | 40 + test/test_get_files_options.py | 40 + test/test_git_blob_response.py | 40 + test/test_git_entry.py | 40 + test/test_git_hook.py | 40 + test/test_git_object.py | 40 + test/test_git_tree_response.py | 40 + test/test_gitignore_template_info.py | 40 + test/test_gpg_key.py | 40 + test/test_gpg_key_email.py | 40 + test/test_hook.py | 40 + test/test_identity.py | 40 + test/test_inline_response200.py | 40 + test/test_inline_response2001.py | 40 + test/test_internal_tracker.py | 40 + test/test_issue.py | 40 + test/test_issue_api.py | 517 + test/test_issue_config.py | 40 + test/test_issue_config_contact_link.py | 40 + test/test_issue_config_validation.py | 40 + test/test_issue_deadline.py | 40 + test/test_issue_form_field.py | 40 + test/test_issue_form_field_type.py | 40 + test/test_issue_form_field_visible.py | 40 + test/test_issue_labels_option.py | 40 + test/test_issue_meta.py | 40 + test/test_issue_template.py | 40 + test/test_issue_template_string_slice.py | 40 + test/test_label.py | 40 + test/test_label_template.py | 40 + test/test_license_template_info.py | 40 + test/test_licenses_template_list_entry.py | 40 + test/test_lock_issue_option.py | 40 + test/test_markdown_option.py | 40 + test/test_markup_option.py | 40 + test/test_merge_pull_request_option.py | 40 + test/test_merge_upstream_request.py | 40 + test/test_merge_upstream_response.py | 40 + test/test_migrate_repo_options.py | 40 + test/test_milestone.py | 40 + test/test_miscellaneous_api.py | 125 + test/test_new_issue_pins_allowed.py | 40 + test/test_node_info.py | 40 + test/test_node_info_services.py | 40 + test/test_node_info_software.py | 40 + test/test_node_info_usage.py | 40 + test/test_node_info_usage_users.py | 40 + test/test_note.py | 40 + test/test_notification_api.py | 83 + test/test_notification_count.py | 40 + test/test_notification_subject.py | 40 + test/test_notification_thread.py | 40 + test/test_notify_subject_type.py | 40 + test/test_o_auth2_application.py | 40 + test/test_organization.py | 40 + test/test_organization_api.py | 496 + test/test_organization_permissions.py | 40 + test/test_package.py | 40 + test/test_package_api.py | 90 + test/test_package_file.py | 40 + test/test_payload_commit.py | 40 + test/test_payload_commit_verification.py | 40 + test/test_payload_user.py | 40 + test/test_permission.py | 40 + test/test_pr_branch_info.py | 40 + test/test_public_key.py | 40 + test/test_pull_request.py | 40 + test/test_pull_request_meta.py | 40 + test/test_pull_review.py | 40 + test/test_pull_review_comment.py | 40 + test/test_pull_review_request_options.py | 40 + test/test_push_mirror.py | 40 + test/test_reaction.py | 40 + test/test_reference.py | 40 + test/test_release.py | 40 + test/test_rename_branch_repo_option.py | 40 + test/test_rename_org_option.py | 40 + test/test_rename_user_option.py | 40 + test/test_repo_collaborator_permission.py | 40 + test/test_repo_commit.py | 40 + test/test_repo_topic_options.py | 40 + test/test_repo_transfer.py | 40 + test/test_repository.py | 40 + test/test_repository_api.py | 1371 + test/test_repository_meta.py | 40 + test/test_review_state_type.py | 40 + test/test_search_results.py | 40 + test/test_secret.py | 40 + test/test_server_version.py | 40 + test/test_settings_api.py | 62 + test/test_state_type.py | 40 + test/test_stop_watch.py | 40 + test/test_submit_pull_review_options.py | 40 + test/test_tag.py | 40 + test/test_tag_protection.py | 40 + test/test_team.py | 40 + test/test_time_stamp.py | 40 + test/test_timeline_comment.py | 40 + test/test_topic_name.py | 40 + test/test_topic_response.py | 40 + test/test_tracked_time.py | 40 + test/test_transfer_repo_option.py | 40 + .../test_update_branch_protection_priories.py | 40 + test/test_update_file_options.py | 40 + test/test_update_repo_avatar_option.py | 40 + test/test_update_user_avatar_option.py | 40 + test/test_update_variable_option.py | 40 + test/test_user.py | 40 + test/test_user_api.py | 566 + test/test_user_badge_option.py | 40 + test/test_user_heatmap_data.py | 40 + test/test_user_settings.py | 40 + test/test_user_settings_options.py | 40 + test/test_watch_info.py | 40 + test/test_wiki_commit.py | 40 + test/test_wiki_commit_list.py | 40 + test/test_wiki_page.py | 40 + test/test_wiki_page_meta_data.py | 40 + 472 files changed, 124476 insertions(+) create mode 100644 PKG-INFO create mode 100644 README.md create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 swagger_client.egg-info/PKG-INFO create mode 100644 swagger_client.egg-info/SOURCES.txt create mode 100644 swagger_client.egg-info/dependency_links.txt create mode 100644 swagger_client.egg-info/requires.txt create mode 100644 swagger_client.egg-info/top_level.txt create mode 100644 swagger_client/__init__.py create mode 100644 swagger_client/api/__init__.py create mode 100644 swagger_client/api/activitypub_api.py create mode 100644 swagger_client/api/admin_api.py create mode 100644 swagger_client/api/issue_api.py create mode 100644 swagger_client/api/miscellaneous_api.py create mode 100644 swagger_client/api/notification_api.py create mode 100644 swagger_client/api/organization_api.py create mode 100644 swagger_client/api/package_api.py create mode 100644 swagger_client/api/repository_api.py create mode 100644 swagger_client/api/settings_api.py create mode 100644 swagger_client/api/user_api.py create mode 100644 swagger_client/api_client.py create mode 100644 swagger_client/configuration.py create mode 100644 swagger_client/models/__init__.py create mode 100644 swagger_client/models/access_token.py create mode 100644 swagger_client/models/action_artifact.py create mode 100644 swagger_client/models/action_artifacts_response.py create mode 100644 swagger_client/models/action_runner.py create mode 100644 swagger_client/models/action_runner_label.py create mode 100644 swagger_client/models/action_runners_response.py create mode 100644 swagger_client/models/action_task.py create mode 100644 swagger_client/models/action_task_response.py create mode 100644 swagger_client/models/action_variable.py create mode 100644 swagger_client/models/action_workflow.py create mode 100644 swagger_client/models/action_workflow_job.py create mode 100644 swagger_client/models/action_workflow_jobs_response.py create mode 100644 swagger_client/models/action_workflow_response.py create mode 100644 swagger_client/models/action_workflow_run.py create mode 100644 swagger_client/models/action_workflow_runs_response.py create mode 100644 swagger_client/models/action_workflow_step.py create mode 100644 swagger_client/models/activity.py create mode 100644 swagger_client/models/activity_pub.py create mode 100644 swagger_client/models/add_collaborator_option.py create mode 100644 swagger_client/models/add_time_option.py create mode 100644 swagger_client/models/annotated_tag.py create mode 100644 swagger_client/models/annotated_tag_object.py create mode 100644 swagger_client/models/api_error.py create mode 100644 swagger_client/models/apply_diff_patch_file_options.py create mode 100644 swagger_client/models/attachment.py create mode 100644 swagger_client/models/badge.py create mode 100644 swagger_client/models/branch.py create mode 100644 swagger_client/models/branch_protection.py create mode 100644 swagger_client/models/change_file_operation.py create mode 100644 swagger_client/models/change_files_options.py create mode 100644 swagger_client/models/changed_file.py create mode 100644 swagger_client/models/combined_status.py create mode 100644 swagger_client/models/comment.py create mode 100644 swagger_client/models/commit.py create mode 100644 swagger_client/models/commit_affected_files.py create mode 100644 swagger_client/models/commit_date_options.py create mode 100644 swagger_client/models/commit_meta.py create mode 100644 swagger_client/models/commit_stats.py create mode 100644 swagger_client/models/commit_status.py create mode 100644 swagger_client/models/commit_user.py create mode 100644 swagger_client/models/compare.py create mode 100644 swagger_client/models/contents_ext_response.py create mode 100644 swagger_client/models/contents_response.py create mode 100644 swagger_client/models/create_access_token_option.py create mode 100644 swagger_client/models/create_action_workflow_dispatch.py create mode 100644 swagger_client/models/create_branch_protection_option.py create mode 100644 swagger_client/models/create_branch_repo_option.py create mode 100644 swagger_client/models/create_email_option.py create mode 100644 swagger_client/models/create_file_options.py create mode 100644 swagger_client/models/create_fork_option.py create mode 100644 swagger_client/models/create_gpg_key_option.py create mode 100644 swagger_client/models/create_hook_option.py create mode 100644 swagger_client/models/create_hook_option_config.py create mode 100644 swagger_client/models/create_issue_comment_option.py create mode 100644 swagger_client/models/create_issue_option.py create mode 100644 swagger_client/models/create_key_option.py create mode 100644 swagger_client/models/create_label_option.py create mode 100644 swagger_client/models/create_milestone_option.py create mode 100644 swagger_client/models/create_o_auth2_application_options.py create mode 100644 swagger_client/models/create_or_update_secret_option.py create mode 100644 swagger_client/models/create_org_option.py create mode 100644 swagger_client/models/create_pull_request_option.py create mode 100644 swagger_client/models/create_pull_review_comment.py create mode 100644 swagger_client/models/create_pull_review_options.py create mode 100644 swagger_client/models/create_push_mirror_option.py create mode 100644 swagger_client/models/create_release_option.py create mode 100644 swagger_client/models/create_repo_option.py create mode 100644 swagger_client/models/create_status_option.py create mode 100644 swagger_client/models/create_tag_option.py create mode 100644 swagger_client/models/create_tag_protection_option.py create mode 100644 swagger_client/models/create_team_option.py create mode 100644 swagger_client/models/create_user_option.py create mode 100644 swagger_client/models/create_variable_option.py create mode 100644 swagger_client/models/create_wiki_page_options.py create mode 100644 swagger_client/models/cron.py create mode 100644 swagger_client/models/delete_email_option.py create mode 100644 swagger_client/models/delete_file_options.py create mode 100644 swagger_client/models/deploy_key.py create mode 100644 swagger_client/models/dismiss_pull_review_options.py create mode 100644 swagger_client/models/edit_attachment_options.py create mode 100644 swagger_client/models/edit_branch_protection_option.py create mode 100644 swagger_client/models/edit_deadline_option.py create mode 100644 swagger_client/models/edit_git_hook_option.py create mode 100644 swagger_client/models/edit_hook_option.py create mode 100644 swagger_client/models/edit_issue_comment_option.py create mode 100644 swagger_client/models/edit_issue_option.py create mode 100644 swagger_client/models/edit_label_option.py create mode 100644 swagger_client/models/edit_milestone_option.py create mode 100644 swagger_client/models/edit_org_option.py create mode 100644 swagger_client/models/edit_pull_request_option.py create mode 100644 swagger_client/models/edit_reaction_option.py create mode 100644 swagger_client/models/edit_release_option.py create mode 100644 swagger_client/models/edit_repo_option.py create mode 100644 swagger_client/models/edit_tag_protection_option.py create mode 100644 swagger_client/models/edit_team_option.py create mode 100644 swagger_client/models/edit_user_option.py create mode 100644 swagger_client/models/email.py create mode 100644 swagger_client/models/external_tracker.py create mode 100644 swagger_client/models/external_wiki.py create mode 100644 swagger_client/models/file_commit_response.py create mode 100644 swagger_client/models/file_delete_response.py create mode 100644 swagger_client/models/file_links_response.py create mode 100644 swagger_client/models/file_response.py create mode 100644 swagger_client/models/files_response.py create mode 100644 swagger_client/models/general_api_settings.py create mode 100644 swagger_client/models/general_attachment_settings.py create mode 100644 swagger_client/models/general_repo_settings.py create mode 100644 swagger_client/models/general_ui_settings.py create mode 100644 swagger_client/models/generate_repo_option.py create mode 100644 swagger_client/models/get_files_options.py create mode 100644 swagger_client/models/git_blob_response.py create mode 100644 swagger_client/models/git_entry.py create mode 100644 swagger_client/models/git_hook.py create mode 100644 swagger_client/models/git_object.py create mode 100644 swagger_client/models/git_tree_response.py create mode 100644 swagger_client/models/gitignore_template_info.py create mode 100644 swagger_client/models/gpg_key.py create mode 100644 swagger_client/models/gpg_key_email.py create mode 100644 swagger_client/models/hook.py create mode 100644 swagger_client/models/identity.py create mode 100644 swagger_client/models/inline_response200.py create mode 100644 swagger_client/models/inline_response2001.py create mode 100644 swagger_client/models/internal_tracker.py create mode 100644 swagger_client/models/issue.py create mode 100644 swagger_client/models/issue_config.py create mode 100644 swagger_client/models/issue_config_contact_link.py create mode 100644 swagger_client/models/issue_config_validation.py create mode 100644 swagger_client/models/issue_deadline.py create mode 100644 swagger_client/models/issue_form_field.py create mode 100644 swagger_client/models/issue_form_field_type.py create mode 100644 swagger_client/models/issue_form_field_visible.py create mode 100644 swagger_client/models/issue_labels_option.py create mode 100644 swagger_client/models/issue_meta.py create mode 100644 swagger_client/models/issue_template.py create mode 100644 swagger_client/models/issue_template_string_slice.py create mode 100644 swagger_client/models/label.py create mode 100644 swagger_client/models/label_template.py create mode 100644 swagger_client/models/license_template_info.py create mode 100644 swagger_client/models/licenses_template_list_entry.py create mode 100644 swagger_client/models/lock_issue_option.py create mode 100644 swagger_client/models/markdown_option.py create mode 100644 swagger_client/models/markup_option.py create mode 100644 swagger_client/models/merge_pull_request_option.py create mode 100644 swagger_client/models/merge_upstream_request.py create mode 100644 swagger_client/models/merge_upstream_response.py create mode 100644 swagger_client/models/migrate_repo_options.py create mode 100644 swagger_client/models/milestone.py create mode 100644 swagger_client/models/new_issue_pins_allowed.py create mode 100644 swagger_client/models/node_info.py create mode 100644 swagger_client/models/node_info_services.py create mode 100644 swagger_client/models/node_info_software.py create mode 100644 swagger_client/models/node_info_usage.py create mode 100644 swagger_client/models/node_info_usage_users.py create mode 100644 swagger_client/models/note.py create mode 100644 swagger_client/models/notification_count.py create mode 100644 swagger_client/models/notification_subject.py create mode 100644 swagger_client/models/notification_thread.py create mode 100644 swagger_client/models/notify_subject_type.py create mode 100644 swagger_client/models/o_auth2_application.py create mode 100644 swagger_client/models/organization.py create mode 100644 swagger_client/models/organization_permissions.py create mode 100644 swagger_client/models/package.py create mode 100644 swagger_client/models/package_file.py create mode 100644 swagger_client/models/payload_commit.py create mode 100644 swagger_client/models/payload_commit_verification.py create mode 100644 swagger_client/models/payload_user.py create mode 100644 swagger_client/models/permission.py create mode 100644 swagger_client/models/pr_branch_info.py create mode 100644 swagger_client/models/public_key.py create mode 100644 swagger_client/models/pull_request.py create mode 100644 swagger_client/models/pull_request_meta.py create mode 100644 swagger_client/models/pull_review.py create mode 100644 swagger_client/models/pull_review_comment.py create mode 100644 swagger_client/models/pull_review_request_options.py create mode 100644 swagger_client/models/push_mirror.py create mode 100644 swagger_client/models/reaction.py create mode 100644 swagger_client/models/reference.py create mode 100644 swagger_client/models/release.py create mode 100644 swagger_client/models/rename_branch_repo_option.py create mode 100644 swagger_client/models/rename_org_option.py create mode 100644 swagger_client/models/rename_user_option.py create mode 100644 swagger_client/models/repo_collaborator_permission.py create mode 100644 swagger_client/models/repo_commit.py create mode 100644 swagger_client/models/repo_topic_options.py create mode 100644 swagger_client/models/repo_transfer.py create mode 100644 swagger_client/models/repository.py create mode 100644 swagger_client/models/repository_meta.py create mode 100644 swagger_client/models/review_state_type.py create mode 100644 swagger_client/models/search_results.py create mode 100644 swagger_client/models/secret.py create mode 100644 swagger_client/models/server_version.py create mode 100644 swagger_client/models/state_type.py create mode 100644 swagger_client/models/stop_watch.py create mode 100644 swagger_client/models/submit_pull_review_options.py create mode 100644 swagger_client/models/tag.py create mode 100644 swagger_client/models/tag_protection.py create mode 100644 swagger_client/models/team.py create mode 100644 swagger_client/models/time_stamp.py create mode 100644 swagger_client/models/timeline_comment.py create mode 100644 swagger_client/models/topic_name.py create mode 100644 swagger_client/models/topic_response.py create mode 100644 swagger_client/models/tracked_time.py create mode 100644 swagger_client/models/transfer_repo_option.py create mode 100644 swagger_client/models/update_branch_protection_priories.py create mode 100644 swagger_client/models/update_file_options.py create mode 100644 swagger_client/models/update_repo_avatar_option.py create mode 100644 swagger_client/models/update_user_avatar_option.py create mode 100644 swagger_client/models/update_variable_option.py create mode 100644 swagger_client/models/user.py create mode 100644 swagger_client/models/user_badge_option.py create mode 100644 swagger_client/models/user_heatmap_data.py create mode 100644 swagger_client/models/user_settings.py create mode 100644 swagger_client/models/user_settings_options.py create mode 100644 swagger_client/models/watch_info.py create mode 100644 swagger_client/models/wiki_commit.py create mode 100644 swagger_client/models/wiki_commit_list.py create mode 100644 swagger_client/models/wiki_page.py create mode 100644 swagger_client/models/wiki_page_meta_data.py create mode 100644 swagger_client/rest.py create mode 100644 test/__init__.py create mode 100644 test/test_access_token.py create mode 100644 test/test_action_artifact.py create mode 100644 test/test_action_artifacts_response.py create mode 100644 test/test_action_runner.py create mode 100644 test/test_action_runner_label.py create mode 100644 test/test_action_runners_response.py create mode 100644 test/test_action_task.py create mode 100644 test/test_action_task_response.py create mode 100644 test/test_action_variable.py create mode 100644 test/test_action_workflow.py create mode 100644 test/test_action_workflow_job.py create mode 100644 test/test_action_workflow_jobs_response.py create mode 100644 test/test_action_workflow_response.py create mode 100644 test/test_action_workflow_run.py create mode 100644 test/test_action_workflow_runs_response.py create mode 100644 test/test_action_workflow_step.py create mode 100644 test/test_activity.py create mode 100644 test/test_activity_pub.py create mode 100644 test/test_activitypub_api.py create mode 100644 test/test_add_collaborator_option.py create mode 100644 test/test_add_time_option.py create mode 100644 test/test_admin_api.py create mode 100644 test/test_annotated_tag.py create mode 100644 test/test_annotated_tag_object.py create mode 100644 test/test_api_error.py create mode 100644 test/test_apply_diff_patch_file_options.py create mode 100644 test/test_attachment.py create mode 100644 test/test_badge.py create mode 100644 test/test_branch.py create mode 100644 test/test_branch_protection.py create mode 100644 test/test_change_file_operation.py create mode 100644 test/test_change_files_options.py create mode 100644 test/test_changed_file.py create mode 100644 test/test_combined_status.py create mode 100644 test/test_comment.py create mode 100644 test/test_commit.py create mode 100644 test/test_commit_affected_files.py create mode 100644 test/test_commit_date_options.py create mode 100644 test/test_commit_meta.py create mode 100644 test/test_commit_stats.py create mode 100644 test/test_commit_status.py create mode 100644 test/test_commit_user.py create mode 100644 test/test_compare.py create mode 100644 test/test_contents_ext_response.py create mode 100644 test/test_contents_response.py create mode 100644 test/test_create_access_token_option.py create mode 100644 test/test_create_action_workflow_dispatch.py create mode 100644 test/test_create_branch_protection_option.py create mode 100644 test/test_create_branch_repo_option.py create mode 100644 test/test_create_email_option.py create mode 100644 test/test_create_file_options.py create mode 100644 test/test_create_fork_option.py create mode 100644 test/test_create_gpg_key_option.py create mode 100644 test/test_create_hook_option.py create mode 100644 test/test_create_hook_option_config.py create mode 100644 test/test_create_issue_comment_option.py create mode 100644 test/test_create_issue_option.py create mode 100644 test/test_create_key_option.py create mode 100644 test/test_create_label_option.py create mode 100644 test/test_create_milestone_option.py create mode 100644 test/test_create_o_auth2_application_options.py create mode 100644 test/test_create_or_update_secret_option.py create mode 100644 test/test_create_org_option.py create mode 100644 test/test_create_pull_request_option.py create mode 100644 test/test_create_pull_review_comment.py create mode 100644 test/test_create_pull_review_options.py create mode 100644 test/test_create_push_mirror_option.py create mode 100644 test/test_create_release_option.py create mode 100644 test/test_create_repo_option.py create mode 100644 test/test_create_status_option.py create mode 100644 test/test_create_tag_option.py create mode 100644 test/test_create_tag_protection_option.py create mode 100644 test/test_create_team_option.py create mode 100644 test/test_create_user_option.py create mode 100644 test/test_create_variable_option.py create mode 100644 test/test_create_wiki_page_options.py create mode 100644 test/test_cron.py create mode 100644 test/test_delete_email_option.py create mode 100644 test/test_delete_file_options.py create mode 100644 test/test_deploy_key.py create mode 100644 test/test_dismiss_pull_review_options.py create mode 100644 test/test_edit_attachment_options.py create mode 100644 test/test_edit_branch_protection_option.py create mode 100644 test/test_edit_deadline_option.py create mode 100644 test/test_edit_git_hook_option.py create mode 100644 test/test_edit_hook_option.py create mode 100644 test/test_edit_issue_comment_option.py create mode 100644 test/test_edit_issue_option.py create mode 100644 test/test_edit_label_option.py create mode 100644 test/test_edit_milestone_option.py create mode 100644 test/test_edit_org_option.py create mode 100644 test/test_edit_pull_request_option.py create mode 100644 test/test_edit_reaction_option.py create mode 100644 test/test_edit_release_option.py create mode 100644 test/test_edit_repo_option.py create mode 100644 test/test_edit_tag_protection_option.py create mode 100644 test/test_edit_team_option.py create mode 100644 test/test_edit_user_option.py create mode 100644 test/test_email.py create mode 100644 test/test_external_tracker.py create mode 100644 test/test_external_wiki.py create mode 100644 test/test_file_commit_response.py create mode 100644 test/test_file_delete_response.py create mode 100644 test/test_file_links_response.py create mode 100644 test/test_file_response.py create mode 100644 test/test_files_response.py create mode 100644 test/test_general_api_settings.py create mode 100644 test/test_general_attachment_settings.py create mode 100644 test/test_general_repo_settings.py create mode 100644 test/test_general_ui_settings.py create mode 100644 test/test_generate_repo_option.py create mode 100644 test/test_get_files_options.py create mode 100644 test/test_git_blob_response.py create mode 100644 test/test_git_entry.py create mode 100644 test/test_git_hook.py create mode 100644 test/test_git_object.py create mode 100644 test/test_git_tree_response.py create mode 100644 test/test_gitignore_template_info.py create mode 100644 test/test_gpg_key.py create mode 100644 test/test_gpg_key_email.py create mode 100644 test/test_hook.py create mode 100644 test/test_identity.py create mode 100644 test/test_inline_response200.py create mode 100644 test/test_inline_response2001.py create mode 100644 test/test_internal_tracker.py create mode 100644 test/test_issue.py create mode 100644 test/test_issue_api.py create mode 100644 test/test_issue_config.py create mode 100644 test/test_issue_config_contact_link.py create mode 100644 test/test_issue_config_validation.py create mode 100644 test/test_issue_deadline.py create mode 100644 test/test_issue_form_field.py create mode 100644 test/test_issue_form_field_type.py create mode 100644 test/test_issue_form_field_visible.py create mode 100644 test/test_issue_labels_option.py create mode 100644 test/test_issue_meta.py create mode 100644 test/test_issue_template.py create mode 100644 test/test_issue_template_string_slice.py create mode 100644 test/test_label.py create mode 100644 test/test_label_template.py create mode 100644 test/test_license_template_info.py create mode 100644 test/test_licenses_template_list_entry.py create mode 100644 test/test_lock_issue_option.py create mode 100644 test/test_markdown_option.py create mode 100644 test/test_markup_option.py create mode 100644 test/test_merge_pull_request_option.py create mode 100644 test/test_merge_upstream_request.py create mode 100644 test/test_merge_upstream_response.py create mode 100644 test/test_migrate_repo_options.py create mode 100644 test/test_milestone.py create mode 100644 test/test_miscellaneous_api.py create mode 100644 test/test_new_issue_pins_allowed.py create mode 100644 test/test_node_info.py create mode 100644 test/test_node_info_services.py create mode 100644 test/test_node_info_software.py create mode 100644 test/test_node_info_usage.py create mode 100644 test/test_node_info_usage_users.py create mode 100644 test/test_note.py create mode 100644 test/test_notification_api.py create mode 100644 test/test_notification_count.py create mode 100644 test/test_notification_subject.py create mode 100644 test/test_notification_thread.py create mode 100644 test/test_notify_subject_type.py create mode 100644 test/test_o_auth2_application.py create mode 100644 test/test_organization.py create mode 100644 test/test_organization_api.py create mode 100644 test/test_organization_permissions.py create mode 100644 test/test_package.py create mode 100644 test/test_package_api.py create mode 100644 test/test_package_file.py create mode 100644 test/test_payload_commit.py create mode 100644 test/test_payload_commit_verification.py create mode 100644 test/test_payload_user.py create mode 100644 test/test_permission.py create mode 100644 test/test_pr_branch_info.py create mode 100644 test/test_public_key.py create mode 100644 test/test_pull_request.py create mode 100644 test/test_pull_request_meta.py create mode 100644 test/test_pull_review.py create mode 100644 test/test_pull_review_comment.py create mode 100644 test/test_pull_review_request_options.py create mode 100644 test/test_push_mirror.py create mode 100644 test/test_reaction.py create mode 100644 test/test_reference.py create mode 100644 test/test_release.py create mode 100644 test/test_rename_branch_repo_option.py create mode 100644 test/test_rename_org_option.py create mode 100644 test/test_rename_user_option.py create mode 100644 test/test_repo_collaborator_permission.py create mode 100644 test/test_repo_commit.py create mode 100644 test/test_repo_topic_options.py create mode 100644 test/test_repo_transfer.py create mode 100644 test/test_repository.py create mode 100644 test/test_repository_api.py create mode 100644 test/test_repository_meta.py create mode 100644 test/test_review_state_type.py create mode 100644 test/test_search_results.py create mode 100644 test/test_secret.py create mode 100644 test/test_server_version.py create mode 100644 test/test_settings_api.py create mode 100644 test/test_state_type.py create mode 100644 test/test_stop_watch.py create mode 100644 test/test_submit_pull_review_options.py create mode 100644 test/test_tag.py create mode 100644 test/test_tag_protection.py create mode 100644 test/test_team.py create mode 100644 test/test_time_stamp.py create mode 100644 test/test_timeline_comment.py create mode 100644 test/test_topic_name.py create mode 100644 test/test_topic_response.py create mode 100644 test/test_tracked_time.py create mode 100644 test/test_transfer_repo_option.py create mode 100644 test/test_update_branch_protection_priories.py create mode 100644 test/test_update_file_options.py create mode 100644 test/test_update_repo_avatar_option.py create mode 100644 test/test_update_user_avatar_option.py create mode 100644 test/test_update_variable_option.py create mode 100644 test/test_user.py create mode 100644 test/test_user_api.py create mode 100644 test/test_user_badge_option.py create mode 100644 test/test_user_heatmap_data.py create mode 100644 test/test_user_settings.py create mode 100644 test/test_user_settings_options.py create mode 100644 test/test_watch_info.py create mode 100644 test/test_wiki_commit.py create mode 100644 test/test_wiki_commit_list.py create mode 100644 test/test_wiki_page.py create mode 100644 test/test_wiki_page_meta_data.py diff --git a/PKG-INFO b/PKG-INFO new file mode 100644 index 0000000..b97f4bb --- /dev/null +++ b/PKG-INFO @@ -0,0 +1,18 @@ +Metadata-Version: 2.4 +Name: swagger-client +Version: 1.0.0 +Summary: Gitea API +Home-page: +Author-email: +Keywords: Swagger,Gitea API +Requires-Dist: certifi>=2017.4.17 +Requires-Dist: python-dateutil>=2.1 +Requires-Dist: six>=1.10 +Requires-Dist: urllib3>=1.23 +Dynamic: description +Dynamic: keywords +Dynamic: requires-dist +Dynamic: summary + + This documentation describes the Gitea API. # noqa: E501 + diff --git a/README.md b/README.md new file mode 100644 index 0000000..53f6bd2 --- /dev/null +++ b/README.md @@ -0,0 +1,847 @@ +# swagger-client +This documentation describes the Gitea API. + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 1.25.2 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.languages.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//.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com//.git`) + +Then import the package: +```python +import swagger_client +``` + +### 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 swagger_client +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = swagger_client.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = swagger_client.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = swagger_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = swagger_client.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = swagger_client.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: TOTPHeader +configuration = swagger_client.Configuration() +configuration.api_key['X-GITEA-OTP'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-GITEA-OTP'] = 'Bearer' +# Configure API key authorization: Token +configuration = swagger_client.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = swagger_client.ActivitypubApi(swagger_client.ApiClient(configuration)) +user_id = 56 # int | user ID of the user + +try: + # Returns the Person actor for a user + api_response = api_instance.activitypub_person(user_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ActivitypubApi->activitypub_person: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://localhost/api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ActivitypubApi* | [**activitypub_person**](docs/ActivitypubApi.md#activitypub_person) | **GET** /activitypub/user-id/{user-id} | Returns the Person actor for a user +*ActivitypubApi* | [**activitypub_person_inbox**](docs/ActivitypubApi.md#activitypub_person_inbox) | **POST** /activitypub/user-id/{user-id}/inbox | Send to the inbox +*AdminApi* | [**admin_add_user_badges**](docs/AdminApi.md#admin_add_user_badges) | **POST** /admin/users/{username}/badges | Add a badge to a user +*AdminApi* | [**admin_adopt_repository**](docs/AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository +*AdminApi* | [**admin_create_hook**](docs/AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook +*AdminApi* | [**admin_create_org**](docs/AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization +*AdminApi* | [**admin_create_public_key**](docs/AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add a public key on behalf of a user +*AdminApi* | [**admin_create_repo**](docs/AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user +*AdminApi* | [**admin_create_runner_registration_token**](docs/AdminApi.md#admin_create_runner_registration_token) | **POST** /admin/actions/runners/registration-token | Get an global actions runner registration token +*AdminApi* | [**admin_create_user**](docs/AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user +*AdminApi* | [**admin_cron_list**](docs/AdminApi.md#admin_cron_list) | **GET** /admin/cron | List cron tasks +*AdminApi* | [**admin_cron_run**](docs/AdminApi.md#admin_cron_run) | **POST** /admin/cron/{task} | Run cron task +*AdminApi* | [**admin_delete_hook**](docs/AdminApi.md#admin_delete_hook) | **DELETE** /admin/hooks/{id} | Delete a hook +*AdminApi* | [**admin_delete_unadopted_repository**](docs/AdminApi.md#admin_delete_unadopted_repository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files +*AdminApi* | [**admin_delete_user**](docs/AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user +*AdminApi* | [**admin_delete_user_badges**](docs/AdminApi.md#admin_delete_user_badges) | **DELETE** /admin/users/{username}/badges | Remove a badge from a user +*AdminApi* | [**admin_delete_user_public_key**](docs/AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key +*AdminApi* | [**admin_edit_hook**](docs/AdminApi.md#admin_edit_hook) | **PATCH** /admin/hooks/{id} | Update a hook +*AdminApi* | [**admin_edit_user**](docs/AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user +*AdminApi* | [**admin_get_all_emails**](docs/AdminApi.md#admin_get_all_emails) | **GET** /admin/emails | List all emails +*AdminApi* | [**admin_get_all_orgs**](docs/AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations +*AdminApi* | [**admin_get_hook**](docs/AdminApi.md#admin_get_hook) | **GET** /admin/hooks/{id} | Get a hook +*AdminApi* | [**admin_get_runner_registration_token**](docs/AdminApi.md#admin_get_runner_registration_token) | **GET** /admin/runners/registration-token | Get an global actions runner registration token +*AdminApi* | [**admin_list_hooks**](docs/AdminApi.md#admin_list_hooks) | **GET** /admin/hooks | List system's webhooks +*AdminApi* | [**admin_list_user_badges**](docs/AdminApi.md#admin_list_user_badges) | **GET** /admin/users/{username}/badges | List a user's badges +*AdminApi* | [**admin_rename_user**](docs/AdminApi.md#admin_rename_user) | **POST** /admin/users/{username}/rename | Rename a user +*AdminApi* | [**admin_search_emails**](docs/AdminApi.md#admin_search_emails) | **GET** /admin/emails/search | Search all emails +*AdminApi* | [**admin_search_users**](docs/AdminApi.md#admin_search_users) | **GET** /admin/users | Search users according filter conditions +*AdminApi* | [**admin_unadopted_list**](docs/AdminApi.md#admin_unadopted_list) | **GET** /admin/unadopted | List unadopted repositories +*AdminApi* | [**delete_admin_runner**](docs/AdminApi.md#delete_admin_runner) | **DELETE** /admin/actions/runners/{runner_id} | Delete an global runner +*AdminApi* | [**get_admin_runner**](docs/AdminApi.md#get_admin_runner) | **GET** /admin/actions/runners/{runner_id} | Get an global runner +*AdminApi* | [**get_admin_runners**](docs/AdminApi.md#get_admin_runners) | **GET** /admin/actions/runners | Get all runners +*AdminApi* | [**list_admin_workflow_jobs**](docs/AdminApi.md#list_admin_workflow_jobs) | **GET** /admin/actions/jobs | Lists all jobs +*AdminApi* | [**list_admin_workflow_runs**](docs/AdminApi.md#list_admin_workflow_runs) | **GET** /admin/actions/runs | Lists all runs +*IssueApi* | [**issue_add_label**](docs/IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue +*IssueApi* | [**issue_add_subscription**](docs/IssueApi.md#issue_add_subscription) | **PUT** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Subscribe user to issue +*IssueApi* | [**issue_add_time**](docs/IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{index}/times | Add tracked time to a issue +*IssueApi* | [**issue_check_subscription**](docs/IssueApi.md#issue_check_subscription) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions/check | Check if user is subscribed to an issue +*IssueApi* | [**issue_clear_labels**](docs/IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue +*IssueApi* | [**issue_create_comment**](docs/IssueApi.md#issue_create_comment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue +*IssueApi* | [**issue_create_issue**](docs/IssueApi.md#issue_create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. +*IssueApi* | [**issue_create_issue_attachment**](docs/IssueApi.md#issue_create_issue_attachment) | **POST** /repos/{owner}/{repo}/issues/{index}/assets | Create an issue attachment +*IssueApi* | [**issue_create_issue_blocking**](docs/IssueApi.md#issue_create_issue_blocking) | **POST** /repos/{owner}/{repo}/issues/{index}/blocks | Block the issue given in the body by the issue in path +*IssueApi* | [**issue_create_issue_comment_attachment**](docs/IssueApi.md#issue_create_issue_comment_attachment) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/assets | Create a comment attachment +*IssueApi* | [**issue_create_issue_dependencies**](docs/IssueApi.md#issue_create_issue_dependencies) | **POST** /repos/{owner}/{repo}/issues/{index}/dependencies | Make the issue in the url depend on the issue in the form. +*IssueApi* | [**issue_create_label**](docs/IssueApi.md#issue_create_label) | **POST** /repos/{owner}/{repo}/labels | Create a label +*IssueApi* | [**issue_create_milestone**](docs/IssueApi.md#issue_create_milestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone +*IssueApi* | [**issue_delete**](docs/IssueApi.md#issue_delete) | **DELETE** /repos/{owner}/{repo}/issues/{index} | Delete an issue +*IssueApi* | [**issue_delete_comment**](docs/IssueApi.md#issue_delete_comment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment +*IssueApi* | [**issue_delete_comment_deprecated**](docs/IssueApi.md#issue_delete_comment_deprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment +*IssueApi* | [**issue_delete_comment_reaction**](docs/IssueApi.md#issue_delete_comment_reaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue +*IssueApi* | [**issue_delete_issue_attachment**](docs/IssueApi.md#issue_delete_issue_attachment) | **DELETE** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Delete an issue attachment +*IssueApi* | [**issue_delete_issue_comment_attachment**](docs/IssueApi.md#issue_delete_issue_comment_attachment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Delete a comment attachment +*IssueApi* | [**issue_delete_issue_reaction**](docs/IssueApi.md#issue_delete_issue_reaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue +*IssueApi* | [**issue_delete_label**](docs/IssueApi.md#issue_delete_label) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label +*IssueApi* | [**issue_delete_milestone**](docs/IssueApi.md#issue_delete_milestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone +*IssueApi* | [**issue_delete_stop_watch**](docs/IssueApi.md#issue_delete_stop_watch) | **DELETE** /repos/{owner}/{repo}/issues/{index}/stopwatch/delete | Delete an issue's existing stopwatch. +*IssueApi* | [**issue_delete_subscription**](docs/IssueApi.md#issue_delete_subscription) | **DELETE** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Unsubscribe user from issue +*IssueApi* | [**issue_delete_time**](docs/IssueApi.md#issue_delete_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times/{id} | Delete specific tracked time +*IssueApi* | [**issue_edit_comment**](docs/IssueApi.md#issue_edit_comment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment +*IssueApi* | [**issue_edit_comment_deprecated**](docs/IssueApi.md#issue_edit_comment_deprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment +*IssueApi* | [**issue_edit_issue**](docs/IssueApi.md#issue_edit_issue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. +*IssueApi* | [**issue_edit_issue_attachment**](docs/IssueApi.md#issue_edit_issue_attachment) | **PATCH** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Edit an issue attachment +*IssueApi* | [**issue_edit_issue_comment_attachment**](docs/IssueApi.md#issue_edit_issue_comment_attachment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Edit a comment attachment +*IssueApi* | [**issue_edit_issue_deadline**](docs/IssueApi.md#issue_edit_issue_deadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. +*IssueApi* | [**issue_edit_label**](docs/IssueApi.md#issue_edit_label) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label +*IssueApi* | [**issue_edit_milestone**](docs/IssueApi.md#issue_edit_milestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone +*IssueApi* | [**issue_get_comment**](docs/IssueApi.md#issue_get_comment) | **GET** /repos/{owner}/{repo}/issues/comments/{id} | Get a comment +*IssueApi* | [**issue_get_comment_reactions**](docs/IssueApi.md#issue_get_comment_reactions) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Get a list of reactions from a comment of an issue +*IssueApi* | [**issue_get_comments**](docs/IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue +*IssueApi* | [**issue_get_comments_and_timeline**](docs/IssueApi.md#issue_get_comments_and_timeline) | **GET** /repos/{owner}/{repo}/issues/{index}/timeline | List all comments and events on an issue +*IssueApi* | [**issue_get_issue**](docs/IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue +*IssueApi* | [**issue_get_issue_attachment**](docs/IssueApi.md#issue_get_issue_attachment) | **GET** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Get an issue attachment +*IssueApi* | [**issue_get_issue_comment_attachment**](docs/IssueApi.md#issue_get_issue_comment_attachment) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Get a comment attachment +*IssueApi* | [**issue_get_issue_reactions**](docs/IssueApi.md#issue_get_issue_reactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of an issue +*IssueApi* | [**issue_get_label**](docs/IssueApi.md#issue_get_label) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label +*IssueApi* | [**issue_get_labels**](docs/IssueApi.md#issue_get_labels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels +*IssueApi* | [**issue_get_milestone**](docs/IssueApi.md#issue_get_milestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone +*IssueApi* | [**issue_get_milestones_list**](docs/IssueApi.md#issue_get_milestones_list) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones +*IssueApi* | [**issue_get_repo_comments**](docs/IssueApi.md#issue_get_repo_comments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository +*IssueApi* | [**issue_list_blocks**](docs/IssueApi.md#issue_list_blocks) | **GET** /repos/{owner}/{repo}/issues/{index}/blocks | List issues that are blocked by this issue +*IssueApi* | [**issue_list_issue_attachments**](docs/IssueApi.md#issue_list_issue_attachments) | **GET** /repos/{owner}/{repo}/issues/{index}/assets | List issue's attachments +*IssueApi* | [**issue_list_issue_comment_attachments**](docs/IssueApi.md#issue_list_issue_comment_attachments) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets | List comment's attachments +*IssueApi* | [**issue_list_issue_dependencies**](docs/IssueApi.md#issue_list_issue_dependencies) | **GET** /repos/{owner}/{repo}/issues/{index}/dependencies | List an issue's dependencies, i.e all issues that block this issue. +*IssueApi* | [**issue_list_issues**](docs/IssueApi.md#issue_list_issues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues +*IssueApi* | [**issue_list_labels**](docs/IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels +*IssueApi* | [**issue_lock_issue**](docs/IssueApi.md#issue_lock_issue) | **PUT** /repos/{owner}/{repo}/issues/{index}/lock | Lock an issue +*IssueApi* | [**issue_post_comment_reaction**](docs/IssueApi.md#issue_post_comment_reaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue +*IssueApi* | [**issue_post_issue_reaction**](docs/IssueApi.md#issue_post_issue_reaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue +*IssueApi* | [**issue_remove_issue_blocking**](docs/IssueApi.md#issue_remove_issue_blocking) | **DELETE** /repos/{owner}/{repo}/issues/{index}/blocks | Unblock the issue given in the body by the issue in path +*IssueApi* | [**issue_remove_issue_dependencies**](docs/IssueApi.md#issue_remove_issue_dependencies) | **DELETE** /repos/{owner}/{repo}/issues/{index}/dependencies | Remove an issue dependency +*IssueApi* | [**issue_remove_label**](docs/IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{id} | Remove a label from an issue +*IssueApi* | [**issue_replace_labels**](docs/IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels +*IssueApi* | [**issue_reset_time**](docs/IssueApi.md#issue_reset_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue +*IssueApi* | [**issue_search_issues**](docs/IssueApi.md#issue_search_issues) | **GET** /repos/issues/search | Search for issues across the repositories that the user has access to +*IssueApi* | [**issue_start_stop_watch**](docs/IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. +*IssueApi* | [**issue_stop_stop_watch**](docs/IssueApi.md#issue_stop_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. +*IssueApi* | [**issue_subscriptions**](docs/IssueApi.md#issue_subscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. +*IssueApi* | [**issue_tracked_times**](docs/IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times +*IssueApi* | [**issue_unlock_issue**](docs/IssueApi.md#issue_unlock_issue) | **DELETE** /repos/{owner}/{repo}/issues/{index}/lock | Unlock an issue +*IssueApi* | [**move_issue_pin**](docs/IssueApi.md#move_issue_pin) | **PATCH** /repos/{owner}/{repo}/issues/{index}/pin/{position} | Moves the Pin to the given Position +*IssueApi* | [**pin_issue**](docs/IssueApi.md#pin_issue) | **POST** /repos/{owner}/{repo}/issues/{index}/pin | Pin an Issue +*IssueApi* | [**unpin_issue**](docs/IssueApi.md#unpin_issue) | **DELETE** /repos/{owner}/{repo}/issues/{index}/pin | Unpin an Issue +*MiscellaneousApi* | [**get_gitignore_template_info**](docs/MiscellaneousApi.md#get_gitignore_template_info) | **GET** /gitignore/templates/{name} | Returns information about a gitignore template +*MiscellaneousApi* | [**get_label_template_info**](docs/MiscellaneousApi.md#get_label_template_info) | **GET** /label/templates/{name} | Returns all labels in a template +*MiscellaneousApi* | [**get_license_template_info**](docs/MiscellaneousApi.md#get_license_template_info) | **GET** /licenses/{name} | Returns information about a license template +*MiscellaneousApi* | [**get_node_info**](docs/MiscellaneousApi.md#get_node_info) | **GET** /nodeinfo | Returns the nodeinfo of the Gitea application +*MiscellaneousApi* | [**get_signing_key**](docs/MiscellaneousApi.md#get_signing_key) | **GET** /signing-key.gpg | Get default signing-key.gpg +*MiscellaneousApi* | [**get_signing_key_ssh**](docs/MiscellaneousApi.md#get_signing_key_ssh) | **GET** /signing-key.pub | Get default signing-key.pub +*MiscellaneousApi* | [**get_version**](docs/MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the Gitea application +*MiscellaneousApi* | [**list_gitignores_templates**](docs/MiscellaneousApi.md#list_gitignores_templates) | **GET** /gitignore/templates | Returns a list of all gitignore templates +*MiscellaneousApi* | [**list_label_templates**](docs/MiscellaneousApi.md#list_label_templates) | **GET** /label/templates | Returns a list of all label templates +*MiscellaneousApi* | [**list_license_templates**](docs/MiscellaneousApi.md#list_license_templates) | **GET** /licenses | Returns a list of all license templates +*MiscellaneousApi* | [**render_markdown**](docs/MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML +*MiscellaneousApi* | [**render_markdown_raw**](docs/MiscellaneousApi.md#render_markdown_raw) | **POST** /markdown/raw | Render raw markdown as HTML +*MiscellaneousApi* | [**render_markup**](docs/MiscellaneousApi.md#render_markup) | **POST** /markup | Render a markup document as HTML +*NotificationApi* | [**notify_get_list**](docs/NotificationApi.md#notify_get_list) | **GET** /notifications | List users's notification threads +*NotificationApi* | [**notify_get_repo_list**](docs/NotificationApi.md#notify_get_repo_list) | **GET** /repos/{owner}/{repo}/notifications | List users's notification threads on a specific repo +*NotificationApi* | [**notify_get_thread**](docs/NotificationApi.md#notify_get_thread) | **GET** /notifications/threads/{id} | Get notification thread by ID +*NotificationApi* | [**notify_new_available**](docs/NotificationApi.md#notify_new_available) | **GET** /notifications/new | Check if unread notifications exist +*NotificationApi* | [**notify_read_list**](docs/NotificationApi.md#notify_read_list) | **PUT** /notifications | Mark notification threads as read, pinned or unread +*NotificationApi* | [**notify_read_repo_list**](docs/NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read, pinned or unread on a specific repo +*NotificationApi* | [**notify_read_thread**](docs/NotificationApi.md#notify_read_thread) | **PATCH** /notifications/threads/{id} | Mark notification thread as read by ID +*OrganizationApi* | [**create_org_repo**](docs/OrganizationApi.md#create_org_repo) | **POST** /orgs/{org}/repos | Create a repository in an organization +*OrganizationApi* | [**create_org_repo_deprecated**](docs/OrganizationApi.md#create_org_repo_deprecated) | **POST** /org/{org}/repos | Create a repository in an organization +*OrganizationApi* | [**create_org_variable**](docs/OrganizationApi.md#create_org_variable) | **POST** /orgs/{org}/actions/variables/{variablename} | Create an org-level variable +*OrganizationApi* | [**delete_org_runner**](docs/OrganizationApi.md#delete_org_runner) | **DELETE** /orgs/{org}/actions/runners/{runner_id} | Delete an org-level runner +*OrganizationApi* | [**delete_org_secret**](docs/OrganizationApi.md#delete_org_secret) | **DELETE** /orgs/{org}/actions/secrets/{secretname} | Delete a secret in an organization +*OrganizationApi* | [**delete_org_variable**](docs/OrganizationApi.md#delete_org_variable) | **DELETE** /orgs/{org}/actions/variables/{variablename} | Delete an org-level variable +*OrganizationApi* | [**get_org_runner**](docs/OrganizationApi.md#get_org_runner) | **GET** /orgs/{org}/actions/runners/{runner_id} | Get an org-level runner +*OrganizationApi* | [**get_org_runners**](docs/OrganizationApi.md#get_org_runners) | **GET** /orgs/{org}/actions/runners | Get org-level runners +*OrganizationApi* | [**get_org_variable**](docs/OrganizationApi.md#get_org_variable) | **GET** /orgs/{org}/actions/variables/{variablename} | Get an org-level variable +*OrganizationApi* | [**get_org_variables_list**](docs/OrganizationApi.md#get_org_variables_list) | **GET** /orgs/{org}/actions/variables | Get an org-level variables list +*OrganizationApi* | [**get_org_workflow_jobs**](docs/OrganizationApi.md#get_org_workflow_jobs) | **GET** /orgs/{org}/actions/jobs | Get org-level workflow jobs +*OrganizationApi* | [**get_org_workflow_runs**](docs/OrganizationApi.md#get_org_workflow_runs) | **GET** /orgs/{org}/actions/runs | Get org-level workflow runs +*OrganizationApi* | [**org_add_team_member**](docs/OrganizationApi.md#org_add_team_member) | **PUT** /teams/{id}/members/{username} | Add a team member +*OrganizationApi* | [**org_add_team_repository**](docs/OrganizationApi.md#org_add_team_repository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team +*OrganizationApi* | [**org_conceal_member**](docs/OrganizationApi.md#org_conceal_member) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership +*OrganizationApi* | [**org_create**](docs/OrganizationApi.md#org_create) | **POST** /orgs | Create an organization +*OrganizationApi* | [**org_create_hook**](docs/OrganizationApi.md#org_create_hook) | **POST** /orgs/{org}/hooks | Create a hook +*OrganizationApi* | [**org_create_label**](docs/OrganizationApi.md#org_create_label) | **POST** /orgs/{org}/labels | Create a label for an organization +*OrganizationApi* | [**org_create_runner_registration_token**](docs/OrganizationApi.md#org_create_runner_registration_token) | **POST** /orgs/{org}/actions/runners/registration-token | Get an organization's actions runner registration token +*OrganizationApi* | [**org_create_team**](docs/OrganizationApi.md#org_create_team) | **POST** /orgs/{org}/teams | Create a team +*OrganizationApi* | [**org_delete**](docs/OrganizationApi.md#org_delete) | **DELETE** /orgs/{org} | Delete an organization +*OrganizationApi* | [**org_delete_avatar**](docs/OrganizationApi.md#org_delete_avatar) | **DELETE** /orgs/{org}/avatar | Delete Avatar +*OrganizationApi* | [**org_delete_hook**](docs/OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook +*OrganizationApi* | [**org_delete_label**](docs/OrganizationApi.md#org_delete_label) | **DELETE** /orgs/{org}/labels/{id} | Delete a label +*OrganizationApi* | [**org_delete_member**](docs/OrganizationApi.md#org_delete_member) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization +*OrganizationApi* | [**org_delete_team**](docs/OrganizationApi.md#org_delete_team) | **DELETE** /teams/{id} | Delete a team +*OrganizationApi* | [**org_edit**](docs/OrganizationApi.md#org_edit) | **PATCH** /orgs/{org} | Edit an organization +*OrganizationApi* | [**org_edit_hook**](docs/OrganizationApi.md#org_edit_hook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook +*OrganizationApi* | [**org_edit_label**](docs/OrganizationApi.md#org_edit_label) | **PATCH** /orgs/{org}/labels/{id} | Update a label +*OrganizationApi* | [**org_edit_team**](docs/OrganizationApi.md#org_edit_team) | **PATCH** /teams/{id} | Edit a team +*OrganizationApi* | [**org_get**](docs/OrganizationApi.md#org_get) | **GET** /orgs/{org} | Get an organization +*OrganizationApi* | [**org_get_all**](docs/OrganizationApi.md#org_get_all) | **GET** /orgs | Get list of organizations +*OrganizationApi* | [**org_get_hook**](docs/OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook +*OrganizationApi* | [**org_get_label**](docs/OrganizationApi.md#org_get_label) | **GET** /orgs/{org}/labels/{id} | Get a single label +*OrganizationApi* | [**org_get_runner_registration_token**](docs/OrganizationApi.md#org_get_runner_registration_token) | **GET** /orgs/{org}/actions/runners/registration-token | Get an organization's actions runner registration token +*OrganizationApi* | [**org_get_team**](docs/OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team +*OrganizationApi* | [**org_get_user_permissions**](docs/OrganizationApi.md#org_get_user_permissions) | **GET** /users/{username}/orgs/{org}/permissions | Get user permissions in organization +*OrganizationApi* | [**org_is_member**](docs/OrganizationApi.md#org_is_member) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization +*OrganizationApi* | [**org_is_public_member**](docs/OrganizationApi.md#org_is_public_member) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization +*OrganizationApi* | [**org_list_actions_secrets**](docs/OrganizationApi.md#org_list_actions_secrets) | **GET** /orgs/{org}/actions/secrets | List an organization's actions secrets +*OrganizationApi* | [**org_list_activity_feeds**](docs/OrganizationApi.md#org_list_activity_feeds) | **GET** /orgs/{org}/activities/feeds | List an organization's activity feeds +*OrganizationApi* | [**org_list_current_user_orgs**](docs/OrganizationApi.md#org_list_current_user_orgs) | **GET** /user/orgs | List the current user's organizations +*OrganizationApi* | [**org_list_hooks**](docs/OrganizationApi.md#org_list_hooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks +*OrganizationApi* | [**org_list_labels**](docs/OrganizationApi.md#org_list_labels) | **GET** /orgs/{org}/labels | List an organization's labels +*OrganizationApi* | [**org_list_members**](docs/OrganizationApi.md#org_list_members) | **GET** /orgs/{org}/members | List an organization's members +*OrganizationApi* | [**org_list_public_members**](docs/OrganizationApi.md#org_list_public_members) | **GET** /orgs/{org}/public_members | List an organization's public members +*OrganizationApi* | [**org_list_repos**](docs/OrganizationApi.md#org_list_repos) | **GET** /orgs/{org}/repos | List an organization's repos +*OrganizationApi* | [**org_list_team_activity_feeds**](docs/OrganizationApi.md#org_list_team_activity_feeds) | **GET** /teams/{id}/activities/feeds | List a team's activity feeds +*OrganizationApi* | [**org_list_team_member**](docs/OrganizationApi.md#org_list_team_member) | **GET** /teams/{id}/members/{username} | List a particular member of team +*OrganizationApi* | [**org_list_team_members**](docs/OrganizationApi.md#org_list_team_members) | **GET** /teams/{id}/members | List a team's members +*OrganizationApi* | [**org_list_team_repo**](docs/OrganizationApi.md#org_list_team_repo) | **GET** /teams/{id}/repos/{org}/{repo} | List a particular repo of team +*OrganizationApi* | [**org_list_team_repos**](docs/OrganizationApi.md#org_list_team_repos) | **GET** /teams/{id}/repos | List a team's repos +*OrganizationApi* | [**org_list_teams**](docs/OrganizationApi.md#org_list_teams) | **GET** /orgs/{org}/teams | List an organization's teams +*OrganizationApi* | [**org_list_user_orgs**](docs/OrganizationApi.md#org_list_user_orgs) | **GET** /users/{username}/orgs | List a user's organizations +*OrganizationApi* | [**org_publicize_member**](docs/OrganizationApi.md#org_publicize_member) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership +*OrganizationApi* | [**org_remove_team_member**](docs/OrganizationApi.md#org_remove_team_member) | **DELETE** /teams/{id}/members/{username} | Remove a team member +*OrganizationApi* | [**org_remove_team_repository**](docs/OrganizationApi.md#org_remove_team_repository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team +*OrganizationApi* | [**org_update_avatar**](docs/OrganizationApi.md#org_update_avatar) | **POST** /orgs/{org}/avatar | Update Avatar +*OrganizationApi* | [**organization_block_user**](docs/OrganizationApi.md#organization_block_user) | **PUT** /orgs/{org}/blocks/{username} | Block a user +*OrganizationApi* | [**organization_check_user_block**](docs/OrganizationApi.md#organization_check_user_block) | **GET** /orgs/{org}/blocks/{username} | Check if a user is blocked by the organization +*OrganizationApi* | [**organization_list_blocks**](docs/OrganizationApi.md#organization_list_blocks) | **GET** /orgs/{org}/blocks | List users blocked by the organization +*OrganizationApi* | [**organization_unblock_user**](docs/OrganizationApi.md#organization_unblock_user) | **DELETE** /orgs/{org}/blocks/{username} | Unblock a user +*OrganizationApi* | [**rename_org**](docs/OrganizationApi.md#rename_org) | **POST** /orgs/{org}/rename | Rename an organization +*OrganizationApi* | [**team_search**](docs/OrganizationApi.md#team_search) | **GET** /orgs/{org}/teams/search | Search for teams within an organization +*OrganizationApi* | [**update_org_secret**](docs/OrganizationApi.md#update_org_secret) | **PUT** /orgs/{org}/actions/secrets/{secretname} | Create or Update a secret value in an organization +*OrganizationApi* | [**update_org_variable**](docs/OrganizationApi.md#update_org_variable) | **PUT** /orgs/{org}/actions/variables/{variablename} | Update an org-level variable +*PackageApi* | [**delete_package**](docs/PackageApi.md#delete_package) | **DELETE** /packages/{owner}/{type}/{name}/{version} | Delete a package +*PackageApi* | [**get_latest_package_version**](docs/PackageApi.md#get_latest_package_version) | **GET** /packages/{owner}/{type}/{name}/-/latest | Gets the latest version of a package +*PackageApi* | [**get_package**](docs/PackageApi.md#get_package) | **GET** /packages/{owner}/{type}/{name}/{version} | Gets a package +*PackageApi* | [**link_package**](docs/PackageApi.md#link_package) | **POST** /packages/{owner}/{type}/{name}/-/link/{repo_name} | Link a package to a repository +*PackageApi* | [**list_package_files**](docs/PackageApi.md#list_package_files) | **GET** /packages/{owner}/{type}/{name}/{version}/files | Gets all files of a package +*PackageApi* | [**list_package_versions**](docs/PackageApi.md#list_package_versions) | **GET** /packages/{owner}/{type}/{name} | Gets all versions of a package +*PackageApi* | [**list_packages**](docs/PackageApi.md#list_packages) | **GET** /packages/{owner} | Gets all packages of an owner +*PackageApi* | [**unlink_package**](docs/PackageApi.md#unlink_package) | **POST** /packages/{owner}/{type}/{name}/-/unlink | Unlink a package from a repository +*RepositoryApi* | [**accept_repo_transfer**](docs/RepositoryApi.md#accept_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/accept | Accept a repo transfer +*RepositoryApi* | [**actions_disable_workflow**](docs/RepositoryApi.md#actions_disable_workflow) | **PUT** /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable | Disable a workflow +*RepositoryApi* | [**actions_dispatch_workflow**](docs/RepositoryApi.md#actions_dispatch_workflow) | **POST** /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches | Create a workflow dispatch event +*RepositoryApi* | [**actions_enable_workflow**](docs/RepositoryApi.md#actions_enable_workflow) | **PUT** /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable | Enable a workflow +*RepositoryApi* | [**actions_get_workflow**](docs/RepositoryApi.md#actions_get_workflow) | **GET** /repos/{owner}/{repo}/actions/workflows/{workflow_id} | Get a workflow +*RepositoryApi* | [**actions_list_repository_workflows**](docs/RepositoryApi.md#actions_list_repository_workflows) | **GET** /repos/{owner}/{repo}/actions/workflows | List repository workflows +*RepositoryApi* | [**create_current_user_repo**](docs/RepositoryApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +*RepositoryApi* | [**create_fork**](docs/RepositoryApi.md#create_fork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository +*RepositoryApi* | [**create_repo_variable**](docs/RepositoryApi.md#create_repo_variable) | **POST** /repos/{owner}/{repo}/actions/variables/{variablename} | Create a repo-level variable +*RepositoryApi* | [**delete_action_run**](docs/RepositoryApi.md#delete_action_run) | **DELETE** /repos/{owner}/{repo}/actions/runs/{run} | Delete a workflow run +*RepositoryApi* | [**delete_artifact**](docs/RepositoryApi.md#delete_artifact) | **DELETE** /repos/{owner}/{repo}/actions/artifacts/{artifact_id} | Deletes a specific artifact for a workflow run +*RepositoryApi* | [**delete_repo_runner**](docs/RepositoryApi.md#delete_repo_runner) | **DELETE** /repos/{owner}/{repo}/actions/runners/{runner_id} | Delete an repo-level runner +*RepositoryApi* | [**delete_repo_secret**](docs/RepositoryApi.md#delete_repo_secret) | **DELETE** /repos/{owner}/{repo}/actions/secrets/{secretname} | Delete a secret in a repository +*RepositoryApi* | [**delete_repo_variable**](docs/RepositoryApi.md#delete_repo_variable) | **DELETE** /repos/{owner}/{repo}/actions/variables/{variablename} | Delete a repo-level variable +*RepositoryApi* | [**download_actions_run_job_logs**](docs/RepositoryApi.md#download_actions_run_job_logs) | **GET** /repos/{owner}/{repo}/actions/jobs/{job_id}/logs | Downloads the job logs for a workflow run +*RepositoryApi* | [**download_artifact**](docs/RepositoryApi.md#download_artifact) | **GET** /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip | Downloads a specific artifact for a workflow run redirects to blob url +*RepositoryApi* | [**generate_repo**](docs/RepositoryApi.md#generate_repo) | **POST** /repos/{template_owner}/{template_repo}/generate | Create a repository using a template +*RepositoryApi* | [**get_annotated_tag**](docs/RepositoryApi.md#get_annotated_tag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) +*RepositoryApi* | [**get_artifact**](docs/RepositoryApi.md#get_artifact) | **GET** /repos/{owner}/{repo}/actions/artifacts/{artifact_id} | Gets a specific artifact for a workflow run +*RepositoryApi* | [**get_artifacts**](docs/RepositoryApi.md#get_artifacts) | **GET** /repos/{owner}/{repo}/actions/artifacts | Lists all artifacts for a repository +*RepositoryApi* | [**get_artifacts_of_run**](docs/RepositoryApi.md#get_artifacts_of_run) | **GET** /repos/{owner}/{repo}/actions/runs/{run}/artifacts | Lists all artifacts for a repository run +*RepositoryApi* | [**get_blob**](docs/RepositoryApi.md#get_blob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. +*RepositoryApi* | [**get_repo_runner**](docs/RepositoryApi.md#get_repo_runner) | **GET** /repos/{owner}/{repo}/actions/runners/{runner_id} | Get an repo-level runner +*RepositoryApi* | [**get_repo_runners**](docs/RepositoryApi.md#get_repo_runners) | **GET** /repos/{owner}/{repo}/actions/runners | Get repo-level runners +*RepositoryApi* | [**get_repo_variable**](docs/RepositoryApi.md#get_repo_variable) | **GET** /repos/{owner}/{repo}/actions/variables/{variablename} | Get a repo-level variable +*RepositoryApi* | [**get_repo_variables_list**](docs/RepositoryApi.md#get_repo_variables_list) | **GET** /repos/{owner}/{repo}/actions/variables | Get repo-level variables list +*RepositoryApi* | [**get_tree**](docs/RepositoryApi.md#get_tree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. +*RepositoryApi* | [**get_workflow_job**](docs/RepositoryApi.md#get_workflow_job) | **GET** /repos/{owner}/{repo}/actions/jobs/{job_id} | Gets a specific workflow job for a workflow run +*RepositoryApi* | [**get_workflow_run**](docs/RepositoryApi.md#get_workflow_run) | **GET** /repos/{owner}/{repo}/actions/runs/{run} | Gets a specific workflow run +*RepositoryApi* | [**get_workflow_runs**](docs/RepositoryApi.md#get_workflow_runs) | **GET** /repos/{owner}/{repo}/actions/runs | Lists all runs for a repository run +*RepositoryApi* | [**list_action_tasks**](docs/RepositoryApi.md#list_action_tasks) | **GET** /repos/{owner}/{repo}/actions/tasks | List a repository's action tasks +*RepositoryApi* | [**list_forks**](docs/RepositoryApi.md#list_forks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks +*RepositoryApi* | [**list_workflow_jobs**](docs/RepositoryApi.md#list_workflow_jobs) | **GET** /repos/{owner}/{repo}/actions/jobs | Lists all jobs for a repository +*RepositoryApi* | [**list_workflow_run_jobs**](docs/RepositoryApi.md#list_workflow_run_jobs) | **GET** /repos/{owner}/{repo}/actions/runs/{run}/jobs | Lists all jobs for a workflow run +*RepositoryApi* | [**reject_repo_transfer**](docs/RepositoryApi.md#reject_repo_transfer) | **POST** /repos/{owner}/{repo}/transfer/reject | Reject a repo transfer +*RepositoryApi* | [**repo_add_collaborator**](docs/RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add or Update a collaborator to a repository +*RepositoryApi* | [**repo_add_push_mirror**](docs/RepositoryApi.md#repo_add_push_mirror) | **POST** /repos/{owner}/{repo}/push_mirrors | add a push mirror to the repository +*RepositoryApi* | [**repo_add_team**](docs/RepositoryApi.md#repo_add_team) | **PUT** /repos/{owner}/{repo}/teams/{team} | Add a team to a repository +*RepositoryApi* | [**repo_add_topic**](docs/RepositoryApi.md#repo_add_topic) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository +*RepositoryApi* | [**repo_apply_diff_patch**](docs/RepositoryApi.md#repo_apply_diff_patch) | **POST** /repos/{owner}/{repo}/diffpatch | Apply diff patch to repository +*RepositoryApi* | [**repo_cancel_scheduled_auto_merge**](docs/RepositoryApi.md#repo_cancel_scheduled_auto_merge) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/merge | Cancel the scheduled auto merge for the given pull request +*RepositoryApi* | [**repo_change_files**](docs/RepositoryApi.md#repo_change_files) | **POST** /repos/{owner}/{repo}/contents | Modify multiple files in a repository +*RepositoryApi* | [**repo_check_collaborator**](docs/RepositoryApi.md#repo_check_collaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository +*RepositoryApi* | [**repo_check_team**](docs/RepositoryApi.md#repo_check_team) | **GET** /repos/{owner}/{repo}/teams/{team} | Check if a team is assigned to a repository +*RepositoryApi* | [**repo_compare_diff**](docs/RepositoryApi.md#repo_compare_diff) | **GET** /repos/{owner}/{repo}/compare/{basehead} | Get commit comparison information +*RepositoryApi* | [**repo_create_branch**](docs/RepositoryApi.md#repo_create_branch) | **POST** /repos/{owner}/{repo}/branches | Create a branch +*RepositoryApi* | [**repo_create_branch_protection**](docs/RepositoryApi.md#repo_create_branch_protection) | **POST** /repos/{owner}/{repo}/branch_protections | Create a branch protections for a repository +*RepositoryApi* | [**repo_create_file**](docs/RepositoryApi.md#repo_create_file) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in a repository +*RepositoryApi* | [**repo_create_hook**](docs/RepositoryApi.md#repo_create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook +*RepositoryApi* | [**repo_create_key**](docs/RepositoryApi.md#repo_create_key) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository +*RepositoryApi* | [**repo_create_pull_request**](docs/RepositoryApi.md#repo_create_pull_request) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request +*RepositoryApi* | [**repo_create_pull_review**](docs/RepositoryApi.md#repo_create_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews | Create a review to an pull request +*RepositoryApi* | [**repo_create_pull_review_requests**](docs/RepositoryApi.md#repo_create_pull_review_requests) | **POST** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | create review requests for a pull request +*RepositoryApi* | [**repo_create_release**](docs/RepositoryApi.md#repo_create_release) | **POST** /repos/{owner}/{repo}/releases | Create a release +*RepositoryApi* | [**repo_create_release_attachment**](docs/RepositoryApi.md#repo_create_release_attachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment +*RepositoryApi* | [**repo_create_runner_registration_token**](docs/RepositoryApi.md#repo_create_runner_registration_token) | **POST** /repos/{owner}/{repo}/actions/runners/registration-token | Get a repository's actions runner registration token +*RepositoryApi* | [**repo_create_status**](docs/RepositoryApi.md#repo_create_status) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status +*RepositoryApi* | [**repo_create_tag**](docs/RepositoryApi.md#repo_create_tag) | **POST** /repos/{owner}/{repo}/tags | Create a new git tag in a repository +*RepositoryApi* | [**repo_create_tag_protection**](docs/RepositoryApi.md#repo_create_tag_protection) | **POST** /repos/{owner}/{repo}/tag_protections | Create a tag protections for a repository +*RepositoryApi* | [**repo_create_wiki_page**](docs/RepositoryApi.md#repo_create_wiki_page) | **POST** /repos/{owner}/{repo}/wiki/new | Create a wiki page +*RepositoryApi* | [**repo_delete**](docs/RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +*RepositoryApi* | [**repo_delete_avatar**](docs/RepositoryApi.md#repo_delete_avatar) | **DELETE** /repos/{owner}/{repo}/avatar | Delete avatar +*RepositoryApi* | [**repo_delete_branch**](docs/RepositoryApi.md#repo_delete_branch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository +*RepositoryApi* | [**repo_delete_branch_protection**](docs/RepositoryApi.md#repo_delete_branch_protection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the repository +*RepositoryApi* | [**repo_delete_collaborator**](docs/RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository +*RepositoryApi* | [**repo_delete_file**](docs/RepositoryApi.md#repo_delete_file) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository +*RepositoryApi* | [**repo_delete_git_hook**](docs/RepositoryApi.md#repo_delete_git_hook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in a repository +*RepositoryApi* | [**repo_delete_hook**](docs/RepositoryApi.md#repo_delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository +*RepositoryApi* | [**repo_delete_key**](docs/RepositoryApi.md#repo_delete_key) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository +*RepositoryApi* | [**repo_delete_pull_review**](docs/RepositoryApi.md#repo_delete_pull_review) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Delete a specific review from a pull request +*RepositoryApi* | [**repo_delete_pull_review_requests**](docs/RepositoryApi.md#repo_delete_pull_review_requests) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/requested_reviewers | cancel review requests for a pull request +*RepositoryApi* | [**repo_delete_push_mirror**](docs/RepositoryApi.md#repo_delete_push_mirror) | **DELETE** /repos/{owner}/{repo}/push_mirrors/{name} | deletes a push mirror from a repository by remoteName +*RepositoryApi* | [**repo_delete_release**](docs/RepositoryApi.md#repo_delete_release) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release +*RepositoryApi* | [**repo_delete_release_attachment**](docs/RepositoryApi.md#repo_delete_release_attachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment +*RepositoryApi* | [**repo_delete_release_by_tag**](docs/RepositoryApi.md#repo_delete_release_by_tag) | **DELETE** /repos/{owner}/{repo}/releases/tags/{tag} | Delete a release by tag name +*RepositoryApi* | [**repo_delete_tag**](docs/RepositoryApi.md#repo_delete_tag) | **DELETE** /repos/{owner}/{repo}/tags/{tag} | Delete a repository's tag by name +*RepositoryApi* | [**repo_delete_tag_protection**](docs/RepositoryApi.md#repo_delete_tag_protection) | **DELETE** /repos/{owner}/{repo}/tag_protections/{id} | Delete a specific tag protection for the repository +*RepositoryApi* | [**repo_delete_team**](docs/RepositoryApi.md#repo_delete_team) | **DELETE** /repos/{owner}/{repo}/teams/{team} | Delete a team from a repository +*RepositoryApi* | [**repo_delete_topic**](docs/RepositoryApi.md#repo_delete_topic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository +*RepositoryApi* | [**repo_delete_wiki_page**](docs/RepositoryApi.md#repo_delete_wiki_page) | **DELETE** /repos/{owner}/{repo}/wiki/page/{pageName} | Delete a wiki page +*RepositoryApi* | [**repo_dismiss_pull_review**](docs/RepositoryApi.md#repo_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals | Dismiss a review for a pull request +*RepositoryApi* | [**repo_download_commit_diff_or_patch**](docs/RepositoryApi.md#repo_download_commit_diff_or_patch) | **GET** /repos/{owner}/{repo}/git/commits/{sha}.{diffType} | Get a commit's diff or patch +*RepositoryApi* | [**repo_download_pull_diff_or_patch**](docs/RepositoryApi.md#repo_download_pull_diff_or_patch) | **GET** /repos/{owner}/{repo}/pulls/{index}.{diffType} | Get a pull request diff or patch +*RepositoryApi* | [**repo_edit**](docs/RepositoryApi.md#repo_edit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. +*RepositoryApi* | [**repo_edit_branch_protection**](docs/RepositoryApi.md#repo_edit_branch_protection) | **PATCH** /repos/{owner}/{repo}/branch_protections/{name} | Edit a branch protections for a repository. Only fields that are set will be changed +*RepositoryApi* | [**repo_edit_git_hook**](docs/RepositoryApi.md#repo_edit_git_hook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository +*RepositoryApi* | [**repo_edit_hook**](docs/RepositoryApi.md#repo_edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository +*RepositoryApi* | [**repo_edit_pull_request**](docs/RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. +*RepositoryApi* | [**repo_edit_release**](docs/RepositoryApi.md#repo_edit_release) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release +*RepositoryApi* | [**repo_edit_release_attachment**](docs/RepositoryApi.md#repo_edit_release_attachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment +*RepositoryApi* | [**repo_edit_tag_protection**](docs/RepositoryApi.md#repo_edit_tag_protection) | **PATCH** /repos/{owner}/{repo}/tag_protections/{id} | Edit a tag protections for a repository. Only fields that are set will be changed +*RepositoryApi* | [**repo_edit_wiki_page**](docs/RepositoryApi.md#repo_edit_wiki_page) | **PATCH** /repos/{owner}/{repo}/wiki/page/{pageName} | Edit a wiki page +*RepositoryApi* | [**repo_get**](docs/RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository +*RepositoryApi* | [**repo_get_all_commits**](docs/RepositoryApi.md#repo_get_all_commits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from a repository +*RepositoryApi* | [**repo_get_archive**](docs/RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository +*RepositoryApi* | [**repo_get_assignees**](docs/RepositoryApi.md#repo_get_assignees) | **GET** /repos/{owner}/{repo}/assignees | Return all users that have write access and can be assigned to issues +*RepositoryApi* | [**repo_get_branch**](docs/RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository, including its effective branch protection +*RepositoryApi* | [**repo_get_branch_protection**](docs/RepositoryApi.md#repo_get_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections/{name} | Get a specific branch protection for the repository +*RepositoryApi* | [**repo_get_by_id**](docs/RepositoryApi.md#repo_get_by_id) | **GET** /repositories/{id} | Get a repository by id +*RepositoryApi* | [**repo_get_combined_status_by_ref**](docs/RepositoryApi.md#repo_get_combined_status_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/status | Get a commit's combined status, by branch/tag/commit reference +*RepositoryApi* | [**repo_get_commit_pull_request**](docs/RepositoryApi.md#repo_get_commit_pull_request) | **GET** /repos/{owner}/{repo}/commits/{sha}/pull | Get the merged pull request of the commit +*RepositoryApi* | [**repo_get_contents**](docs/RepositoryApi.md#repo_get_contents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir. +*RepositoryApi* | [**repo_get_contents_ext**](docs/RepositoryApi.md#repo_get_contents_ext) | **GET** /repos/{owner}/{repo}/contents-ext/{filepath} | The extended \"contents\" API, to get file metadata and/or content, or list a directory. +*RepositoryApi* | [**repo_get_contents_list**](docs/RepositoryApi.md#repo_get_contents_list) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir. +*RepositoryApi* | [**repo_get_editor_config**](docs/RepositoryApi.md#repo_get_editor_config) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository +*RepositoryApi* | [**repo_get_file_contents**](docs/RepositoryApi.md#repo_get_file_contents) | **GET** /repos/{owner}/{repo}/file-contents | Get the metadata and contents of requested files +*RepositoryApi* | [**repo_get_file_contents_post**](docs/RepositoryApi.md#repo_get_file_contents_post) | **POST** /repos/{owner}/{repo}/file-contents | Get the metadata and contents of requested files +*RepositoryApi* | [**repo_get_git_hook**](docs/RepositoryApi.md#repo_get_git_hook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook +*RepositoryApi* | [**repo_get_hook**](docs/RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook +*RepositoryApi* | [**repo_get_issue_config**](docs/RepositoryApi.md#repo_get_issue_config) | **GET** /repos/{owner}/{repo}/issue_config | Returns the issue config for a repo +*RepositoryApi* | [**repo_get_issue_templates**](docs/RepositoryApi.md#repo_get_issue_templates) | **GET** /repos/{owner}/{repo}/issue_templates | Get available issue templates for a repository +*RepositoryApi* | [**repo_get_key**](docs/RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id +*RepositoryApi* | [**repo_get_languages**](docs/RepositoryApi.md#repo_get_languages) | **GET** /repos/{owner}/{repo}/languages | Get languages and number of bytes of code written +*RepositoryApi* | [**repo_get_latest_release**](docs/RepositoryApi.md#repo_get_latest_release) | **GET** /repos/{owner}/{repo}/releases/latest | Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at +*RepositoryApi* | [**repo_get_licenses**](docs/RepositoryApi.md#repo_get_licenses) | **GET** /repos/{owner}/{repo}/licenses | Get repo licenses +*RepositoryApi* | [**repo_get_note**](docs/RepositoryApi.md#repo_get_note) | **GET** /repos/{owner}/{repo}/git/notes/{sha} | Get a note corresponding to a single commit from a repository +*RepositoryApi* | [**repo_get_pull_request**](docs/RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request +*RepositoryApi* | [**repo_get_pull_request_by_base_head**](docs/RepositoryApi.md#repo_get_pull_request_by_base_head) | **GET** /repos/{owner}/{repo}/pulls/{base}/{head} | Get a pull request by base and head +*RepositoryApi* | [**repo_get_pull_request_commits**](docs/RepositoryApi.md#repo_get_pull_request_commits) | **GET** /repos/{owner}/{repo}/pulls/{index}/commits | Get commits for a pull request +*RepositoryApi* | [**repo_get_pull_request_files**](docs/RepositoryApi.md#repo_get_pull_request_files) | **GET** /repos/{owner}/{repo}/pulls/{index}/files | Get changed files for a pull request +*RepositoryApi* | [**repo_get_pull_review**](docs/RepositoryApi.md#repo_get_pull_review) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Get a specific review for a pull request +*RepositoryApi* | [**repo_get_pull_review_comments**](docs/RepositoryApi.md#repo_get_pull_review_comments) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Get a specific review for a pull request +*RepositoryApi* | [**repo_get_push_mirror_by_remote_name**](docs/RepositoryApi.md#repo_get_push_mirror_by_remote_name) | **GET** /repos/{owner}/{repo}/push_mirrors/{name} | Get push mirror of the repository by remoteName +*RepositoryApi* | [**repo_get_raw_file**](docs/RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository +*RepositoryApi* | [**repo_get_raw_file_or_lfs**](docs/RepositoryApi.md#repo_get_raw_file_or_lfs) | **GET** /repos/{owner}/{repo}/media/{filepath} | Get a file or it's LFS object from a repository +*RepositoryApi* | [**repo_get_release**](docs/RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release +*RepositoryApi* | [**repo_get_release_attachment**](docs/RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment +*RepositoryApi* | [**repo_get_release_by_tag**](docs/RepositoryApi.md#repo_get_release_by_tag) | **GET** /repos/{owner}/{repo}/releases/tags/{tag} | Get a release by tag name +*RepositoryApi* | [**repo_get_repo_permissions**](docs/RepositoryApi.md#repo_get_repo_permissions) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator}/permission | Get repository permissions for a user +*RepositoryApi* | [**repo_get_reviewers**](docs/RepositoryApi.md#repo_get_reviewers) | **GET** /repos/{owner}/{repo}/reviewers | Return all users that can be requested to review in this repo +*RepositoryApi* | [**repo_get_runner_registration_token**](docs/RepositoryApi.md#repo_get_runner_registration_token) | **GET** /repos/{owner}/{repo}/actions/runners/registration-token | Get a repository's actions runner registration token +*RepositoryApi* | [**repo_get_single_commit**](docs/RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository +*RepositoryApi* | [**repo_get_tag**](docs/RepositoryApi.md#repo_get_tag) | **GET** /repos/{owner}/{repo}/tags/{tag} | Get the tag of a repository by tag name +*RepositoryApi* | [**repo_get_tag_protection**](docs/RepositoryApi.md#repo_get_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections/{id} | Get a specific tag protection for the repository +*RepositoryApi* | [**repo_get_wiki_page**](docs/RepositoryApi.md#repo_get_wiki_page) | **GET** /repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page +*RepositoryApi* | [**repo_get_wiki_page_revisions**](docs/RepositoryApi.md#repo_get_wiki_page_revisions) | **GET** /repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page +*RepositoryApi* | [**repo_get_wiki_pages**](docs/RepositoryApi.md#repo_get_wiki_pages) | **GET** /repos/{owner}/{repo}/wiki/pages | Get all wiki pages +*RepositoryApi* | [**repo_list_actions_secrets**](docs/RepositoryApi.md#repo_list_actions_secrets) | **GET** /repos/{owner}/{repo}/actions/secrets | List an repo's actions secrets +*RepositoryApi* | [**repo_list_activity_feeds**](docs/RepositoryApi.md#repo_list_activity_feeds) | **GET** /repos/{owner}/{repo}/activities/feeds | List a repository's activity feeds +*RepositoryApi* | [**repo_list_all_git_refs**](docs/RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs +*RepositoryApi* | [**repo_list_branch_protection**](docs/RepositoryApi.md#repo_list_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository +*RepositoryApi* | [**repo_list_branches**](docs/RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches +*RepositoryApi* | [**repo_list_collaborators**](docs/RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators +*RepositoryApi* | [**repo_list_git_hooks**](docs/RepositoryApi.md#repo_list_git_hooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository +*RepositoryApi* | [**repo_list_git_refs**](docs/RepositoryApi.md#repo_list_git_refs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs +*RepositoryApi* | [**repo_list_hooks**](docs/RepositoryApi.md#repo_list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository +*RepositoryApi* | [**repo_list_keys**](docs/RepositoryApi.md#repo_list_keys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys +*RepositoryApi* | [**repo_list_pinned_issues**](docs/RepositoryApi.md#repo_list_pinned_issues) | **GET** /repos/{owner}/{repo}/issues/pinned | List a repo's pinned issues +*RepositoryApi* | [**repo_list_pinned_pull_requests**](docs/RepositoryApi.md#repo_list_pinned_pull_requests) | **GET** /repos/{owner}/{repo}/pulls/pinned | List a repo's pinned pull requests +*RepositoryApi* | [**repo_list_pull_requests**](docs/RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests +*RepositoryApi* | [**repo_list_pull_reviews**](docs/RepositoryApi.md#repo_list_pull_reviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request +*RepositoryApi* | [**repo_list_push_mirrors**](docs/RepositoryApi.md#repo_list_push_mirrors) | **GET** /repos/{owner}/{repo}/push_mirrors | Get all push mirrors of the repository +*RepositoryApi* | [**repo_list_release_attachments**](docs/RepositoryApi.md#repo_list_release_attachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments +*RepositoryApi* | [**repo_list_releases**](docs/RepositoryApi.md#repo_list_releases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases +*RepositoryApi* | [**repo_list_stargazers**](docs/RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers +*RepositoryApi* | [**repo_list_statuses**](docs/RepositoryApi.md#repo_list_statuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses +*RepositoryApi* | [**repo_list_statuses_by_ref**](docs/RepositoryApi.md#repo_list_statuses_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's statuses, by branch/tag/commit reference +*RepositoryApi* | [**repo_list_subscribers**](docs/RepositoryApi.md#repo_list_subscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +*RepositoryApi* | [**repo_list_tag_protection**](docs/RepositoryApi.md#repo_list_tag_protection) | **GET** /repos/{owner}/{repo}/tag_protections | List tag protections for a repository +*RepositoryApi* | [**repo_list_tags**](docs/RepositoryApi.md#repo_list_tags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags +*RepositoryApi* | [**repo_list_teams**](docs/RepositoryApi.md#repo_list_teams) | **GET** /repos/{owner}/{repo}/teams | List a repository's teams +*RepositoryApi* | [**repo_list_topics**](docs/RepositoryApi.md#repo_list_topics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has +*RepositoryApi* | [**repo_merge_pull_request**](docs/RepositoryApi.md#repo_merge_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request +*RepositoryApi* | [**repo_merge_upstream**](docs/RepositoryApi.md#repo_merge_upstream) | **POST** /repos/{owner}/{repo}/merge-upstream | Merge a branch from upstream +*RepositoryApi* | [**repo_migrate**](docs/RepositoryApi.md#repo_migrate) | **POST** /repos/migrate | Migrate a remote git repository +*RepositoryApi* | [**repo_mirror_sync**](docs/RepositoryApi.md#repo_mirror_sync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository +*RepositoryApi* | [**repo_new_pin_allowed**](docs/RepositoryApi.md#repo_new_pin_allowed) | **GET** /repos/{owner}/{repo}/new_pin_allowed | Returns if new Issue Pins are allowed +*RepositoryApi* | [**repo_pull_request_is_merged**](docs/RepositoryApi.md#repo_pull_request_is_merged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged +*RepositoryApi* | [**repo_push_mirror_sync**](docs/RepositoryApi.md#repo_push_mirror_sync) | **POST** /repos/{owner}/{repo}/push_mirrors-sync | Sync all push mirrored repository +*RepositoryApi* | [**repo_rename_branch**](docs/RepositoryApi.md#repo_rename_branch) | **PATCH** /repos/{owner}/{repo}/branches/{branch} | Rename a branch +*RepositoryApi* | [**repo_search**](docs/RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories +*RepositoryApi* | [**repo_signing_key**](docs/RepositoryApi.md#repo_signing_key) | **GET** /repos/{owner}/{repo}/signing-key.gpg | Get signing-key.gpg for given repository +*RepositoryApi* | [**repo_signing_key_ssh**](docs/RepositoryApi.md#repo_signing_key_ssh) | **GET** /repos/{owner}/{repo}/signing-key.pub | Get signing-key.pub for given repository +*RepositoryApi* | [**repo_submit_pull_review**](docs/RepositoryApi.md#repo_submit_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Submit a pending review to an pull request +*RepositoryApi* | [**repo_test_hook**](docs/RepositoryApi.md#repo_test_hook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook +*RepositoryApi* | [**repo_tracked_times**](docs/RepositoryApi.md#repo_tracked_times) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times +*RepositoryApi* | [**repo_transfer**](docs/RepositoryApi.md#repo_transfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership +*RepositoryApi* | [**repo_un_dismiss_pull_review**](docs/RepositoryApi.md#repo_un_dismiss_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals | Cancel to dismiss a review for a pull request +*RepositoryApi* | [**repo_update_avatar**](docs/RepositoryApi.md#repo_update_avatar) | **POST** /repos/{owner}/{repo}/avatar | Update avatar +*RepositoryApi* | [**repo_update_branch_protection_priories**](docs/RepositoryApi.md#repo_update_branch_protection_priories) | **POST** /repos/{owner}/{repo}/branch_protections/priority | Update the priorities of branch protections for a repository. +*RepositoryApi* | [**repo_update_file**](docs/RepositoryApi.md#repo_update_file) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository +*RepositoryApi* | [**repo_update_pull_request**](docs/RepositoryApi.md#repo_update_pull_request) | **POST** /repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch +*RepositoryApi* | [**repo_update_topics**](docs/RepositoryApi.md#repo_update_topics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository +*RepositoryApi* | [**repo_validate_issue_config**](docs/RepositoryApi.md#repo_validate_issue_config) | **GET** /repos/{owner}/{repo}/issue_config/validate | Returns the validation information for a issue config +*RepositoryApi* | [**topic_search**](docs/RepositoryApi.md#topic_search) | **GET** /topics/search | search topics via keyword +*RepositoryApi* | [**update_repo_secret**](docs/RepositoryApi.md#update_repo_secret) | **PUT** /repos/{owner}/{repo}/actions/secrets/{secretname} | Create or Update a secret value in a repository +*RepositoryApi* | [**update_repo_variable**](docs/RepositoryApi.md#update_repo_variable) | **PUT** /repos/{owner}/{repo}/actions/variables/{variablename} | Update a repo-level variable +*RepositoryApi* | [**user_current_check_subscription**](docs/RepositoryApi.md#user_current_check_subscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo +*RepositoryApi* | [**user_current_delete_subscription**](docs/RepositoryApi.md#user_current_delete_subscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo +*RepositoryApi* | [**user_current_put_subscription**](docs/RepositoryApi.md#user_current_put_subscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo +*RepositoryApi* | [**user_tracked_times**](docs/RepositoryApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo +*SettingsApi* | [**get_general_api_settings**](docs/SettingsApi.md#get_general_api_settings) | **GET** /settings/api | Get instance's global settings for api +*SettingsApi* | [**get_general_attachment_settings**](docs/SettingsApi.md#get_general_attachment_settings) | **GET** /settings/attachment | Get instance's global settings for Attachment +*SettingsApi* | [**get_general_repository_settings**](docs/SettingsApi.md#get_general_repository_settings) | **GET** /settings/repository | Get instance's global settings for repositories +*SettingsApi* | [**get_general_ui_settings**](docs/SettingsApi.md#get_general_ui_settings) | **GET** /settings/ui | Get instance's global settings for ui +*UserApi* | [**create_current_user_repo**](docs/UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository +*UserApi* | [**create_user_variable**](docs/UserApi.md#create_user_variable) | **POST** /user/actions/variables/{variablename} | Create a user-level variable +*UserApi* | [**delete_user_runner**](docs/UserApi.md#delete_user_runner) | **DELETE** /user/actions/runners/{runner_id} | Delete an user-level runner +*UserApi* | [**delete_user_secret**](docs/UserApi.md#delete_user_secret) | **DELETE** /user/actions/secrets/{secretname} | Delete a secret in a user scope +*UserApi* | [**delete_user_variable**](docs/UserApi.md#delete_user_variable) | **DELETE** /user/actions/variables/{variablename} | Delete a user-level variable which is created by current doer +*UserApi* | [**get_user_runner**](docs/UserApi.md#get_user_runner) | **GET** /user/actions/runners/{runner_id} | Get an user-level runner +*UserApi* | [**get_user_runners**](docs/UserApi.md#get_user_runners) | **GET** /user/actions/runners | Get user-level runners +*UserApi* | [**get_user_settings**](docs/UserApi.md#get_user_settings) | **GET** /user/settings | Get user settings +*UserApi* | [**get_user_variable**](docs/UserApi.md#get_user_variable) | **GET** /user/actions/variables/{variablename} | Get a user-level variable which is created by current doer +*UserApi* | [**get_user_variables_list**](docs/UserApi.md#get_user_variables_list) | **GET** /user/actions/variables | Get the user-level list of variables which is created by current doer +*UserApi* | [**get_user_workflow_jobs**](docs/UserApi.md#get_user_workflow_jobs) | **GET** /user/actions/jobs | Get workflow jobs +*UserApi* | [**get_user_workflow_runs**](docs/UserApi.md#get_user_workflow_runs) | **GET** /user/actions/runs | Get workflow runs +*UserApi* | [**get_verification_token**](docs/UserApi.md#get_verification_token) | **GET** /user/gpg_key_token | Get a Token to verify +*UserApi* | [**update_user_secret**](docs/UserApi.md#update_user_secret) | **PUT** /user/actions/secrets/{secretname} | Create or Update a secret value in a user scope +*UserApi* | [**update_user_settings**](docs/UserApi.md#update_user_settings) | **PATCH** /user/settings | Update user settings +*UserApi* | [**update_user_variable**](docs/UserApi.md#update_user_variable) | **PUT** /user/actions/variables/{variablename} | Update a user-level variable which is created by current doer +*UserApi* | [**user_add_email**](docs/UserApi.md#user_add_email) | **POST** /user/emails | Add email addresses +*UserApi* | [**user_block_user**](docs/UserApi.md#user_block_user) | **PUT** /user/blocks/{username} | Block a user +*UserApi* | [**user_check_following**](docs/UserApi.md#user_check_following) | **GET** /users/{username}/following/{target} | Check if one user is following another user +*UserApi* | [**user_check_user_block**](docs/UserApi.md#user_check_user_block) | **GET** /user/blocks/{username} | Check if a user is blocked by the authenticated user +*UserApi* | [**user_create_hook**](docs/UserApi.md#user_create_hook) | **POST** /user/hooks | Create a hook +*UserApi* | [**user_create_o_auth2_application**](docs/UserApi.md#user_create_o_auth2_application) | **POST** /user/applications/oauth2 | creates a new OAuth2 application +*UserApi* | [**user_create_runner_registration_token**](docs/UserApi.md#user_create_runner_registration_token) | **POST** /user/actions/runners/registration-token | Get an user's actions runner registration token +*UserApi* | [**user_create_token**](docs/UserApi.md#user_create_token) | **POST** /users/{username}/tokens | Create an access token +*UserApi* | [**user_current_check_following**](docs/UserApi.md#user_current_check_following) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user +*UserApi* | [**user_current_check_starring**](docs/UserApi.md#user_current_check_starring) | **GET** /user/starred/{owner}/{repo} | Whether the authenticated is starring the repo +*UserApi* | [**user_current_delete_follow**](docs/UserApi.md#user_current_delete_follow) | **DELETE** /user/following/{username} | Unfollow a user +*UserApi* | [**user_current_delete_gpg_key**](docs/UserApi.md#user_current_delete_gpg_key) | **DELETE** /user/gpg_keys/{id} | Remove a GPG key +*UserApi* | [**user_current_delete_key**](docs/UserApi.md#user_current_delete_key) | **DELETE** /user/keys/{id} | Delete a public key +*UserApi* | [**user_current_delete_star**](docs/UserApi.md#user_current_delete_star) | **DELETE** /user/starred/{owner}/{repo} | Unstar the given repo +*UserApi* | [**user_current_get_gpg_key**](docs/UserApi.md#user_current_get_gpg_key) | **GET** /user/gpg_keys/{id} | Get a GPG key +*UserApi* | [**user_current_get_key**](docs/UserApi.md#user_current_get_key) | **GET** /user/keys/{id} | Get a public key +*UserApi* | [**user_current_list_followers**](docs/UserApi.md#user_current_list_followers) | **GET** /user/followers | List the authenticated user's followers +*UserApi* | [**user_current_list_following**](docs/UserApi.md#user_current_list_following) | **GET** /user/following | List the users that the authenticated user is following +*UserApi* | [**user_current_list_gpg_keys**](docs/UserApi.md#user_current_list_gpg_keys) | **GET** /user/gpg_keys | List the authenticated user's GPG keys +*UserApi* | [**user_current_list_keys**](docs/UserApi.md#user_current_list_keys) | **GET** /user/keys | List the authenticated user's public keys +*UserApi* | [**user_current_list_repos**](docs/UserApi.md#user_current_list_repos) | **GET** /user/repos | List the repos that the authenticated user owns +*UserApi* | [**user_current_list_starred**](docs/UserApi.md#user_current_list_starred) | **GET** /user/starred | The repos that the authenticated user has starred +*UserApi* | [**user_current_list_subscriptions**](docs/UserApi.md#user_current_list_subscriptions) | **GET** /user/subscriptions | List repositories watched by the authenticated user +*UserApi* | [**user_current_post_gpg_key**](docs/UserApi.md#user_current_post_gpg_key) | **POST** /user/gpg_keys | Create a GPG key +*UserApi* | [**user_current_post_key**](docs/UserApi.md#user_current_post_key) | **POST** /user/keys | Create a public key +*UserApi* | [**user_current_put_follow**](docs/UserApi.md#user_current_put_follow) | **PUT** /user/following/{username} | Follow a user +*UserApi* | [**user_current_put_star**](docs/UserApi.md#user_current_put_star) | **PUT** /user/starred/{owner}/{repo} | Star the given repo +*UserApi* | [**user_current_tracked_times**](docs/UserApi.md#user_current_tracked_times) | **GET** /user/times | List the current user's tracked times +*UserApi* | [**user_delete_access_token**](docs/UserApi.md#user_delete_access_token) | **DELETE** /users/{username}/tokens/{token} | delete an access token +*UserApi* | [**user_delete_avatar**](docs/UserApi.md#user_delete_avatar) | **DELETE** /user/avatar | Delete Avatar +*UserApi* | [**user_delete_email**](docs/UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses +*UserApi* | [**user_delete_hook**](docs/UserApi.md#user_delete_hook) | **DELETE** /user/hooks/{id} | Delete a hook +*UserApi* | [**user_delete_o_auth2_application**](docs/UserApi.md#user_delete_o_auth2_application) | **DELETE** /user/applications/oauth2/{id} | delete an OAuth2 Application +*UserApi* | [**user_edit_hook**](docs/UserApi.md#user_edit_hook) | **PATCH** /user/hooks/{id} | Update a hook +*UserApi* | [**user_get**](docs/UserApi.md#user_get) | **GET** /users/{username} | Get a user +*UserApi* | [**user_get_current**](docs/UserApi.md#user_get_current) | **GET** /user | Get the authenticated user +*UserApi* | [**user_get_heatmap_data**](docs/UserApi.md#user_get_heatmap_data) | **GET** /users/{username}/heatmap | Get a user's heatmap +*UserApi* | [**user_get_hook**](docs/UserApi.md#user_get_hook) | **GET** /user/hooks/{id} | Get a hook +*UserApi* | [**user_get_o_auth2_application**](docs/UserApi.md#user_get_o_auth2_application) | **GET** /user/applications/oauth2/{id} | get an OAuth2 Application +*UserApi* | [**user_get_oauth2_application**](docs/UserApi.md#user_get_oauth2_application) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications +*UserApi* | [**user_get_runner_registration_token**](docs/UserApi.md#user_get_runner_registration_token) | **GET** /user/actions/runners/registration-token | Get an user's actions runner registration token +*UserApi* | [**user_get_stop_watches**](docs/UserApi.md#user_get_stop_watches) | **GET** /user/stopwatches | Get list of all existing stopwatches +*UserApi* | [**user_get_tokens**](docs/UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the authenticated user's access tokens +*UserApi* | [**user_list_activity_feeds**](docs/UserApi.md#user_list_activity_feeds) | **GET** /users/{username}/activities/feeds | List a user's activity feeds +*UserApi* | [**user_list_blocks**](docs/UserApi.md#user_list_blocks) | **GET** /user/blocks | List users blocked by the authenticated user +*UserApi* | [**user_list_emails**](docs/UserApi.md#user_list_emails) | **GET** /user/emails | List the authenticated user's email addresses +*UserApi* | [**user_list_followers**](docs/UserApi.md#user_list_followers) | **GET** /users/{username}/followers | List the given user's followers +*UserApi* | [**user_list_following**](docs/UserApi.md#user_list_following) | **GET** /users/{username}/following | List the users that the given user is following +*UserApi* | [**user_list_gpg_keys**](docs/UserApi.md#user_list_gpg_keys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys +*UserApi* | [**user_list_hooks**](docs/UserApi.md#user_list_hooks) | **GET** /user/hooks | List the authenticated user's webhooks +*UserApi* | [**user_list_keys**](docs/UserApi.md#user_list_keys) | **GET** /users/{username}/keys | List the given user's public keys +*UserApi* | [**user_list_repos**](docs/UserApi.md#user_list_repos) | **GET** /users/{username}/repos | List the repos owned by the given user +*UserApi* | [**user_list_starred**](docs/UserApi.md#user_list_starred) | **GET** /users/{username}/starred | The repos that the given user has starred +*UserApi* | [**user_list_subscriptions**](docs/UserApi.md#user_list_subscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user +*UserApi* | [**user_list_teams**](docs/UserApi.md#user_list_teams) | **GET** /user/teams | List all the teams a user belongs to +*UserApi* | [**user_search**](docs/UserApi.md#user_search) | **GET** /users/search | Search for users +*UserApi* | [**user_unblock_user**](docs/UserApi.md#user_unblock_user) | **DELETE** /user/blocks/{username} | Unblock a user +*UserApi* | [**user_update_avatar**](docs/UserApi.md#user_update_avatar) | **POST** /user/avatar | Update Avatar +*UserApi* | [**user_update_o_auth2_application**](docs/UserApi.md#user_update_o_auth2_application) | **PATCH** /user/applications/oauth2/{id} | update an OAuth2 Application, this includes regenerating the client secret +*UserApi* | [**user_verify_gpg_key**](docs/UserApi.md#user_verify_gpg_key) | **POST** /user/gpg_key_verify | Verify a GPG key + + +## Documentation For Models + + - [APIError](docs/APIError.md) + - [AccessToken](docs/AccessToken.md) + - [ActionArtifact](docs/ActionArtifact.md) + - [ActionArtifactsResponse](docs/ActionArtifactsResponse.md) + - [ActionRunner](docs/ActionRunner.md) + - [ActionRunnerLabel](docs/ActionRunnerLabel.md) + - [ActionRunnersResponse](docs/ActionRunnersResponse.md) + - [ActionTask](docs/ActionTask.md) + - [ActionTaskResponse](docs/ActionTaskResponse.md) + - [ActionVariable](docs/ActionVariable.md) + - [ActionWorkflow](docs/ActionWorkflow.md) + - [ActionWorkflowJob](docs/ActionWorkflowJob.md) + - [ActionWorkflowJobsResponse](docs/ActionWorkflowJobsResponse.md) + - [ActionWorkflowResponse](docs/ActionWorkflowResponse.md) + - [ActionWorkflowRun](docs/ActionWorkflowRun.md) + - [ActionWorkflowRunsResponse](docs/ActionWorkflowRunsResponse.md) + - [ActionWorkflowStep](docs/ActionWorkflowStep.md) + - [Activity](docs/Activity.md) + - [ActivityPub](docs/ActivityPub.md) + - [AddCollaboratorOption](docs/AddCollaboratorOption.md) + - [AddTimeOption](docs/AddTimeOption.md) + - [AnnotatedTag](docs/AnnotatedTag.md) + - [AnnotatedTagObject](docs/AnnotatedTagObject.md) + - [ApplyDiffPatchFileOptions](docs/ApplyDiffPatchFileOptions.md) + - [Attachment](docs/Attachment.md) + - [Badge](docs/Badge.md) + - [Branch](docs/Branch.md) + - [BranchProtection](docs/BranchProtection.md) + - [ChangeFileOperation](docs/ChangeFileOperation.md) + - [ChangeFilesOptions](docs/ChangeFilesOptions.md) + - [ChangedFile](docs/ChangedFile.md) + - [CombinedStatus](docs/CombinedStatus.md) + - [Comment](docs/Comment.md) + - [Commit](docs/Commit.md) + - [CommitAffectedFiles](docs/CommitAffectedFiles.md) + - [CommitDateOptions](docs/CommitDateOptions.md) + - [CommitMeta](docs/CommitMeta.md) + - [CommitStats](docs/CommitStats.md) + - [CommitStatus](docs/CommitStatus.md) + - [CommitUser](docs/CommitUser.md) + - [Compare](docs/Compare.md) + - [ContentsExtResponse](docs/ContentsExtResponse.md) + - [ContentsResponse](docs/ContentsResponse.md) + - [CreateAccessTokenOption](docs/CreateAccessTokenOption.md) + - [CreateActionWorkflowDispatch](docs/CreateActionWorkflowDispatch.md) + - [CreateBranchProtectionOption](docs/CreateBranchProtectionOption.md) + - [CreateBranchRepoOption](docs/CreateBranchRepoOption.md) + - [CreateEmailOption](docs/CreateEmailOption.md) + - [CreateFileOptions](docs/CreateFileOptions.md) + - [CreateForkOption](docs/CreateForkOption.md) + - [CreateGPGKeyOption](docs/CreateGPGKeyOption.md) + - [CreateHookOption](docs/CreateHookOption.md) + - [CreateHookOptionConfig](docs/CreateHookOptionConfig.md) + - [CreateIssueCommentOption](docs/CreateIssueCommentOption.md) + - [CreateIssueOption](docs/CreateIssueOption.md) + - [CreateKeyOption](docs/CreateKeyOption.md) + - [CreateLabelOption](docs/CreateLabelOption.md) + - [CreateMilestoneOption](docs/CreateMilestoneOption.md) + - [CreateOAuth2ApplicationOptions](docs/CreateOAuth2ApplicationOptions.md) + - [CreateOrUpdateSecretOption](docs/CreateOrUpdateSecretOption.md) + - [CreateOrgOption](docs/CreateOrgOption.md) + - [CreatePullRequestOption](docs/CreatePullRequestOption.md) + - [CreatePullReviewComment](docs/CreatePullReviewComment.md) + - [CreatePullReviewOptions](docs/CreatePullReviewOptions.md) + - [CreatePushMirrorOption](docs/CreatePushMirrorOption.md) + - [CreateReleaseOption](docs/CreateReleaseOption.md) + - [CreateRepoOption](docs/CreateRepoOption.md) + - [CreateStatusOption](docs/CreateStatusOption.md) + - [CreateTagOption](docs/CreateTagOption.md) + - [CreateTagProtectionOption](docs/CreateTagProtectionOption.md) + - [CreateTeamOption](docs/CreateTeamOption.md) + - [CreateUserOption](docs/CreateUserOption.md) + - [CreateVariableOption](docs/CreateVariableOption.md) + - [CreateWikiPageOptions](docs/CreateWikiPageOptions.md) + - [Cron](docs/Cron.md) + - [DeleteEmailOption](docs/DeleteEmailOption.md) + - [DeleteFileOptions](docs/DeleteFileOptions.md) + - [DeployKey](docs/DeployKey.md) + - [DismissPullReviewOptions](docs/DismissPullReviewOptions.md) + - [EditAttachmentOptions](docs/EditAttachmentOptions.md) + - [EditBranchProtectionOption](docs/EditBranchProtectionOption.md) + - [EditDeadlineOption](docs/EditDeadlineOption.md) + - [EditGitHookOption](docs/EditGitHookOption.md) + - [EditHookOption](docs/EditHookOption.md) + - [EditIssueCommentOption](docs/EditIssueCommentOption.md) + - [EditIssueOption](docs/EditIssueOption.md) + - [EditLabelOption](docs/EditLabelOption.md) + - [EditMilestoneOption](docs/EditMilestoneOption.md) + - [EditOrgOption](docs/EditOrgOption.md) + - [EditPullRequestOption](docs/EditPullRequestOption.md) + - [EditReactionOption](docs/EditReactionOption.md) + - [EditReleaseOption](docs/EditReleaseOption.md) + - [EditRepoOption](docs/EditRepoOption.md) + - [EditTagProtectionOption](docs/EditTagProtectionOption.md) + - [EditTeamOption](docs/EditTeamOption.md) + - [EditUserOption](docs/EditUserOption.md) + - [Email](docs/Email.md) + - [ExternalTracker](docs/ExternalTracker.md) + - [ExternalWiki](docs/ExternalWiki.md) + - [FileCommitResponse](docs/FileCommitResponse.md) + - [FileDeleteResponse](docs/FileDeleteResponse.md) + - [FileLinksResponse](docs/FileLinksResponse.md) + - [FileResponse](docs/FileResponse.md) + - [FilesResponse](docs/FilesResponse.md) + - [GPGKey](docs/GPGKey.md) + - [GPGKeyEmail](docs/GPGKeyEmail.md) + - [GeneralAPISettings](docs/GeneralAPISettings.md) + - [GeneralAttachmentSettings](docs/GeneralAttachmentSettings.md) + - [GeneralRepoSettings](docs/GeneralRepoSettings.md) + - [GeneralUISettings](docs/GeneralUISettings.md) + - [GenerateRepoOption](docs/GenerateRepoOption.md) + - [GetFilesOptions](docs/GetFilesOptions.md) + - [GitBlobResponse](docs/GitBlobResponse.md) + - [GitEntry](docs/GitEntry.md) + - [GitHook](docs/GitHook.md) + - [GitObject](docs/GitObject.md) + - [GitTreeResponse](docs/GitTreeResponse.md) + - [GitignoreTemplateInfo](docs/GitignoreTemplateInfo.md) + - [Hook](docs/Hook.md) + - [Identity](docs/Identity.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InternalTracker](docs/InternalTracker.md) + - [Issue](docs/Issue.md) + - [IssueConfig](docs/IssueConfig.md) + - [IssueConfigContactLink](docs/IssueConfigContactLink.md) + - [IssueConfigValidation](docs/IssueConfigValidation.md) + - [IssueDeadline](docs/IssueDeadline.md) + - [IssueFormField](docs/IssueFormField.md) + - [IssueFormFieldType](docs/IssueFormFieldType.md) + - [IssueFormFieldVisible](docs/IssueFormFieldVisible.md) + - [IssueLabelsOption](docs/IssueLabelsOption.md) + - [IssueMeta](docs/IssueMeta.md) + - [IssueTemplate](docs/IssueTemplate.md) + - [IssueTemplateStringSlice](docs/IssueTemplateStringSlice.md) + - [Label](docs/Label.md) + - [LabelTemplate](docs/LabelTemplate.md) + - [LicenseTemplateInfo](docs/LicenseTemplateInfo.md) + - [LicensesTemplateListEntry](docs/LicensesTemplateListEntry.md) + - [LockIssueOption](docs/LockIssueOption.md) + - [MarkdownOption](docs/MarkdownOption.md) + - [MarkupOption](docs/MarkupOption.md) + - [MergePullRequestOption](docs/MergePullRequestOption.md) + - [MergeUpstreamRequest](docs/MergeUpstreamRequest.md) + - [MergeUpstreamResponse](docs/MergeUpstreamResponse.md) + - [MigrateRepoOptions](docs/MigrateRepoOptions.md) + - [Milestone](docs/Milestone.md) + - [NewIssuePinsAllowed](docs/NewIssuePinsAllowed.md) + - [NodeInfo](docs/NodeInfo.md) + - [NodeInfoServices](docs/NodeInfoServices.md) + - [NodeInfoSoftware](docs/NodeInfoSoftware.md) + - [NodeInfoUsage](docs/NodeInfoUsage.md) + - [NodeInfoUsageUsers](docs/NodeInfoUsageUsers.md) + - [Note](docs/Note.md) + - [NotificationCount](docs/NotificationCount.md) + - [NotificationSubject](docs/NotificationSubject.md) + - [NotificationThread](docs/NotificationThread.md) + - [NotifySubjectType](docs/NotifySubjectType.md) + - [OAuth2Application](docs/OAuth2Application.md) + - [Organization](docs/Organization.md) + - [OrganizationPermissions](docs/OrganizationPermissions.md) + - [PRBranchInfo](docs/PRBranchInfo.md) + - [Package](docs/Package.md) + - [PackageFile](docs/PackageFile.md) + - [PayloadCommit](docs/PayloadCommit.md) + - [PayloadCommitVerification](docs/PayloadCommitVerification.md) + - [PayloadUser](docs/PayloadUser.md) + - [Permission](docs/Permission.md) + - [PublicKey](docs/PublicKey.md) + - [PullRequest](docs/PullRequest.md) + - [PullRequestMeta](docs/PullRequestMeta.md) + - [PullReview](docs/PullReview.md) + - [PullReviewComment](docs/PullReviewComment.md) + - [PullReviewRequestOptions](docs/PullReviewRequestOptions.md) + - [PushMirror](docs/PushMirror.md) + - [Reaction](docs/Reaction.md) + - [Reference](docs/Reference.md) + - [Release](docs/Release.md) + - [RenameBranchRepoOption](docs/RenameBranchRepoOption.md) + - [RenameOrgOption](docs/RenameOrgOption.md) + - [RenameUserOption](docs/RenameUserOption.md) + - [RepoCollaboratorPermission](docs/RepoCollaboratorPermission.md) + - [RepoCommit](docs/RepoCommit.md) + - [RepoTopicOptions](docs/RepoTopicOptions.md) + - [RepoTransfer](docs/RepoTransfer.md) + - [Repository](docs/Repository.md) + - [RepositoryMeta](docs/RepositoryMeta.md) + - [ReviewStateType](docs/ReviewStateType.md) + - [SearchResults](docs/SearchResults.md) + - [Secret](docs/Secret.md) + - [ServerVersion](docs/ServerVersion.md) + - [StateType](docs/StateType.md) + - [StopWatch](docs/StopWatch.md) + - [SubmitPullReviewOptions](docs/SubmitPullReviewOptions.md) + - [Tag](docs/Tag.md) + - [TagProtection](docs/TagProtection.md) + - [Team](docs/Team.md) + - [TimeStamp](docs/TimeStamp.md) + - [TimelineComment](docs/TimelineComment.md) + - [TopicName](docs/TopicName.md) + - [TopicResponse](docs/TopicResponse.md) + - [TrackedTime](docs/TrackedTime.md) + - [TransferRepoOption](docs/TransferRepoOption.md) + - [UpdateBranchProtectionPriories](docs/UpdateBranchProtectionPriories.md) + - [UpdateFileOptions](docs/UpdateFileOptions.md) + - [UpdateRepoAvatarOption](docs/UpdateRepoAvatarOption.md) + - [UpdateUserAvatarOption](docs/UpdateUserAvatarOption.md) + - [UpdateVariableOption](docs/UpdateVariableOption.md) + - [User](docs/User.md) + - [UserBadgeOption](docs/UserBadgeOption.md) + - [UserHeatmapData](docs/UserHeatmapData.md) + - [UserSettings](docs/UserSettings.md) + - [UserSettingsOptions](docs/UserSettingsOptions.md) + - [WatchInfo](docs/WatchInfo.md) + - [WikiCommit](docs/WikiCommit.md) + - [WikiCommitList](docs/WikiCommitList.md) + - [WikiPage](docs/WikiPage.md) + - [WikiPageMetaData](docs/WikiPageMetaData.md) + + +## Documentation For Authorization + + +## AccessToken + +- **Type**: API key +- **API key parameter name**: access_token +- **Location**: URL query string + +## AuthorizationHeaderToken + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + +## BasicAuth + +- **Type**: HTTP basic authentication + +## SudoHeader + +- **Type**: API key +- **API key parameter name**: Sudo +- **Location**: HTTP header + +## SudoParam + +- **Type**: API key +- **API key parameter name**: sudo +- **Location**: URL query string + +## TOTPHeader + +- **Type**: API key +- **API key parameter name**: X-GITEA-OTP +- **Location**: HTTP header + +## Token + +- **Type**: API key +- **API key parameter name**: token +- **Location**: URL query string + + +## Author + + + diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..8bfd5a1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,4 @@ +[egg_info] +tag_build = +tag_date = 0 + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..5208344 --- /dev/null +++ b/setup.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "swagger-client" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "certifi>=2017.4.17", + "python-dateutil>=2.1", + "six>=1.10", + "urllib3>=1.23" +] + + +setup( + name=NAME, + version=VERSION, + description="Gitea API", + author_email="", + url="", + keywords=["Swagger", "Gitea API"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + This documentation describes the Gitea API. # noqa: E501 + """ +) diff --git a/swagger_client.egg-info/PKG-INFO b/swagger_client.egg-info/PKG-INFO new file mode 100644 index 0000000..b97f4bb --- /dev/null +++ b/swagger_client.egg-info/PKG-INFO @@ -0,0 +1,18 @@ +Metadata-Version: 2.4 +Name: swagger-client +Version: 1.0.0 +Summary: Gitea API +Home-page: +Author-email: +Keywords: Swagger,Gitea API +Requires-Dist: certifi>=2017.4.17 +Requires-Dist: python-dateutil>=2.1 +Requires-Dist: six>=1.10 +Requires-Dist: urllib3>=1.23 +Dynamic: description +Dynamic: keywords +Dynamic: requires-dist +Dynamic: summary + + This documentation describes the Gitea API. # noqa: E501 + diff --git a/swagger_client.egg-info/SOURCES.txt b/swagger_client.egg-info/SOURCES.txt new file mode 100644 index 0000000..163232c --- /dev/null +++ b/swagger_client.egg-info/SOURCES.txt @@ -0,0 +1,470 @@ +README.md +setup.py +swagger_client/__init__.py +swagger_client/api_client.py +swagger_client/configuration.py +swagger_client/rest.py +swagger_client.egg-info/PKG-INFO +swagger_client.egg-info/SOURCES.txt +swagger_client.egg-info/dependency_links.txt +swagger_client.egg-info/requires.txt +swagger_client.egg-info/top_level.txt +swagger_client/api/__init__.py +swagger_client/api/activitypub_api.py +swagger_client/api/admin_api.py +swagger_client/api/issue_api.py +swagger_client/api/miscellaneous_api.py +swagger_client/api/notification_api.py +swagger_client/api/organization_api.py +swagger_client/api/package_api.py +swagger_client/api/repository_api.py +swagger_client/api/settings_api.py +swagger_client/api/user_api.py +swagger_client/models/__init__.py +swagger_client/models/access_token.py +swagger_client/models/action_artifact.py +swagger_client/models/action_artifacts_response.py +swagger_client/models/action_runner.py +swagger_client/models/action_runner_label.py +swagger_client/models/action_runners_response.py +swagger_client/models/action_task.py +swagger_client/models/action_task_response.py +swagger_client/models/action_variable.py +swagger_client/models/action_workflow.py +swagger_client/models/action_workflow_job.py +swagger_client/models/action_workflow_jobs_response.py +swagger_client/models/action_workflow_response.py +swagger_client/models/action_workflow_run.py +swagger_client/models/action_workflow_runs_response.py +swagger_client/models/action_workflow_step.py +swagger_client/models/activity.py +swagger_client/models/activity_pub.py +swagger_client/models/add_collaborator_option.py +swagger_client/models/add_time_option.py +swagger_client/models/annotated_tag.py +swagger_client/models/annotated_tag_object.py +swagger_client/models/api_error.py +swagger_client/models/apply_diff_patch_file_options.py +swagger_client/models/attachment.py +swagger_client/models/badge.py +swagger_client/models/branch.py +swagger_client/models/branch_protection.py +swagger_client/models/change_file_operation.py +swagger_client/models/change_files_options.py +swagger_client/models/changed_file.py +swagger_client/models/combined_status.py +swagger_client/models/comment.py +swagger_client/models/commit.py +swagger_client/models/commit_affected_files.py +swagger_client/models/commit_date_options.py +swagger_client/models/commit_meta.py +swagger_client/models/commit_stats.py +swagger_client/models/commit_status.py +swagger_client/models/commit_user.py +swagger_client/models/compare.py +swagger_client/models/contents_ext_response.py +swagger_client/models/contents_response.py +swagger_client/models/create_access_token_option.py +swagger_client/models/create_action_workflow_dispatch.py +swagger_client/models/create_branch_protection_option.py +swagger_client/models/create_branch_repo_option.py +swagger_client/models/create_email_option.py +swagger_client/models/create_file_options.py +swagger_client/models/create_fork_option.py +swagger_client/models/create_gpg_key_option.py +swagger_client/models/create_hook_option.py +swagger_client/models/create_hook_option_config.py +swagger_client/models/create_issue_comment_option.py +swagger_client/models/create_issue_option.py +swagger_client/models/create_key_option.py +swagger_client/models/create_label_option.py +swagger_client/models/create_milestone_option.py +swagger_client/models/create_o_auth2_application_options.py +swagger_client/models/create_or_update_secret_option.py +swagger_client/models/create_org_option.py +swagger_client/models/create_pull_request_option.py +swagger_client/models/create_pull_review_comment.py +swagger_client/models/create_pull_review_options.py +swagger_client/models/create_push_mirror_option.py +swagger_client/models/create_release_option.py +swagger_client/models/create_repo_option.py +swagger_client/models/create_status_option.py +swagger_client/models/create_tag_option.py +swagger_client/models/create_tag_protection_option.py +swagger_client/models/create_team_option.py +swagger_client/models/create_user_option.py +swagger_client/models/create_variable_option.py +swagger_client/models/create_wiki_page_options.py +swagger_client/models/cron.py +swagger_client/models/delete_email_option.py +swagger_client/models/delete_file_options.py +swagger_client/models/deploy_key.py +swagger_client/models/dismiss_pull_review_options.py +swagger_client/models/edit_attachment_options.py +swagger_client/models/edit_branch_protection_option.py +swagger_client/models/edit_deadline_option.py +swagger_client/models/edit_git_hook_option.py +swagger_client/models/edit_hook_option.py +swagger_client/models/edit_issue_comment_option.py +swagger_client/models/edit_issue_option.py +swagger_client/models/edit_label_option.py +swagger_client/models/edit_milestone_option.py +swagger_client/models/edit_org_option.py +swagger_client/models/edit_pull_request_option.py +swagger_client/models/edit_reaction_option.py +swagger_client/models/edit_release_option.py +swagger_client/models/edit_repo_option.py +swagger_client/models/edit_tag_protection_option.py +swagger_client/models/edit_team_option.py +swagger_client/models/edit_user_option.py +swagger_client/models/email.py +swagger_client/models/external_tracker.py +swagger_client/models/external_wiki.py +swagger_client/models/file_commit_response.py +swagger_client/models/file_delete_response.py +swagger_client/models/file_links_response.py +swagger_client/models/file_response.py +swagger_client/models/files_response.py +swagger_client/models/general_api_settings.py +swagger_client/models/general_attachment_settings.py +swagger_client/models/general_repo_settings.py +swagger_client/models/general_ui_settings.py +swagger_client/models/generate_repo_option.py +swagger_client/models/get_files_options.py +swagger_client/models/git_blob_response.py +swagger_client/models/git_entry.py +swagger_client/models/git_hook.py +swagger_client/models/git_object.py +swagger_client/models/git_tree_response.py +swagger_client/models/gitignore_template_info.py +swagger_client/models/gpg_key.py +swagger_client/models/gpg_key_email.py +swagger_client/models/hook.py +swagger_client/models/identity.py +swagger_client/models/inline_response200.py +swagger_client/models/inline_response2001.py +swagger_client/models/internal_tracker.py +swagger_client/models/issue.py +swagger_client/models/issue_config.py +swagger_client/models/issue_config_contact_link.py +swagger_client/models/issue_config_validation.py +swagger_client/models/issue_deadline.py +swagger_client/models/issue_form_field.py +swagger_client/models/issue_form_field_type.py +swagger_client/models/issue_form_field_visible.py +swagger_client/models/issue_labels_option.py +swagger_client/models/issue_meta.py +swagger_client/models/issue_template.py +swagger_client/models/issue_template_string_slice.py +swagger_client/models/label.py +swagger_client/models/label_template.py +swagger_client/models/license_template_info.py +swagger_client/models/licenses_template_list_entry.py +swagger_client/models/lock_issue_option.py +swagger_client/models/markdown_option.py +swagger_client/models/markup_option.py +swagger_client/models/merge_pull_request_option.py +swagger_client/models/merge_upstream_request.py +swagger_client/models/merge_upstream_response.py +swagger_client/models/migrate_repo_options.py +swagger_client/models/milestone.py +swagger_client/models/new_issue_pins_allowed.py +swagger_client/models/node_info.py +swagger_client/models/node_info_services.py +swagger_client/models/node_info_software.py +swagger_client/models/node_info_usage.py +swagger_client/models/node_info_usage_users.py +swagger_client/models/note.py +swagger_client/models/notification_count.py +swagger_client/models/notification_subject.py +swagger_client/models/notification_thread.py +swagger_client/models/notify_subject_type.py +swagger_client/models/o_auth2_application.py +swagger_client/models/organization.py +swagger_client/models/organization_permissions.py +swagger_client/models/package.py +swagger_client/models/package_file.py +swagger_client/models/payload_commit.py +swagger_client/models/payload_commit_verification.py +swagger_client/models/payload_user.py +swagger_client/models/permission.py +swagger_client/models/pr_branch_info.py +swagger_client/models/public_key.py +swagger_client/models/pull_request.py +swagger_client/models/pull_request_meta.py +swagger_client/models/pull_review.py +swagger_client/models/pull_review_comment.py +swagger_client/models/pull_review_request_options.py +swagger_client/models/push_mirror.py +swagger_client/models/reaction.py +swagger_client/models/reference.py +swagger_client/models/release.py +swagger_client/models/rename_branch_repo_option.py +swagger_client/models/rename_org_option.py +swagger_client/models/rename_user_option.py +swagger_client/models/repo_collaborator_permission.py +swagger_client/models/repo_commit.py +swagger_client/models/repo_topic_options.py +swagger_client/models/repo_transfer.py +swagger_client/models/repository.py +swagger_client/models/repository_meta.py +swagger_client/models/review_state_type.py +swagger_client/models/search_results.py +swagger_client/models/secret.py +swagger_client/models/server_version.py +swagger_client/models/state_type.py +swagger_client/models/stop_watch.py +swagger_client/models/submit_pull_review_options.py +swagger_client/models/tag.py +swagger_client/models/tag_protection.py +swagger_client/models/team.py +swagger_client/models/time_stamp.py +swagger_client/models/timeline_comment.py +swagger_client/models/topic_name.py +swagger_client/models/topic_response.py +swagger_client/models/tracked_time.py +swagger_client/models/transfer_repo_option.py +swagger_client/models/update_branch_protection_priories.py +swagger_client/models/update_file_options.py +swagger_client/models/update_repo_avatar_option.py +swagger_client/models/update_user_avatar_option.py +swagger_client/models/update_variable_option.py +swagger_client/models/user.py +swagger_client/models/user_badge_option.py +swagger_client/models/user_heatmap_data.py +swagger_client/models/user_settings.py +swagger_client/models/user_settings_options.py +swagger_client/models/watch_info.py +swagger_client/models/wiki_commit.py +swagger_client/models/wiki_commit_list.py +swagger_client/models/wiki_page.py +swagger_client/models/wiki_page_meta_data.py +test/__init__.py +test/test_access_token.py +test/test_action_artifact.py +test/test_action_artifacts_response.py +test/test_action_runner.py +test/test_action_runner_label.py +test/test_action_runners_response.py +test/test_action_task.py +test/test_action_task_response.py +test/test_action_variable.py +test/test_action_workflow.py +test/test_action_workflow_job.py +test/test_action_workflow_jobs_response.py +test/test_action_workflow_response.py +test/test_action_workflow_run.py +test/test_action_workflow_runs_response.py +test/test_action_workflow_step.py +test/test_activity.py +test/test_activity_pub.py +test/test_activitypub_api.py +test/test_add_collaborator_option.py +test/test_add_time_option.py +test/test_admin_api.py +test/test_annotated_tag.py +test/test_annotated_tag_object.py +test/test_api_error.py +test/test_apply_diff_patch_file_options.py +test/test_attachment.py +test/test_badge.py +test/test_branch.py +test/test_branch_protection.py +test/test_change_file_operation.py +test/test_change_files_options.py +test/test_changed_file.py +test/test_combined_status.py +test/test_comment.py +test/test_commit.py +test/test_commit_affected_files.py +test/test_commit_date_options.py +test/test_commit_meta.py +test/test_commit_stats.py +test/test_commit_status.py +test/test_commit_user.py +test/test_compare.py +test/test_contents_ext_response.py +test/test_contents_response.py +test/test_create_access_token_option.py +test/test_create_action_workflow_dispatch.py +test/test_create_branch_protection_option.py +test/test_create_branch_repo_option.py +test/test_create_email_option.py +test/test_create_file_options.py +test/test_create_fork_option.py +test/test_create_gpg_key_option.py +test/test_create_hook_option.py +test/test_create_hook_option_config.py +test/test_create_issue_comment_option.py +test/test_create_issue_option.py +test/test_create_key_option.py +test/test_create_label_option.py +test/test_create_milestone_option.py +test/test_create_o_auth2_application_options.py +test/test_create_or_update_secret_option.py +test/test_create_org_option.py +test/test_create_pull_request_option.py +test/test_create_pull_review_comment.py +test/test_create_pull_review_options.py +test/test_create_push_mirror_option.py +test/test_create_release_option.py +test/test_create_repo_option.py +test/test_create_status_option.py +test/test_create_tag_option.py +test/test_create_tag_protection_option.py +test/test_create_team_option.py +test/test_create_user_option.py +test/test_create_variable_option.py +test/test_create_wiki_page_options.py +test/test_cron.py +test/test_delete_email_option.py +test/test_delete_file_options.py +test/test_deploy_key.py +test/test_dismiss_pull_review_options.py +test/test_edit_attachment_options.py +test/test_edit_branch_protection_option.py +test/test_edit_deadline_option.py +test/test_edit_git_hook_option.py +test/test_edit_hook_option.py +test/test_edit_issue_comment_option.py +test/test_edit_issue_option.py +test/test_edit_label_option.py +test/test_edit_milestone_option.py +test/test_edit_org_option.py +test/test_edit_pull_request_option.py +test/test_edit_reaction_option.py +test/test_edit_release_option.py +test/test_edit_repo_option.py +test/test_edit_tag_protection_option.py +test/test_edit_team_option.py +test/test_edit_user_option.py +test/test_email.py +test/test_external_tracker.py +test/test_external_wiki.py +test/test_file_commit_response.py +test/test_file_delete_response.py +test/test_file_links_response.py +test/test_file_response.py +test/test_files_response.py +test/test_general_api_settings.py +test/test_general_attachment_settings.py +test/test_general_repo_settings.py +test/test_general_ui_settings.py +test/test_generate_repo_option.py +test/test_get_files_options.py +test/test_git_blob_response.py +test/test_git_entry.py +test/test_git_hook.py +test/test_git_object.py +test/test_git_tree_response.py +test/test_gitignore_template_info.py +test/test_gpg_key.py +test/test_gpg_key_email.py +test/test_hook.py +test/test_identity.py +test/test_inline_response200.py +test/test_inline_response2001.py +test/test_internal_tracker.py +test/test_issue.py +test/test_issue_api.py +test/test_issue_config.py +test/test_issue_config_contact_link.py +test/test_issue_config_validation.py +test/test_issue_deadline.py +test/test_issue_form_field.py +test/test_issue_form_field_type.py +test/test_issue_form_field_visible.py +test/test_issue_labels_option.py +test/test_issue_meta.py +test/test_issue_template.py +test/test_issue_template_string_slice.py +test/test_label.py +test/test_label_template.py +test/test_license_template_info.py +test/test_licenses_template_list_entry.py +test/test_lock_issue_option.py +test/test_markdown_option.py +test/test_markup_option.py +test/test_merge_pull_request_option.py +test/test_merge_upstream_request.py +test/test_merge_upstream_response.py +test/test_migrate_repo_options.py +test/test_milestone.py +test/test_miscellaneous_api.py +test/test_new_issue_pins_allowed.py +test/test_node_info.py +test/test_node_info_services.py +test/test_node_info_software.py +test/test_node_info_usage.py +test/test_node_info_usage_users.py +test/test_note.py +test/test_notification_api.py +test/test_notification_count.py +test/test_notification_subject.py +test/test_notification_thread.py +test/test_notify_subject_type.py +test/test_o_auth2_application.py +test/test_organization.py +test/test_organization_api.py +test/test_organization_permissions.py +test/test_package.py +test/test_package_api.py +test/test_package_file.py +test/test_payload_commit.py +test/test_payload_commit_verification.py +test/test_payload_user.py +test/test_permission.py +test/test_pr_branch_info.py +test/test_public_key.py +test/test_pull_request.py +test/test_pull_request_meta.py +test/test_pull_review.py +test/test_pull_review_comment.py +test/test_pull_review_request_options.py +test/test_push_mirror.py +test/test_reaction.py +test/test_reference.py +test/test_release.py +test/test_rename_branch_repo_option.py +test/test_rename_org_option.py +test/test_rename_user_option.py +test/test_repo_collaborator_permission.py +test/test_repo_commit.py +test/test_repo_topic_options.py +test/test_repo_transfer.py +test/test_repository.py +test/test_repository_api.py +test/test_repository_meta.py +test/test_review_state_type.py +test/test_search_results.py +test/test_secret.py +test/test_server_version.py +test/test_settings_api.py +test/test_state_type.py +test/test_stop_watch.py +test/test_submit_pull_review_options.py +test/test_tag.py +test/test_tag_protection.py +test/test_team.py +test/test_time_stamp.py +test/test_timeline_comment.py +test/test_topic_name.py +test/test_topic_response.py +test/test_tracked_time.py +test/test_transfer_repo_option.py +test/test_update_branch_protection_priories.py +test/test_update_file_options.py +test/test_update_repo_avatar_option.py +test/test_update_user_avatar_option.py +test/test_update_variable_option.py +test/test_user.py +test/test_user_api.py +test/test_user_badge_option.py +test/test_user_heatmap_data.py +test/test_user_settings.py +test/test_user_settings_options.py +test/test_watch_info.py +test/test_wiki_commit.py +test/test_wiki_commit_list.py +test/test_wiki_page.py +test/test_wiki_page_meta_data.py \ No newline at end of file diff --git a/swagger_client.egg-info/dependency_links.txt b/swagger_client.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/swagger_client.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/swagger_client.egg-info/requires.txt b/swagger_client.egg-info/requires.txt new file mode 100644 index 0000000..50f5a75 --- /dev/null +++ b/swagger_client.egg-info/requires.txt @@ -0,0 +1,4 @@ +certifi>=2017.4.17 +python-dateutil>=2.1 +six>=1.10 +urllib3>=1.23 diff --git a/swagger_client.egg-info/top_level.txt b/swagger_client.egg-info/top_level.txt new file mode 100644 index 0000000..e6f1f16 --- /dev/null +++ b/swagger_client.egg-info/top_level.txt @@ -0,0 +1,2 @@ +swagger_client +test diff --git a/swagger_client/__init__.py b/swagger_client/__init__.py new file mode 100644 index 0000000..ce802e9 --- /dev/null +++ b/swagger_client/__init__.py @@ -0,0 +1,251 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import apis into sdk package +from swagger_client.api.activitypub_api import ActivitypubApi +from swagger_client.api.admin_api import AdminApi +from swagger_client.api.issue_api import IssueApi +from swagger_client.api.miscellaneous_api import MiscellaneousApi +from swagger_client.api.notification_api import NotificationApi +from swagger_client.api.organization_api import OrganizationApi +from swagger_client.api.package_api import PackageApi +from swagger_client.api.repository_api import RepositoryApi +from swagger_client.api.settings_api import SettingsApi +from swagger_client.api.user_api import UserApi + +# import ApiClient +from swagger_client.api_client import ApiClient +from swagger_client.configuration import Configuration +# import models into sdk package +from swagger_client.models.api_error import APIError +from swagger_client.models.access_token import AccessToken +from swagger_client.models.action_artifact import ActionArtifact +from swagger_client.models.action_artifacts_response import ActionArtifactsResponse +from swagger_client.models.action_runner import ActionRunner +from swagger_client.models.action_runner_label import ActionRunnerLabel +from swagger_client.models.action_runners_response import ActionRunnersResponse +from swagger_client.models.action_task import ActionTask +from swagger_client.models.action_task_response import ActionTaskResponse +from swagger_client.models.action_variable import ActionVariable +from swagger_client.models.action_workflow import ActionWorkflow +from swagger_client.models.action_workflow_job import ActionWorkflowJob +from swagger_client.models.action_workflow_jobs_response import ActionWorkflowJobsResponse +from swagger_client.models.action_workflow_response import ActionWorkflowResponse +from swagger_client.models.action_workflow_run import ActionWorkflowRun +from swagger_client.models.action_workflow_runs_response import ActionWorkflowRunsResponse +from swagger_client.models.action_workflow_step import ActionWorkflowStep +from swagger_client.models.activity import Activity +from swagger_client.models.activity_pub import ActivityPub +from swagger_client.models.add_collaborator_option import AddCollaboratorOption +from swagger_client.models.add_time_option import AddTimeOption +from swagger_client.models.annotated_tag import AnnotatedTag +from swagger_client.models.annotated_tag_object import AnnotatedTagObject +from swagger_client.models.apply_diff_patch_file_options import ApplyDiffPatchFileOptions +from swagger_client.models.attachment import Attachment +from swagger_client.models.badge import Badge +from swagger_client.models.branch import Branch +from swagger_client.models.branch_protection import BranchProtection +from swagger_client.models.change_file_operation import ChangeFileOperation +from swagger_client.models.change_files_options import ChangeFilesOptions +from swagger_client.models.changed_file import ChangedFile +from swagger_client.models.combined_status import CombinedStatus +from swagger_client.models.comment import Comment +from swagger_client.models.commit import Commit +from swagger_client.models.commit_affected_files import CommitAffectedFiles +from swagger_client.models.commit_date_options import CommitDateOptions +from swagger_client.models.commit_meta import CommitMeta +from swagger_client.models.commit_stats import CommitStats +from swagger_client.models.commit_status import CommitStatus +from swagger_client.models.commit_user import CommitUser +from swagger_client.models.compare import Compare +from swagger_client.models.contents_ext_response import ContentsExtResponse +from swagger_client.models.contents_response import ContentsResponse +from swagger_client.models.create_access_token_option import CreateAccessTokenOption +from swagger_client.models.create_action_workflow_dispatch import CreateActionWorkflowDispatch +from swagger_client.models.create_branch_protection_option import CreateBranchProtectionOption +from swagger_client.models.create_branch_repo_option import CreateBranchRepoOption +from swagger_client.models.create_email_option import CreateEmailOption +from swagger_client.models.create_file_options import CreateFileOptions +from swagger_client.models.create_fork_option import CreateForkOption +from swagger_client.models.create_gpg_key_option import CreateGPGKeyOption +from swagger_client.models.create_hook_option import CreateHookOption +from swagger_client.models.create_hook_option_config import CreateHookOptionConfig +from swagger_client.models.create_issue_comment_option import CreateIssueCommentOption +from swagger_client.models.create_issue_option import CreateIssueOption +from swagger_client.models.create_key_option import CreateKeyOption +from swagger_client.models.create_label_option import CreateLabelOption +from swagger_client.models.create_milestone_option import CreateMilestoneOption +from swagger_client.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions +from swagger_client.models.create_or_update_secret_option import CreateOrUpdateSecretOption +from swagger_client.models.create_org_option import CreateOrgOption +from swagger_client.models.create_pull_request_option import CreatePullRequestOption +from swagger_client.models.create_pull_review_comment import CreatePullReviewComment +from swagger_client.models.create_pull_review_options import CreatePullReviewOptions +from swagger_client.models.create_push_mirror_option import CreatePushMirrorOption +from swagger_client.models.create_release_option import CreateReleaseOption +from swagger_client.models.create_repo_option import CreateRepoOption +from swagger_client.models.create_status_option import CreateStatusOption +from swagger_client.models.create_tag_option import CreateTagOption +from swagger_client.models.create_tag_protection_option import CreateTagProtectionOption +from swagger_client.models.create_team_option import CreateTeamOption +from swagger_client.models.create_user_option import CreateUserOption +from swagger_client.models.create_variable_option import CreateVariableOption +from swagger_client.models.create_wiki_page_options import CreateWikiPageOptions +from swagger_client.models.cron import Cron +from swagger_client.models.delete_email_option import DeleteEmailOption +from swagger_client.models.delete_file_options import DeleteFileOptions +from swagger_client.models.deploy_key import DeployKey +from swagger_client.models.dismiss_pull_review_options import DismissPullReviewOptions +from swagger_client.models.edit_attachment_options import EditAttachmentOptions +from swagger_client.models.edit_branch_protection_option import EditBranchProtectionOption +from swagger_client.models.edit_deadline_option import EditDeadlineOption +from swagger_client.models.edit_git_hook_option import EditGitHookOption +from swagger_client.models.edit_hook_option import EditHookOption +from swagger_client.models.edit_issue_comment_option import EditIssueCommentOption +from swagger_client.models.edit_issue_option import EditIssueOption +from swagger_client.models.edit_label_option import EditLabelOption +from swagger_client.models.edit_milestone_option import EditMilestoneOption +from swagger_client.models.edit_org_option import EditOrgOption +from swagger_client.models.edit_pull_request_option import EditPullRequestOption +from swagger_client.models.edit_reaction_option import EditReactionOption +from swagger_client.models.edit_release_option import EditReleaseOption +from swagger_client.models.edit_repo_option import EditRepoOption +from swagger_client.models.edit_tag_protection_option import EditTagProtectionOption +from swagger_client.models.edit_team_option import EditTeamOption +from swagger_client.models.edit_user_option import EditUserOption +from swagger_client.models.email import Email +from swagger_client.models.external_tracker import ExternalTracker +from swagger_client.models.external_wiki import ExternalWiki +from swagger_client.models.file_commit_response import FileCommitResponse +from swagger_client.models.file_delete_response import FileDeleteResponse +from swagger_client.models.file_links_response import FileLinksResponse +from swagger_client.models.file_response import FileResponse +from swagger_client.models.files_response import FilesResponse +from swagger_client.models.gpg_key import GPGKey +from swagger_client.models.gpg_key_email import GPGKeyEmail +from swagger_client.models.general_api_settings import GeneralAPISettings +from swagger_client.models.general_attachment_settings import GeneralAttachmentSettings +from swagger_client.models.general_repo_settings import GeneralRepoSettings +from swagger_client.models.general_ui_settings import GeneralUISettings +from swagger_client.models.generate_repo_option import GenerateRepoOption +from swagger_client.models.get_files_options import GetFilesOptions +from swagger_client.models.git_blob_response import GitBlobResponse +from swagger_client.models.git_entry import GitEntry +from swagger_client.models.git_hook import GitHook +from swagger_client.models.git_object import GitObject +from swagger_client.models.git_tree_response import GitTreeResponse +from swagger_client.models.gitignore_template_info import GitignoreTemplateInfo +from swagger_client.models.hook import Hook +from swagger_client.models.identity import Identity +from swagger_client.models.inline_response200 import InlineResponse200 +from swagger_client.models.inline_response2001 import InlineResponse2001 +from swagger_client.models.internal_tracker import InternalTracker +from swagger_client.models.issue import Issue +from swagger_client.models.issue_config import IssueConfig +from swagger_client.models.issue_config_contact_link import IssueConfigContactLink +from swagger_client.models.issue_config_validation import IssueConfigValidation +from swagger_client.models.issue_deadline import IssueDeadline +from swagger_client.models.issue_form_field import IssueFormField +from swagger_client.models.issue_form_field_type import IssueFormFieldType +from swagger_client.models.issue_form_field_visible import IssueFormFieldVisible +from swagger_client.models.issue_labels_option import IssueLabelsOption +from swagger_client.models.issue_meta import IssueMeta +from swagger_client.models.issue_template import IssueTemplate +from swagger_client.models.issue_template_string_slice import IssueTemplateStringSlice +from swagger_client.models.label import Label +from swagger_client.models.label_template import LabelTemplate +from swagger_client.models.license_template_info import LicenseTemplateInfo +from swagger_client.models.licenses_template_list_entry import LicensesTemplateListEntry +from swagger_client.models.lock_issue_option import LockIssueOption +from swagger_client.models.markdown_option import MarkdownOption +from swagger_client.models.markup_option import MarkupOption +from swagger_client.models.merge_pull_request_option import MergePullRequestOption +from swagger_client.models.merge_upstream_request import MergeUpstreamRequest +from swagger_client.models.merge_upstream_response import MergeUpstreamResponse +from swagger_client.models.migrate_repo_options import MigrateRepoOptions +from swagger_client.models.milestone import Milestone +from swagger_client.models.new_issue_pins_allowed import NewIssuePinsAllowed +from swagger_client.models.node_info import NodeInfo +from swagger_client.models.node_info_services import NodeInfoServices +from swagger_client.models.node_info_software import NodeInfoSoftware +from swagger_client.models.node_info_usage import NodeInfoUsage +from swagger_client.models.node_info_usage_users import NodeInfoUsageUsers +from swagger_client.models.note import Note +from swagger_client.models.notification_count import NotificationCount +from swagger_client.models.notification_subject import NotificationSubject +from swagger_client.models.notification_thread import NotificationThread +from swagger_client.models.notify_subject_type import NotifySubjectType +from swagger_client.models.o_auth2_application import OAuth2Application +from swagger_client.models.organization import Organization +from swagger_client.models.organization_permissions import OrganizationPermissions +from swagger_client.models.pr_branch_info import PRBranchInfo +from swagger_client.models.package import Package +from swagger_client.models.package_file import PackageFile +from swagger_client.models.payload_commit import PayloadCommit +from swagger_client.models.payload_commit_verification import PayloadCommitVerification +from swagger_client.models.payload_user import PayloadUser +from swagger_client.models.permission import Permission +from swagger_client.models.public_key import PublicKey +from swagger_client.models.pull_request import PullRequest +from swagger_client.models.pull_request_meta import PullRequestMeta +from swagger_client.models.pull_review import PullReview +from swagger_client.models.pull_review_comment import PullReviewComment +from swagger_client.models.pull_review_request_options import PullReviewRequestOptions +from swagger_client.models.push_mirror import PushMirror +from swagger_client.models.reaction import Reaction +from swagger_client.models.reference import Reference +from swagger_client.models.release import Release +from swagger_client.models.rename_branch_repo_option import RenameBranchRepoOption +from swagger_client.models.rename_org_option import RenameOrgOption +from swagger_client.models.rename_user_option import RenameUserOption +from swagger_client.models.repo_collaborator_permission import RepoCollaboratorPermission +from swagger_client.models.repo_commit import RepoCommit +from swagger_client.models.repo_topic_options import RepoTopicOptions +from swagger_client.models.repo_transfer import RepoTransfer +from swagger_client.models.repository import Repository +from swagger_client.models.repository_meta import RepositoryMeta +from swagger_client.models.review_state_type import ReviewStateType +from swagger_client.models.search_results import SearchResults +from swagger_client.models.secret import Secret +from swagger_client.models.server_version import ServerVersion +from swagger_client.models.state_type import StateType +from swagger_client.models.stop_watch import StopWatch +from swagger_client.models.submit_pull_review_options import SubmitPullReviewOptions +from swagger_client.models.tag import Tag +from swagger_client.models.tag_protection import TagProtection +from swagger_client.models.team import Team +from swagger_client.models.time_stamp import TimeStamp +from swagger_client.models.timeline_comment import TimelineComment +from swagger_client.models.topic_name import TopicName +from swagger_client.models.topic_response import TopicResponse +from swagger_client.models.tracked_time import TrackedTime +from swagger_client.models.transfer_repo_option import TransferRepoOption +from swagger_client.models.update_branch_protection_priories import UpdateBranchProtectionPriories +from swagger_client.models.update_file_options import UpdateFileOptions +from swagger_client.models.update_repo_avatar_option import UpdateRepoAvatarOption +from swagger_client.models.update_user_avatar_option import UpdateUserAvatarOption +from swagger_client.models.update_variable_option import UpdateVariableOption +from swagger_client.models.user import User +from swagger_client.models.user_badge_option import UserBadgeOption +from swagger_client.models.user_heatmap_data import UserHeatmapData +from swagger_client.models.user_settings import UserSettings +from swagger_client.models.user_settings_options import UserSettingsOptions +from swagger_client.models.watch_info import WatchInfo +from swagger_client.models.wiki_commit import WikiCommit +from swagger_client.models.wiki_commit_list import WikiCommitList +from swagger_client.models.wiki_page import WikiPage +from swagger_client.models.wiki_page_meta_data import WikiPageMetaData diff --git a/swagger_client/api/__init__.py b/swagger_client/api/__init__.py new file mode 100644 index 0000000..d21ad5d --- /dev/null +++ b/swagger_client/api/__init__.py @@ -0,0 +1,15 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from swagger_client.api.activitypub_api import ActivitypubApi +from swagger_client.api.admin_api import AdminApi +from swagger_client.api.issue_api import IssueApi +from swagger_client.api.miscellaneous_api import MiscellaneousApi +from swagger_client.api.notification_api import NotificationApi +from swagger_client.api.organization_api import OrganizationApi +from swagger_client.api.package_api import PackageApi +from swagger_client.api.repository_api import RepositoryApi +from swagger_client.api.settings_api import SettingsApi +from swagger_client.api.user_api import UserApi diff --git a/swagger_client/api/activitypub_api.py b/swagger_client/api/activitypub_api.py new file mode 100644 index 0000000..b47dd04 --- /dev/null +++ b/swagger_client/api/activitypub_api.py @@ -0,0 +1,228 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class ActivitypubApi(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 activitypub_person(self, user_id, **kwargs): # noqa: E501 + """Returns the Person actor 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.activitypub_person(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int user_id: user ID of the user (required) + :return: ActivityPub + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.activitypub_person_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.activitypub_person_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def activitypub_person_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Returns the Person actor 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.activitypub_person_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int user_id: user ID of the user (required) + :return: ActivityPub + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_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 activitypub_person" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in params or + params['user_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user_id` when calling `activitypub_person`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in params: + path_params['user-id'] = params['user_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/activitypub/user-id/{user-id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActivityPub', # 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 activitypub_person_inbox(self, user_id, **kwargs): # noqa: E501 + """Send to the 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.activitypub_person_inbox(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int user_id: user ID of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.activitypub_person_inbox_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.activitypub_person_inbox_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def activitypub_person_inbox_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Send to the 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.activitypub_person_inbox_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int user_id: user ID of the user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_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 activitypub_person_inbox" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in params or + params['user_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user_id` when calling `activitypub_person_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in params: + path_params['user-id'] = params['user_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/activitypub/user-id/{user-id}/inbox', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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/swagger_client/api/admin_api.py b/swagger_client/api/admin_api.py new file mode 100644 index 0000000..9db155d --- /dev/null +++ b/swagger_client/api/admin_api.py @@ -0,0 +1,3226 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class AdminApi(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 admin_add_user_badges(self, username, **kwargs): # noqa: E501 + """Add a badge to 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.admin_add_user_badges(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to whom a badge is to be added (required) + :param UserBadgeOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_add_user_badges_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_add_user_badges_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_add_user_badges_with_http_info(self, username, **kwargs): # noqa: E501 + """Add a badge to 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.admin_add_user_badges_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to whom a badge is to be added (required) + :param UserBadgeOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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 admin_add_user_badges" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_add_user_badges`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/badges', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_adopt_repository(self, owner, repo, **kwargs): # noqa: E501 + """Adopt unadopted files as a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_adopt_repository(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_adopt_repository_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.admin_adopt_repository_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def admin_adopt_repository_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Adopt unadopted files as a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_adopt_repository_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 admin_adopt_repository" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `admin_adopt_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `admin_adopt_repository`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/unadopted/{owner}/{repo}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_create_hook(self, body, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_hook(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateHookOption body: (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_hook_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_hook_with_http_info(body, **kwargs) # noqa: E501 + return data + + def admin_create_hook_with_http_info(self, body, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_hook_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateHookOption body: (required) + :return: Hook + 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 admin_create_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `admin_create_hook`") # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/hooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 admin_create_org(self, username, organization, **kwargs): # noqa: E501 + """Create an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_org(username, organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user who will own the created organization (required) + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_org_with_http_info(username, organization, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_org_with_http_info(username, organization, **kwargs) # noqa: E501 + return data + + def admin_create_org_with_http_info(self, username, organization, **kwargs): # noqa: E501 + """Create an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_org_with_http_info(username, organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user who will own the created organization (required) + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'organization'] # 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 admin_create_org" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_create_org`") # noqa: E501 + # verify the required parameter 'organization' is set + if self.api_client.client_side_validation and ('organization' not in params or + params['organization'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `organization` when calling `admin_create_org`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'organization' in params: + body_params = params['organization'] + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/orgs', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Organization', # 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 admin_create_public_key(self, username, **kwargs): # noqa: E501 + """Add a public key on behalf 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.admin_create_public_key(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user who is to receive a public key (required) + :param CreateKeyOption key: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_public_key_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_public_key_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_create_public_key_with_http_info(self, username, **kwargs): # noqa: E501 + """Add a public key on behalf 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.admin_create_public_key_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user who is to receive a public key (required) + :param CreateKeyOption key: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'key'] # 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 admin_create_public_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_create_public_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'key' in params: + body_params = params['key'] + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKey', # 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 admin_create_repo(self, username, repository, **kwargs): # noqa: E501 + """Create a repository on behalf 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.admin_create_repo(username, repository, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user who will own the created repository (required) + :param CreateRepoOption repository: (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_repo_with_http_info(username, repository, **kwargs) # noqa: E501 + else: + (data) = self.admin_create_repo_with_http_info(username, repository, **kwargs) # noqa: E501 + return data + + def admin_create_repo_with_http_info(self, username, repository, **kwargs): # noqa: E501 + """Create a repository on behalf 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.admin_create_repo_with_http_info(username, repository, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user who will own the created repository (required) + :param CreateRepoOption repository: (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'repository'] # 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 admin_create_repo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_create_repo`") # noqa: E501 + # verify the required parameter 'repository' is set + if self.api_client.client_side_validation and ('repository' not in params or + params['repository'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repository` when calling `admin_create_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'repository' in params: + body_params = params['repository'] + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 admin_create_runner_registration_token(self, **kwargs): # noqa: E501 + """Get an global actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_runner_registration_token(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_create_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_create_runner_registration_token_with_http_info(self, **kwargs): # noqa: E501 + """Get an global actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_create_runner_registration_token_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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 admin_create_runner_registration_token" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/actions/runners/registration-token', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_create_user(self, **kwargs): # noqa: E501 + """Create 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.admin_create_user(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_create_user_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_create_user_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_create_user_with_http_info(self, **kwargs): # noqa: E501 + """Create 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.admin_create_user_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateUserOption body: + :return: User + 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 admin_create_user" % key + ) + params[key] = val + del params['kwargs'] + + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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 admin_cron_list(self, **kwargs): # noqa: E501 + """List cron tasks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_cron_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Cron] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_cron_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_cron_list_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_cron_list_with_http_info(self, **kwargs): # noqa: E501 + """List cron tasks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_cron_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Cron] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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 admin_cron_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/cron', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Cron]', # 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 admin_cron_run(self, task, **kwargs): # noqa: E501 + """Run cron task # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_cron_run(task, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str task: task to run (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_cron_run_with_http_info(task, **kwargs) # noqa: E501 + else: + (data) = self.admin_cron_run_with_http_info(task, **kwargs) # noqa: E501 + return data + + def admin_cron_run_with_http_info(self, task, **kwargs): # noqa: E501 + """Run cron task # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_cron_run_with_http_info(task, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str task: task to run (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['task'] # 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 admin_cron_run" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'task' is set + if self.api_client.client_side_validation and ('task' not in params or + params['task'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `task` when calling `admin_cron_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'task' in params: + path_params['task'] = params['task'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/cron/{task}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_delete_hook(self, id, **kwargs): # noqa: E501 + """Delete a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_delete_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def admin_delete_hook_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to delete (required) + :return: None + 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 admin_delete_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `admin_delete_hook`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/hooks/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_delete_unadopted_repository(self, owner, repo, **kwargs): # noqa: E501 + """Delete unadopted files # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_unadopted_repository(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_delete_unadopted_repository_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_unadopted_repository_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def admin_delete_unadopted_repository_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Delete unadopted files # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_unadopted_repository_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 admin_delete_unadopted_repository" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `admin_delete_unadopted_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `admin_delete_unadopted_repository`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/unadopted/{owner}/{repo}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_delete_user(self, username, **kwargs): # noqa: E501 + """Delete 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.admin_delete_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to delete (required) + :param bool purge: purge the user from the system completely + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_delete_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_delete_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Delete 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.admin_delete_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to delete (required) + :param bool purge: purge the user from the system completely + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'purge'] # 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 admin_delete_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_delete_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'purge' in params: + query_params.append(('purge', params['purge'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_delete_user_badges(self, username, **kwargs): # noqa: E501 + """Remove a badge from 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.admin_delete_user_badges(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose badge is to be deleted (required) + :param UserBadgeOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_delete_user_badges_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_user_badges_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_delete_user_badges_with_http_info(self, username, **kwargs): # noqa: E501 + """Remove a badge from 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.admin_delete_user_badges_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose badge is to be deleted (required) + :param UserBadgeOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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 admin_delete_user_badges" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_delete_user_badges`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/badges', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_delete_user_public_key(self, username, id, **kwargs): # noqa: E501 + """Delete a user's public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user_public_key(username, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose public key is to be deleted (required) + :param int id: id of the key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_delete_user_public_key_with_http_info(username, id, **kwargs) # noqa: E501 + else: + (data) = self.admin_delete_user_public_key_with_http_info(username, id, **kwargs) # noqa: E501 + return data + + def admin_delete_user_public_key_with_http_info(self, username, id, **kwargs): # noqa: E501 + """Delete a user's public key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_delete_user_public_key_with_http_info(username, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose public key is to be deleted (required) + :param int id: id of the key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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 admin_delete_user_public_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_delete_user_public_key`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `admin_delete_user_public_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/keys/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_edit_hook(self, id, **kwargs): # noqa: E501 + """Update a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_edit_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_edit_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.admin_edit_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def admin_edit_hook_with_http_info(self, id, **kwargs): # noqa: E501 + """Update a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_edit_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', '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 admin_edit_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `admin_edit_hook`") # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/hooks/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 admin_edit_user(self, username, **kwargs): # noqa: E501 + """Edit an existing 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.admin_edit_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose data is to be edited (required) + :param EditUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_edit_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_edit_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_edit_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Edit an existing 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.admin_edit_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose data is to be edited (required) + :param EditUserOption body: + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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 admin_edit_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_edit_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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 admin_get_all_emails(self, **kwargs): # noqa: E501 + """List all emails # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_all_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_get_all_emails_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_get_all_emails_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_get_all_emails_with_http_info(self, **kwargs): # noqa: E501 + """List all emails # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_all_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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 admin_get_all_emails" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/emails', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Email]', # 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 admin_get_all_orgs(self, **kwargs): # noqa: E501 + """List all organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_all_orgs(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_get_all_orgs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_get_all_orgs_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_get_all_orgs_with_http_info(self, **kwargs): # noqa: E501 + """List all organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_all_orgs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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 admin_get_all_orgs" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Organization]', # 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 admin_get_hook(self, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to get (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_get_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.admin_get_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def admin_get_hook_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to get (required) + :return: Hook + 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 admin_get_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `admin_get_hook`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/hooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 admin_get_runner_registration_token(self, **kwargs): # noqa: E501 + """Get an global actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_runner_registration_token(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_get_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_get_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_get_runner_registration_token_with_http_info(self, **kwargs): # noqa: E501 + """Get an global actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_get_runner_registration_token_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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 admin_get_runner_registration_token" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/runners/registration-token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_list_hooks(self, **kwargs): # noqa: E501 + """List system's 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.admin_list_hooks(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str type: system, default or both kinds of webhooks + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_list_hooks_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_list_hooks_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_list_hooks_with_http_info(self, **kwargs): # noqa: E501 + """List system's 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.admin_list_hooks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str type: system, default or both kinds of webhooks + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit', '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 admin_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Hook]', # 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 admin_list_user_badges(self, username, **kwargs): # noqa: E501 + """List a user's badges # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_list_user_badges(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose badges are to be listed (required) + :return: list[Badge] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_list_user_badges_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.admin_list_user_badges_with_http_info(username, **kwargs) # noqa: E501 + return data + + def admin_list_user_badges_with_http_info(self, username, **kwargs): # noqa: E501 + """List a user's badges # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_list_user_badges_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose badges are to be listed (required) + :return: list[Badge] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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 admin_list_user_badges" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_list_user_badges`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/badges', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Badge]', # 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 admin_rename_user(self, username, body, **kwargs): # noqa: E501 + """Rename 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.admin_rename_user(username, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: current username of the user (required) + :param RenameUserOption body: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_rename_user_with_http_info(username, body, **kwargs) # noqa: E501 + else: + (data) = self.admin_rename_user_with_http_info(username, body, **kwargs) # noqa: E501 + return data + + def admin_rename_user_with_http_info(self, username, body, **kwargs): # noqa: E501 + """Rename 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.admin_rename_user_with_http_info(username, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: current username of the user (required) + :param RenameUserOption body: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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 admin_rename_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `admin_rename_user`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `admin_rename_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users/{username}/rename', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 admin_search_emails(self, **kwargs): # noqa: E501 + """Search all emails # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_search_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_search_emails_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_search_emails_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_search_emails_with_http_info(self, **kwargs): # noqa: E501 + """Search all emails # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_search_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'page', 'limit'] # 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 admin_search_emails" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/emails/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Email]', # 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 admin_search_users(self, **kwargs): # noqa: E501 + """Search users according filter conditions # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_search_users(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int source_id: ID of the user's login source to search for + :param str login_name: identifier of the user, provided by the external authenticator + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_search_users_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_search_users_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_search_users_with_http_info(self, **kwargs): # noqa: E501 + """Search users according filter conditions # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_search_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int source_id: ID of the user's login source to search for + :param str login_name: identifier of the user, provided by the external authenticator + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['source_id', 'login_name', 'page', 'limit'] # 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 admin_search_users" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'source_id' in params: + query_params.append(('source_id', params['source_id'])) # noqa: E501 + if 'login_name' in params: + query_params.append(('login_name', params['login_name'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 admin_unadopted_list(self, **kwargs): # noqa: E501 + """List unadopted repositories # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_unadopted_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str pattern: pattern of repositories to search for + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.admin_unadopted_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.admin_unadopted_list_with_http_info(**kwargs) # noqa: E501 + return data + + def admin_unadopted_list_with_http_info(self, **kwargs): # noqa: E501 + """List unadopted repositories # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.admin_unadopted_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str pattern: pattern of repositories to search for + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit', 'pattern'] # 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 admin_unadopted_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'pattern' in params: + query_params.append(('pattern', params['pattern'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/unadopted', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # 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 delete_admin_runner(self, runner_id, **kwargs): # noqa: E501 + """Delete an global runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_admin_runner(runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_admin_runner_with_http_info(runner_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_admin_runner_with_http_info(runner_id, **kwargs) # noqa: E501 + return data + + def delete_admin_runner_with_http_info(self, runner_id, **kwargs): # noqa: E501 + """Delete an global runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_admin_runner_with_http_info(runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['runner_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 delete_admin_runner" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'runner_id' is set + if self.api_client.client_side_validation and ('runner_id' not in params or + params['runner_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `runner_id` when calling `delete_admin_runner`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'runner_id' in params: + path_params['runner_id'] = params['runner_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/actions/runners/{runner_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_admin_runner(self, runner_id, **kwargs): # noqa: E501 + """Get an global runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_admin_runner(runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_admin_runner_with_http_info(runner_id, **kwargs) # noqa: E501 + else: + (data) = self.get_admin_runner_with_http_info(runner_id, **kwargs) # noqa: E501 + return data + + def get_admin_runner_with_http_info(self, runner_id, **kwargs): # noqa: E501 + """Get an global runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_admin_runner_with_http_info(runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['runner_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 get_admin_runner" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'runner_id' is set + if self.api_client.client_side_validation and ('runner_id' not in params or + params['runner_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `runner_id` when calling `get_admin_runner`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'runner_id' in params: + path_params['runner_id'] = params['runner_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/actions/runners/{runner_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_admin_runners(self, **kwargs): # noqa: E501 + """Get all runners # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_admin_runners(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_admin_runners_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_admin_runners_with_http_info(**kwargs) # noqa: E501 + return data + + def get_admin_runners_with_http_info(self, **kwargs): # noqa: E501 + """Get all runners # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_admin_runners_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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 get_admin_runners" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/actions/runners', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 list_admin_workflow_jobs(self, **kwargs): # noqa: E501 + """Lists all jobs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_admin_workflow_jobs(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_admin_workflow_jobs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_admin_workflow_jobs_with_http_info(**kwargs) # noqa: E501 + return data + + def list_admin_workflow_jobs_with_http_info(self, **kwargs): # noqa: E501 + """Lists all jobs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_admin_workflow_jobs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['status', 'page', 'limit'] # 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 list_admin_workflow_jobs" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/actions/jobs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowJobsResponse', # 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 list_admin_workflow_runs(self, **kwargs): # noqa: E501 + """Lists all runs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_admin_workflow_runs(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str event: workflow event name + :param str branch: workflow branch + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param str actor: triggered by user + :param str head_sha: triggering sha of the workflow run + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowRunsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_admin_workflow_runs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_admin_workflow_runs_with_http_info(**kwargs) # noqa: E501 + return data + + def list_admin_workflow_runs_with_http_info(self, **kwargs): # noqa: E501 + """Lists all runs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_admin_workflow_runs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str event: workflow event name + :param str branch: workflow branch + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param str actor: triggered by user + :param str head_sha: triggering sha of the workflow run + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowRunsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['event', 'branch', 'status', 'actor', 'head_sha', 'page', 'limit'] # 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 list_admin_workflow_runs" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'event' in params: + query_params.append(('event', params['event'])) # noqa: E501 + if 'branch' in params: + query_params.append(('branch', params['branch'])) # noqa: E501 + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'actor' in params: + query_params.append(('actor', params['actor'])) # noqa: E501 + if 'head_sha' in params: + query_params.append(('head_sha', params['head_sha'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/admin/actions/runs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowRunsResponse', # 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/swagger_client/api/issue_api.py b/swagger_client/api/issue_api.py new file mode 100644 index 0000000..053ff9e --- /dev/null +++ b/swagger_client/api/issue_api.py @@ -0,0 +1,8211 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class IssueApi(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 issue_add_label(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a label to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_label(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_add_label_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_add_label_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_add_label_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a label to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_label_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_add_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_add_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_add_label`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_add_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # 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 issue_add_subscription(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Subscribe user to issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_subscription(owner, repo, index, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str user: username of the user to subscribe the issue to (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_add_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + else: + (data) = self.issue_add_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + return data + + def issue_add_subscription_with_http_info(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Subscribe user to issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_subscription_with_http_info(owner, repo, index, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str user: username of the user to subscribe the issue to (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_add_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_add_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_add_subscription`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_add_subscription`") # noqa: E501 + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in params or + params['user'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user` when calling `issue_add_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'user' in params: + path_params['user'] = params['user'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_add_time(self, owner, repo, index, **kwargs): # noqa: E501 + """Add tracked time to a issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_time(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param AddTimeOption body: + :return: TrackedTime + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_add_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_add_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_add_time_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add tracked time to a issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_time_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param AddTimeOption body: + :return: TrackedTime + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_add_time" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_add_time`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_add_time`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_add_time`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/times', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TrackedTime', # 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 issue_check_subscription(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if user is subscribed to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_check_subscription(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_check_subscription_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_check_subscription_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_check_subscription_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if user is subscribed to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_check_subscription_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_check_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_check_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_check_subscription`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_check_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions/check', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WatchInfo', # 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 issue_clear_labels(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove all labels from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_clear_labels(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_clear_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_clear_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_clear_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove all labels from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_clear_labels_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_clear_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_clear_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_clear_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_clear_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_create_comment(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a comment to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_comment(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param CreateIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_comment_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_comment_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_create_comment_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a comment to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_comment_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param CreateIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_create_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_comment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_create_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Comment', # 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 issue_create_issue(self, owner, repo, **kwargs): # noqa: E501 + """Create an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_create_issue_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_create_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # 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 issue_create_issue_attachment(self, owner, repo, index, attachment, **kwargs): # noqa: E501 + """Create an issue attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_attachment(owner, repo, index, attachment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param file attachment: attachment to upload (required) + :param str name: name of the attachment + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_issue_attachment_with_http_info(owner, repo, index, attachment, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_attachment_with_http_info(owner, repo, index, attachment, **kwargs) # noqa: E501 + return data + + def issue_create_issue_attachment_with_http_info(self, owner, repo, index, attachment, **kwargs): # noqa: E501 + """Create an issue attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_attachment_with_http_info(owner, repo, index, attachment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param file attachment: attachment to upload (required) + :param str name: name of the attachment + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'attachment', '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 issue_create_issue_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue_attachment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_create_issue_attachment`") # noqa: E501 + # verify the required parameter 'attachment' is set + if self.api_client.client_side_validation and ('attachment' not in params or + params['attachment'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment` when calling `issue_create_issue_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + if 'attachment' in params: + local_var_files['attachment'] = params['attachment'] # noqa: E501 + + body_params = None + # 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 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/assets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # 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 issue_create_issue_blocking(self, owner, repo, index, **kwargs): # noqa: E501 + """Block the issue given in the body by the issue in path # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_blocking(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param IssueMeta body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_issue_blocking_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_blocking_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_create_issue_blocking_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Block the issue given in the body by the issue in path # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_blocking_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param IssueMeta body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_create_issue_blocking" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue_blocking`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue_blocking`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_create_issue_blocking`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/blocks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # 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 issue_create_issue_comment_attachment(self, owner, repo, id, attachment, **kwargs): # noqa: E501 + """Create a comment attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_comment_attachment(owner, repo, id, attachment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :param file attachment: attachment to upload (required) + :param str name: name of the attachment + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_issue_comment_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_comment_attachment_with_http_info(owner, repo, id, attachment, **kwargs) # noqa: E501 + return data + + def issue_create_issue_comment_attachment_with_http_info(self, owner, repo, id, attachment, **kwargs): # noqa: E501 + """Create a comment attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_comment_attachment_with_http_info(owner, repo, id, attachment, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :param file attachment: attachment to upload (required) + :param str name: name of the attachment + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment', '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 issue_create_issue_comment_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_create_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'attachment' is set + if self.api_client.client_side_validation and ('attachment' not in params or + params['attachment'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment` when calling `issue_create_issue_comment_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + if 'attachment' in params: + local_var_files['attachment'] = params['attachment'] # noqa: E501 + + body_params = None + # 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 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/assets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # 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 issue_create_issue_dependencies(self, owner, repo, index, **kwargs): # noqa: E501 + """Make the issue in the url depend on the issue in the form. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_dependencies(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param IssueMeta body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_create_issue_dependencies_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Make the issue in the url depend on the issue in the form. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_issue_dependencies_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param IssueMeta body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_create_issue_dependencies" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_issue_dependencies`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_issue_dependencies`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_create_issue_dependencies`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/dependencies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # 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 issue_create_label(self, owner, repo, **kwargs): # noqa: E501 + """Create a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_label(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_label_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_label_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_create_label_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_label_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_create_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # 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 issue_create_milestone(self, owner, repo, **kwargs): # noqa: E501 + """Create a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_milestone(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_create_milestone_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_create_milestone_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_create_milestone_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_create_milestone_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_create_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_create_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_create_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Milestone', # 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 issue_delete(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of issue to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_delete_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of issue to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_comment(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of comment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_delete_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of comment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_delete_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_comment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_comment_deprecated(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment_deprecated(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: this parameter is ignored (required) + :param int id: id of comment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_delete_comment_deprecated_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment_deprecated_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: this parameter is ignored (required) + :param int id: id of comment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_delete_comment_deprecated" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_comment_deprecated`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_comment_deprecated`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_comment_deprecated`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_comment_deprecated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_comment_reaction(self, owner, repo, id, **kwargs): # noqa: E501 + """Remove a reaction from a comment of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment_reaction(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :param EditReactionOption content: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_delete_comment_reaction_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Remove a reaction from a comment of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_comment_reaction_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :param EditReactionOption content: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'content'] # 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 issue_delete_comment_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_comment_reaction`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_comment_reaction`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_comment_reaction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'content' in params: + body_params = params['content'] + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/reactions', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_issue_attachment(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Delete an issue attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_issue_attachment(owner, repo, index, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_delete_issue_attachment_with_http_info(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Delete an issue attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_issue_attachment_with_http_info(owner, repo, index, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'attachment_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 issue_delete_issue_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_issue_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_issue_attachment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_issue_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_delete_issue_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_issue_comment_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a comment attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_issue_comment_attachment(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_delete_issue_comment_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a comment attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment_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 issue_delete_issue_comment_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_delete_issue_comment_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_issue_reaction(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove a reaction from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_issue_reaction(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param EditReactionOption content: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_delete_issue_reaction_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove a reaction from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_issue_reaction_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param EditReactionOption content: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'content'] # 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 issue_delete_issue_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_issue_reaction`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_issue_reaction`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_issue_reaction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'content' in params: + body_params = params['content'] + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/reactions', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_label(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_label(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_delete_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_label_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_delete_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_milestone(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_milestone(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: the milestone to delete, identified by ID and if not available by name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_delete_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_milestone_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: the milestone to delete, identified by ID and if not available by name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_delete_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_milestone`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete an issue's existing stopwatch. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_stop_watch(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to stop the stopwatch on (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_delete_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete an issue's existing stopwatch. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_stop_watch_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to stop the stopwatch on (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_delete_stop_watch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_stop_watch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_stop_watch`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_stop_watch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/stopwatch/delete', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_subscription(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Unsubscribe user from issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_subscription(owner, repo, index, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str user: username of the user to unsubscribe from an issue (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + return data + + def issue_delete_subscription_with_http_info(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Unsubscribe user from issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_subscription_with_http_info(owner, repo, index, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str user: username of the user to unsubscribe from an issue (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_delete_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_subscription`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_subscription`") # noqa: E501 + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in params or + params['user'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user` when calling `issue_delete_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'user' in params: + path_params['user'] = params['user'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_delete_time(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete specific tracked time # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_time(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int id: id of time to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_delete_time_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_delete_time_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_delete_time_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete specific tracked time # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_delete_time_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int id: id of time to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_delete_time" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_time`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_time`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_time`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_time`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/times/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_edit_comment(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_comment(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_edit_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_comment_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', '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 issue_edit_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_edit_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Comment', # 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 issue_edit_comment_deprecated(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_comment_deprecated(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: this parameter is ignored (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_edit_comment_deprecated_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: this parameter is ignored (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'id', '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 issue_edit_comment_deprecated" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_edit_comment_deprecated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Comment', # 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 issue_edit_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to edit (required) + :param EditIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to edit (required) + :param EditIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_edit_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # 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 issue_edit_issue_attachment(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Edit an issue attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_attachment(owner, repo, index, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_attachment_with_http_info(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Edit an issue attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_attachment_with_http_info(owner, repo, index, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'attachment_id', '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 issue_edit_issue_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue_attachment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_edit_issue_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # 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 issue_edit_issue_comment_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a comment attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_comment_attachment(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_comment_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a comment attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment_id', '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 issue_edit_issue_comment_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_edit_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_edit_issue_comment_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # 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 issue_edit_issue_deadline(self, owner, repo, index, **kwargs): # noqa: E501 + """Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_deadline(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to create or update a deadline on (required) + :param EditDeadlineOption body: + :return: IssueDeadline + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_issue_deadline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_deadline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_deadline_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_deadline_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to create or update a deadline on (required) + :param EditDeadlineOption body: + :return: IssueDeadline + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_edit_issue_deadline" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue_deadline`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue_deadline`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue_deadline`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/deadline', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IssueDeadline', # 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 issue_edit_label(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_label(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_edit_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_label_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', '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 issue_edit_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_edit_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # 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 issue_edit_milestone(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_milestone(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: the milestone to edit, identified by ID and if not available by name (required) + :param EditMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_edit_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_milestone_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: the milestone to edit, identified by ID and if not available by name (required) + :param EditMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', '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 issue_edit_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_milestone`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_edit_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Milestone', # 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 issue_get_comment(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comment(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comment_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_get_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_get_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Comment', # 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 issue_get_comment_reactions(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a list of reactions from a comment of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comment_reactions(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :return: list[Reaction] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_comment_reactions_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comment_reactions_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_comment_reactions_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a list of reactions from a comment of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comment_reactions_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :return: list[Reaction] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_get_comment_reactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comment_reactions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comment_reactions`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_get_comment_reactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/reactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reaction]', # 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 issue_get_comments(self, owner, repo, index, **kwargs): # noqa: E501 + """List all comments on an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comments(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param datetime since: if provided, only comments updated since the specified time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_comments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_comments_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List all comments on an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comments_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param datetime since: if provided, only comments updated since the specified time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'since', 'before'] # 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 issue_get_comments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comments`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_get_comments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Comment]', # 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 issue_get_comments_and_timeline(self, owner, repo, index, **kwargs): # noqa: E501 + """List all comments and events on an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comments_and_timeline(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param datetime since: if provided, only comments updated since the specified time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param datetime before: if provided, only comments updated before the provided time are returned. + :return: list[TimelineComment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_comments_and_timeline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comments_and_timeline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_comments_and_timeline_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List all comments and events on an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comments_and_timeline_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param datetime since: if provided, only comments updated since the specified time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param datetime before: if provided, only comments updated before the provided time are returned. + :return: list[TimelineComment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'since', 'page', 'limit', 'before'] # 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 issue_get_comments_and_timeline" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comments_and_timeline`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comments_and_timeline`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_get_comments_and_timeline`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/timeline', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TimelineComment]', # 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 issue_get_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to get (required) + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to get (required) + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_get_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_get_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # 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 issue_get_issue_attachment(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Get an issue attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_attachment(owner, repo, index, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_attachment_with_http_info(owner, repo, index, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_get_issue_attachment_with_http_info(self, owner, repo, index, attachment_id, **kwargs): # noqa: E501 + """Get an issue attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_attachment_with_http_info(owner, repo, index, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'attachment_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 issue_get_issue_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue_attachment`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_get_issue_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_get_issue_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # 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 issue_get_issue_comment_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a comment attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_comment_attachment(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def issue_get_issue_comment_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a comment attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_comment_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment_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 issue_get_issue_comment_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_get_issue_comment_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `issue_get_issue_comment_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # 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 issue_get_issue_reactions(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a list reactions of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_reactions(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Reaction] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_issue_reactions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_reactions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_issue_reactions_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a list reactions of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_reactions_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Reaction] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', 'limit'] # 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 issue_get_issue_reactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue_reactions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue_reactions`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_get_issue_reactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/reactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reaction]', # 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 issue_get_label(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_label(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to get (required) + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_label_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to get (required) + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_get_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_get_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # 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 issue_get_labels(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_labels(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_labels_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_get_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_get_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # 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 issue_get_milestone(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestone(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: the milestone to get, identified by ID and if not available by name (required) + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestone_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: the milestone to get, identified by ID and if not available by name (required) + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_get_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_milestone`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_get_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Milestone', # 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 issue_get_milestones_list(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's opened milestones # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestones_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str state: Milestone state, Recognized values are open, closed and all. Defaults to \"open\" + :param str name: filter by milestone name + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Milestone] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_milestones_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_milestones_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_get_milestones_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's opened milestones # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestones_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str state: Milestone state, Recognized values are open, closed and all. Defaults to \"open\" + :param str name: filter by milestone name + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Milestone] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'state', 'name', 'page', 'limit'] # 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 issue_get_milestones_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestones_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_milestones_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Milestone]', # 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 issue_get_repo_comments(self, owner, repo, **kwargs): # noqa: E501 + """List all comments in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_repo_comments(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param datetime since: if provided, only comments updated since the provided time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_repo_comments_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_repo_comments_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_get_repo_comments_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List all comments in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_repo_comments_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param datetime since: if provided, only comments updated since the provided time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'since', 'before', 'page', 'limit'] # 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 issue_get_repo_comments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_repo_comments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_repo_comments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Comment]', # 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 issue_list_blocks(self, owner, repo, index, **kwargs): # noqa: E501 + """List issues that are blocked by this issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_blocks(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_list_blocks_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_blocks_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_list_blocks_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List issues that are blocked by this issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_blocks_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', 'limit'] # 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 issue_list_blocks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_blocks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_blocks`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_list_blocks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/blocks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Issue]', # 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 issue_list_issue_attachments(self, owner, repo, index, **kwargs): # noqa: E501 + """List issue's attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issue_attachments(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: list[Attachment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_list_issue_attachments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_issue_attachments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_list_issue_attachments_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List issue's attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issue_attachments_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: list[Attachment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_list_issue_attachments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issue_attachments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_issue_attachments`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_list_issue_attachments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/assets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Attachment]', # 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 issue_list_issue_comment_attachments(self, owner, repo, id, **kwargs): # noqa: E501 + """List comment's attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issue_comment_attachments(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :return: list[Attachment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_list_issue_comment_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_issue_comment_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_list_issue_comment_attachments_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """List comment's attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issue_comment_attachments_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :return: list[Attachment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 issue_list_issue_comment_attachments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issue_comment_attachments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_issue_comment_attachments`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_list_issue_comment_attachments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/assets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Attachment]', # 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 issue_list_issue_dependencies(self, owner, repo, index, **kwargs): # noqa: E501 + """List an issue's dependencies, i.e all issues that block this issue. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issue_dependencies(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_list_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_list_issue_dependencies_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List an issue's dependencies, i.e all issues that block this issue. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issue_dependencies_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', 'limit'] # 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 issue_list_issue_dependencies" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issue_dependencies`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_issue_dependencies`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_list_issue_dependencies`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/dependencies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Issue]', # 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 issue_list_issues(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's issues # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issues(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str state: whether issue is open or closed + :param str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded + :param str q: search string + :param str type: filter by type (issues / pulls) if set + :param str milestones: comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded + :param datetime since: Only show items updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show items updated before the given time. This is a timestamp in RFC 3339 format + :param str created_by: Only show items which were created by the given user + :param str assigned_by: Only show items for which the given user is assigned + :param str mentioned_by: Only show items in which the given user was mentioned + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_list_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_list_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's issues # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_issues_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str state: whether issue is open or closed + :param str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded + :param str q: search string + :param str type: filter by type (issues / pulls) if set + :param str milestones: comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded + :param datetime since: Only show items updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show items updated before the given time. This is a timestamp in RFC 3339 format + :param str created_by: Only show items which were created by the given user + :param str assigned_by: Only show items for which the given user is assigned + :param str mentioned_by: Only show items in which the given user was mentioned + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'state', 'labels', 'q', 'type', 'milestones', 'since', 'before', 'created_by', 'assigned_by', 'mentioned_by', 'page', 'limit'] # 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 issue_list_issues" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issues`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_issues`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'labels' in params: + query_params.append(('labels', params['labels'])) # noqa: E501 + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'milestones' in params: + query_params.append(('milestones', params['milestones'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'created_by' in params: + query_params.append(('created_by', params['created_by'])) # noqa: E501 + if 'assigned_by' in params: + query_params.append(('assigned_by', params['assigned_by'])) # noqa: E501 + if 'mentioned_by' in params: + query_params.append(('mentioned_by', params['mentioned_by'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Issue]', # 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 issue_list_labels(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_labels(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_list_labels_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_list_labels_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_list_labels_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_list_labels_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 issue_list_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # 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 issue_lock_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Lock an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_lock_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param LockIssueOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_lock_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_lock_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_lock_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Lock an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_lock_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param LockIssueOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_lock_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_lock_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_lock_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_lock_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/lock', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_post_comment_reaction(self, owner, repo, id, **kwargs): # noqa: E501 + """Add a reaction to a comment of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_post_comment_reaction(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :param EditReactionOption content: + :return: Reaction + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_post_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_post_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_post_comment_reaction_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Add a reaction to a comment of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_post_comment_reaction_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :param EditReactionOption content: + :return: Reaction + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'content'] # 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 issue_post_comment_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_post_comment_reaction`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_post_comment_reaction`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_post_comment_reaction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'content' in params: + body_params = params['content'] + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/reactions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Reaction', # 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 issue_post_issue_reaction(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a reaction to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_post_issue_reaction(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param EditReactionOption content: + :return: Reaction + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_post_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_post_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_post_issue_reaction_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a reaction to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_post_issue_reaction_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param EditReactionOption content: + :return: Reaction + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'content'] # 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 issue_post_issue_reaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_post_issue_reaction`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_post_issue_reaction`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_post_issue_reaction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'content' in params: + body_params = params['content'] + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/reactions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Reaction', # 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 issue_remove_issue_blocking(self, owner, repo, index, **kwargs): # noqa: E501 + """Unblock the issue given in the body by the issue in path # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_remove_issue_blocking(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param IssueMeta body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_remove_issue_blocking_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_remove_issue_blocking_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_remove_issue_blocking_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Unblock the issue given in the body by the issue in path # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_remove_issue_blocking_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param IssueMeta body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_remove_issue_blocking" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_remove_issue_blocking`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_remove_issue_blocking`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_remove_issue_blocking`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/blocks', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # 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 issue_remove_issue_dependencies(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove an issue dependency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_remove_issue_dependencies(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param IssueMeta body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_remove_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_remove_issue_dependencies_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_remove_issue_dependencies_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove an issue dependency # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_remove_issue_dependencies_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str index: index of the issue (required) + :param IssueMeta body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_remove_issue_dependencies" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_remove_issue_dependencies`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_remove_issue_dependencies`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_remove_issue_dependencies`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/dependencies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # 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 issue_remove_label(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Remove a label from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_remove_label(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int id: id of the label to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_remove_label_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_remove_label_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_remove_label_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Remove a label from an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_remove_label_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int id: id of the label to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_remove_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_remove_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_replace_labels(self, owner, repo, index, **kwargs): # noqa: E501 + """Replace an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_replace_labels(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_replace_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_replace_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_replace_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Replace an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_replace_labels_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 issue_replace_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_replace_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_replace_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_replace_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # 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 issue_reset_time(self, owner, repo, index, **kwargs): # noqa: E501 + """Reset a tracked time of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_reset_time(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to add tracked time to (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_reset_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_reset_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_reset_time_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Reset a tracked time of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_reset_time_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to add tracked time to (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_reset_time" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_reset_time`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_reset_time`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_reset_time`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/times', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_search_issues(self, **kwargs): # noqa: E501 + """Search for issues across the repositories that the user has access to # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_search_issues(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str state: State of the issue + :param str labels: Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded. + :param str milestones: Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded. + :param str q: Search string + :param int priority_repo_id: Repository ID to prioritize in the results + :param str type: Filter by issue type + :param datetime since: Only show issues updated after the given time (RFC 3339 format) + :param datetime before: Only show issues updated before the given time (RFC 3339 format) + :param bool assigned: Filter issues or pulls assigned to the authenticated user + :param bool created: Filter issues or pulls created by the authenticated user + :param bool mentioned: Filter issues or pulls mentioning the authenticated user + :param bool review_requested: Filter pull requests where the authenticated user's review was requested + :param bool reviewed: Filter pull requests reviewed by the authenticated user + :param str owner: Filter by repository owner + :param str team: Filter by team (requires organization owner parameter) + :param int page: Page number of results to return (1-based) + :param int limit: Number of items per page + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_search_issues_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.issue_search_issues_with_http_info(**kwargs) # noqa: E501 + return data + + def issue_search_issues_with_http_info(self, **kwargs): # noqa: E501 + """Search for issues across the repositories that the user has access to # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_search_issues_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str state: State of the issue + :param str labels: Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded. + :param str milestones: Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded. + :param str q: Search string + :param int priority_repo_id: Repository ID to prioritize in the results + :param str type: Filter by issue type + :param datetime since: Only show issues updated after the given time (RFC 3339 format) + :param datetime before: Only show issues updated before the given time (RFC 3339 format) + :param bool assigned: Filter issues or pulls assigned to the authenticated user + :param bool created: Filter issues or pulls created by the authenticated user + :param bool mentioned: Filter issues or pulls mentioning the authenticated user + :param bool review_requested: Filter pull requests where the authenticated user's review was requested + :param bool reviewed: Filter pull requests reviewed by the authenticated user + :param str owner: Filter by repository owner + :param str team: Filter by team (requires organization owner parameter) + :param int page: Page number of results to return (1-based) + :param int limit: Number of items per page + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['state', 'labels', 'milestones', 'q', 'priority_repo_id', 'type', 'since', 'before', 'assigned', 'created', 'mentioned', 'review_requested', 'reviewed', 'owner', 'team', 'page', 'limit'] # 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 issue_search_issues" % key + ) + params[key] = val + del params['kwargs'] + + if self.api_client.client_side_validation and ('page' in params and params['page'] < 1): # noqa: E501 + raise ValueError("Invalid value for parameter `page` when calling `issue_search_issues`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0): # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `issue_search_issues`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'labels' in params: + query_params.append(('labels', params['labels'])) # noqa: E501 + if 'milestones' in params: + query_params.append(('milestones', params['milestones'])) # noqa: E501 + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'priority_repo_id' in params: + query_params.append(('priority_repo_id', params['priority_repo_id'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'assigned' in params: + query_params.append(('assigned', params['assigned'])) # noqa: E501 + if 'created' in params: + query_params.append(('created', params['created'])) # noqa: E501 + if 'mentioned' in params: + query_params.append(('mentioned', params['mentioned'])) # noqa: E501 + if 'review_requested' in params: + query_params.append(('review_requested', params['review_requested'])) # noqa: E501 + if 'reviewed' in params: + query_params.append(('reviewed', params['reviewed'])) # noqa: E501 + if 'owner' in params: + query_params.append(('owner', params['owner'])) # noqa: E501 + if 'team' in params: + query_params.append(('team', params['team'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/issues/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Issue]', # 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 issue_start_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 + """Start stopwatch on an issue. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_start_stop_watch(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to create the stopwatch on (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_start_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_start_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_start_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Start stopwatch on an issue. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_start_stop_watch_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to create the stopwatch on (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_start_stop_watch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_start_stop_watch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_start_stop_watch`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_start_stop_watch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/stopwatch/start', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_stop_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 + """Stop an issue's existing stopwatch. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_stop_stop_watch(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to stop the stopwatch on (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_stop_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_stop_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_stop_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Stop an issue's existing stopwatch. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_stop_stop_watch_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to stop the stopwatch on (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_stop_stop_watch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_stop_stop_watch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_stop_stop_watch`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_stop_stop_watch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/stopwatch/stop', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 issue_subscriptions(self, owner, repo, index, **kwargs): # noqa: E501 + """Get users who subscribed on an issue. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_subscriptions(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_subscriptions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_subscriptions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_subscriptions_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get users who subscribed on an issue. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_subscriptions_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', 'limit'] # 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 issue_subscriptions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_subscriptions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_subscriptions`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_subscriptions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 issue_tracked_times(self, owner, repo, index, **kwargs): # noqa: E501 + """List an issue's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_tracked_times(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str user: optional filter by user (available for issue managers) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_tracked_times_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_tracked_times_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_tracked_times_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List an issue's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_tracked_times_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str user: optional filter by user (available for issue managers) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'user', 'since', 'before', 'page', 'limit'] # 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 issue_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_tracked_times`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_tracked_times`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'user' in params: + query_params.append(('user', params['user'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/times', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TrackedTime]', # 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 issue_unlock_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Unlock an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_unlock_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_unlock_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_unlock_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_unlock_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Unlock an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_unlock_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 issue_unlock_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_unlock_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_unlock_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_unlock_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/lock', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 move_issue_pin(self, owner, repo, index, position, **kwargs): # noqa: E501 + """Moves the Pin to the given Position # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.move_issue_pin(owner, repo, index, position, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of issue (required) + :param int position: the new position (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.move_issue_pin_with_http_info(owner, repo, index, position, **kwargs) # noqa: E501 + else: + (data) = self.move_issue_pin_with_http_info(owner, repo, index, position, **kwargs) # noqa: E501 + return data + + def move_issue_pin_with_http_info(self, owner, repo, index, position, **kwargs): # noqa: E501 + """Moves the Pin to the given Position # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.move_issue_pin_with_http_info(owner, repo, index, position, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of issue (required) + :param int position: the new position (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'position'] # 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 move_issue_pin" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `move_issue_pin`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `move_issue_pin`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `move_issue_pin`") # noqa: E501 + # verify the required parameter 'position' is set + if self.api_client.client_side_validation and ('position' not in params or + params['position'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `position` when calling `move_issue_pin`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'position' in params: + path_params['position'] = params['position'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/pin/{position}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 pin_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Pin an Issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.pin_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of issue to pin (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.pin_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.pin_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def pin_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Pin an Issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.pin_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of issue to pin (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 pin_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `pin_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `pin_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `pin_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/pin', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 unpin_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Unpin an Issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unpin_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of issue to unpin (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.unpin_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.unpin_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def unpin_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Unpin an Issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unpin_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of issue to unpin (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 unpin_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `unpin_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `unpin_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `unpin_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/pin', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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/swagger_client/api/miscellaneous_api.py b/swagger_client/api/miscellaneous_api.py new file mode 100644 index 0000000..956f3ae --- /dev/null +++ b/swagger_client/api/miscellaneous_api.py @@ -0,0 +1,1231 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class MiscellaneousApi(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 get_gitignore_template_info(self, name, **kwargs): # noqa: E501 + """Returns information about a gitignore template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_gitignore_template_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the template (required) + :return: GitignoreTemplateInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_gitignore_template_info_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.get_gitignore_template_info_with_http_info(name, **kwargs) # noqa: E501 + return data + + def get_gitignore_template_info_with_http_info(self, name, **kwargs): # noqa: E501 + """Returns information about a gitignore template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_gitignore_template_info_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the template (required) + :return: GitignoreTemplateInfo + 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 get_gitignore_template_info" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `get_gitignore_template_info`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/gitignore/templates/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitignoreTemplateInfo', # 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 get_label_template_info(self, name, **kwargs): # noqa: E501 + """Returns all labels in a template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_label_template_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the template (required) + :return: list[LabelTemplate] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_label_template_info_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.get_label_template_info_with_http_info(name, **kwargs) # noqa: E501 + return data + + def get_label_template_info_with_http_info(self, name, **kwargs): # noqa: E501 + """Returns all labels in a template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_label_template_info_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the template (required) + :return: list[LabelTemplate] + 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 get_label_template_info" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `get_label_template_info`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/label/templates/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LabelTemplate]', # 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 get_license_template_info(self, name, **kwargs): # noqa: E501 + """Returns information about a license template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_license_template_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the license (required) + :return: LicenseTemplateInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_license_template_info_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.get_license_template_info_with_http_info(name, **kwargs) # noqa: E501 + return data + + def get_license_template_info_with_http_info(self, name, **kwargs): # noqa: E501 + """Returns information about a license template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_license_template_info_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: name of the license (required) + :return: LicenseTemplateInfo + 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 get_license_template_info" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `get_license_template_info`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/licenses/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LicenseTemplateInfo', # 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 get_node_info(self, **kwargs): # noqa: E501 + """Returns the nodeinfo of the Gitea application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_node_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NodeInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_node_info_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_node_info_with_http_info(**kwargs) # noqa: E501 + return data + + def get_node_info_with_http_info(self, **kwargs): # noqa: E501 + """Returns the nodeinfo of the Gitea application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_node_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NodeInfo + 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 get_node_info" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/nodeinfo', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NodeInfo', # 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 get_signing_key(self, **kwargs): # noqa: E501 + """Get default signing-key.gpg # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_signing_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_signing_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_signing_key_with_http_info(**kwargs) # noqa: E501 + return data + + def get_signing_key_with_http_info(self, **kwargs): # noqa: E501 + """Get default signing-key.gpg # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_signing_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + 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 get_signing_key" % 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( + ['text/plain']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/signing-key.gpg', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 get_signing_key_ssh(self, **kwargs): # noqa: E501 + """Get default signing-key.pub # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_signing_key_ssh(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_signing_key_ssh_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_signing_key_ssh_with_http_info(**kwargs) # noqa: E501 + return data + + def get_signing_key_ssh_with_http_info(self, **kwargs): # noqa: E501 + """Get default signing-key.pub # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_signing_key_ssh_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + 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 get_signing_key_ssh" % 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( + ['text/plain']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/signing-key.pub', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 get_version(self, **kwargs): # noqa: E501 + """Returns the version of the Gitea application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_version(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ServerVersion + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_version_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_version_with_http_info(**kwargs) # noqa: E501 + return data + + def get_version_with_http_info(self, **kwargs): # noqa: E501 + """Returns the version of the Gitea application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_version_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ServerVersion + 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 get_version" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/version', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ServerVersion', # 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 list_gitignores_templates(self, **kwargs): # noqa: E501 + """Returns a list of all gitignore templates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_gitignores_templates(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_gitignores_templates_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_gitignores_templates_with_http_info(**kwargs) # noqa: E501 + return data + + def list_gitignores_templates_with_http_info(self, **kwargs): # noqa: E501 + """Returns a list of all gitignore templates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_gitignores_templates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + 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 list_gitignores_templates" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/gitignore/templates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # 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 list_label_templates(self, **kwargs): # noqa: E501 + """Returns a list of all label templates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_label_templates(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_label_templates_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_label_templates_with_http_info(**kwargs) # noqa: E501 + return data + + def list_label_templates_with_http_info(self, **kwargs): # noqa: E501 + """Returns a list of all label templates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_label_templates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + 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 list_label_templates" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/label/templates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # 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 list_license_templates(self, **kwargs): # noqa: E501 + """Returns a list of all license templates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_license_templates(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[LicensesTemplateListEntry] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_license_templates_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_license_templates_with_http_info(**kwargs) # noqa: E501 + return data + + def list_license_templates_with_http_info(self, **kwargs): # noqa: E501 + """Returns a list of all license templates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_license_templates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[LicensesTemplateListEntry] + 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 list_license_templates" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/licenses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LicensesTemplateListEntry]', # 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 render_markdown(self, **kwargs): # noqa: E501 + """Render a markdown document as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkdownOption body: + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.render_markdown_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.render_markdown_with_http_info(**kwargs) # noqa: E501 + return data + + def render_markdown_with_http_info(self, **kwargs): # noqa: E501 + """Render a markdown document as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkdownOption body: + :return: str + 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 render_markdown" % key + ) + params[key] = val + del params['kwargs'] + + 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( + ['text/html']) # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/markdown', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 render_markdown_raw(self, body, **kwargs): # noqa: E501 + """Render raw markdown as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown_raw(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: Request body to render (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.render_markdown_raw_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.render_markdown_raw_with_http_info(body, **kwargs) # noqa: E501 + return data + + def render_markdown_raw_with_http_info(self, body, **kwargs): # noqa: E501 + """Render raw markdown as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markdown_raw_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: Request body to render (required) + :return: str + 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 render_markdown_raw" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `render_markdown_raw`") # 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( + ['text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/markdown/raw', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 render_markup(self, **kwargs): # noqa: E501 + """Render a markup document as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markup(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkupOption body: + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.render_markup_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.render_markup_with_http_info(**kwargs) # noqa: E501 + return data + + def render_markup_with_http_info(self, **kwargs): # noqa: E501 + """Render a markup document as HTML # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.render_markup_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MarkupOption body: + :return: str + 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 render_markup" % key + ) + params[key] = val + del params['kwargs'] + + 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( + ['text/html']) # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/markup', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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/swagger_client/api/notification_api.py b/swagger_client/api/notification_api.py new file mode 100644 index 0000000..f4968f2 --- /dev/null +++ b/swagger_client/api/notification_api.py @@ -0,0 +1,803 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class NotificationApi(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 notify_get_list(self, **kwargs): # noqa: E501 + """List users's notification threads # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param bool all: If true, show notifications marked as read. Default value is false + :param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. + :param list[str] subject_type: filter notifications by subject type + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_get_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.notify_get_list_with_http_info(**kwargs) # noqa: E501 + return data + + def notify_get_list_with_http_info(self, **kwargs): # noqa: E501 + """List users's notification threads # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param bool all: If true, show notifications marked as read. Default value is false + :param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned. + :param list[str] subject_type: filter notifications by subject type + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['all', 'status_types', 'subject_type', 'since', 'before', 'page', 'limit'] # 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 notify_get_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'subject_type' in params: + query_params.append(('subject-type', params['subject_type'])) # noqa: E501 + collection_formats['subject-type'] = 'multi' # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # 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 notify_get_repo_list(self, owner, repo, **kwargs): # noqa: E501 + """List users's notification threads on a specific repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_repo_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param bool all: If true, show notifications marked as read. Default value is false + :param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned + :param list[str] subject_type: filter notifications by subject type + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_get_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.notify_get_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def notify_get_repo_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List users's notification threads on a specific repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_repo_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param bool all: If true, show notifications marked as read. Default value is false + :param list[str] status_types: Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned + :param list[str] subject_type: filter notifications by subject type + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'all', 'status_types', 'subject_type', 'since', 'before', 'page', 'limit'] # 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 notify_get_repo_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `notify_get_repo_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `notify_get_repo_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'subject_type' in params: + query_params.append(('subject-type', params['subject_type'])) # noqa: E501 + collection_formats['subject-type'] = 'multi' # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/notifications', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # 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 notify_get_thread(self, id, **kwargs): # noqa: E501 + """Get notification thread 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.notify_get_thread(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :return: NotificationThread + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_get_thread_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.notify_get_thread_with_http_info(id, **kwargs) # noqa: E501 + return data + + def notify_get_thread_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification thread 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.notify_get_thread_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :return: NotificationThread + 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 notify_get_thread" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `notify_get_thread`") # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications/threads/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationThread', # 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 notify_new_available(self, **kwargs): # noqa: E501 + """Check if unread notifications exist # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_new_available(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationCount + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_new_available_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.notify_new_available_with_http_info(**kwargs) # noqa: E501 + return data + + def notify_new_available_with_http_info(self, **kwargs): # noqa: E501 + """Check if unread notifications exist # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_new_available_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationCount + 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 notify_new_available" % 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications/new', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationCount', # 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 notify_read_list(self, **kwargs): # noqa: E501 + """Mark notification threads as read, pinned or unread # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as, Defaults to read. + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_read_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.notify_read_list_with_http_info(**kwargs) # noqa: E501 + return data + + def notify_read_list_with_http_info(self, **kwargs): # noqa: E501 + """Mark notification threads as read, pinned or unread # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as, Defaults to read. + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['last_read_at', 'all', 'status_types', 'to_status'] # 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 notify_read_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'last_read_at' in params: + query_params.append(('last_read_at', params['last_read_at'])) # noqa: E501 + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'to_status' in params: + query_params.append(('to-status', params['to_status'])) # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # 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 notify_read_repo_list(self, owner, repo, **kwargs): # noqa: E501 + """Mark notification threads as read, pinned or unread on a specific repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_repo_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as. Defaults to read. + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_read_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.notify_read_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def notify_read_repo_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Mark notification threads as read, pinned or unread on a specific repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_repo_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str all: If true, mark all notifications on this repo. Default value is false + :param list[str] status_types: Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread. + :param str to_status: Status to mark notifications as. Defaults to read. + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'all', 'status_types', 'to_status', 'last_read_at'] # 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 notify_read_repo_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `notify_read_repo_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `notify_read_repo_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'status_types' in params: + query_params.append(('status-types', params['status_types'])) # noqa: E501 + collection_formats['status-types'] = 'multi' # noqa: E501 + if 'to_status' in params: + query_params.append(('to-status', params['to_status'])) # noqa: E501 + if 'last_read_at' in params: + query_params.append(('last_read_at', params['last_read_at'])) # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/notifications', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # 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 notify_read_thread(self, id, **kwargs): # noqa: E501 + """Mark notification thread as read 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.notify_read_thread(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :param str to_status: Status to mark notifications as + :return: NotificationThread + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_read_thread_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.notify_read_thread_with_http_info(id, **kwargs) # noqa: E501 + return data + + def notify_read_thread_with_http_info(self, id, **kwargs): # noqa: E501 + """Mark notification thread as read 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.notify_read_thread_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :param str to_status: Status to mark notifications as + :return: NotificationThread + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'to_status'] # 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 notify_read_thread" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `notify_read_thread`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'to_status' in params: + query_params.append(('to-status', params['to_status'])) # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications/threads/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationThread', # 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/swagger_client/api/organization_api.py b/swagger_client/api/organization_api.py new file mode 100644 index 0000000..ca26b15 --- /dev/null +++ b/swagger_client/api/organization_api.py @@ -0,0 +1,6942 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class OrganizationApi(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 create_org_repo(self, org, **kwargs): # noqa: E501 + """Create a repository in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_repo(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_org_repo_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.create_org_repo_with_http_info(org, **kwargs) # noqa: E501 + return data + + def create_org_repo_with_http_info(self, org, **kwargs): # noqa: E501 + """Create a repository in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_repo_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 create_org_repo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `create_org_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 create_org_repo_deprecated(self, org, **kwargs): # noqa: E501 + """Create a repository in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_repo_deprecated(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_org_repo_deprecated_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.create_org_repo_deprecated_with_http_info(org, **kwargs) # noqa: E501 + return data + + def create_org_repo_deprecated_with_http_info(self, org, **kwargs): # noqa: E501 + """Create a repository in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_repo_deprecated_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 create_org_repo_deprecated" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `create_org_repo_deprecated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/org/{org}/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 create_org_variable(self, org, variablename, **kwargs): # noqa: E501 + """Create an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_variable(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :param CreateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + else: + (data) = self.create_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + return data + + def create_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 + """Create an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_variable_with_http_info(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :param CreateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'variablename', '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 create_org_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `create_org_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `create_org_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables/{variablename}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_org_runner(self, org, runner_id, **kwargs): # noqa: E501 + """Delete an org-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_org_runner(org, runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_org_runner_with_http_info(org, runner_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_org_runner_with_http_info(org, runner_id, **kwargs) # noqa: E501 + return data + + def delete_org_runner_with_http_info(self, org, runner_id, **kwargs): # noqa: E501 + """Delete an org-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_org_runner_with_http_info(org, runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'runner_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 delete_org_runner" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `delete_org_runner`") # noqa: E501 + # verify the required parameter 'runner_id' is set + if self.api_client.client_side_validation and ('runner_id' not in params or + params['runner_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `runner_id` when calling `delete_org_runner`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'runner_id' in params: + path_params['runner_id'] = params['runner_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/runners/{runner_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_org_secret(self, org, secretname, **kwargs): # noqa: E501 + """Delete a secret in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_org_secret(org, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param str secretname: name of the secret (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 + else: + (data) = self.delete_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 + return data + + def delete_org_secret_with_http_info(self, org, secretname, **kwargs): # noqa: E501 + """Delete a secret in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_org_secret_with_http_info(org, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param str secretname: name of the secret (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'secretname'] # 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 delete_org_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `delete_org_secret`") # noqa: E501 + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `delete_org_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/secrets/{secretname}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_org_variable(self, org, variablename, **kwargs): # noqa: E501 + """Delete an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_org_variable(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + else: + (data) = self.delete_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + return data + + def delete_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 + """Delete an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_org_variable_with_http_info(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'variablename'] # 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 delete_org_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `delete_org_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `delete_org_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables/{variablename}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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 get_org_runner(self, org, runner_id, **kwargs): # noqa: E501 + """Get an org-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_runner(org, runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_org_runner_with_http_info(org, runner_id, **kwargs) # noqa: E501 + else: + (data) = self.get_org_runner_with_http_info(org, runner_id, **kwargs) # noqa: E501 + return data + + def get_org_runner_with_http_info(self, org, runner_id, **kwargs): # noqa: E501 + """Get an org-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_runner_with_http_info(org, runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'runner_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 get_org_runner" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `get_org_runner`") # noqa: E501 + # verify the required parameter 'runner_id' is set + if self.api_client.client_side_validation and ('runner_id' not in params or + params['runner_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `runner_id` when calling `get_org_runner`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'runner_id' in params: + path_params['runner_id'] = params['runner_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/runners/{runner_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_org_runners(self, org, **kwargs): # noqa: E501 + """Get org-level runners # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_runners(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_org_runners_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.get_org_runners_with_http_info(org, **kwargs) # noqa: E501 + return data + + def get_org_runners_with_http_info(self, org, **kwargs): # noqa: E501 + """Get org-level runners # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_runners_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # 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 get_org_runners" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `get_org_runners`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/runners', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_org_variable(self, org, variablename, **kwargs): # noqa: E501 + """Get an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_variable(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + else: + (data) = self.get_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + return data + + def get_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 + """Get an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_variable_with_http_info(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'variablename'] # 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 get_org_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `get_org_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `get_org_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables/{variablename}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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 get_org_variables_list(self, org, **kwargs): # noqa: E501 + """Get an org-level variables list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_variables_list(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_org_variables_list_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.get_org_variables_list_with_http_info(org, **kwargs) # noqa: E501 + return data + + def get_org_variables_list_with_http_info(self, org, **kwargs): # noqa: E501 + """Get an org-level variables list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_variables_list_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # 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 get_org_variables_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `get_org_variables_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ActionVariable]', # 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 get_org_workflow_jobs(self, org, **kwargs): # noqa: E501 + """Get org-level workflow jobs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_workflow_jobs(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_org_workflow_jobs_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.get_org_workflow_jobs_with_http_info(org, **kwargs) # noqa: E501 + return data + + def get_org_workflow_jobs_with_http_info(self, org, **kwargs): # noqa: E501 + """Get org-level workflow jobs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_workflow_jobs_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'status', 'page', 'limit'] # 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 get_org_workflow_jobs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `get_org_workflow_jobs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/jobs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowJobsResponse', # 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 get_org_workflow_runs(self, org, **kwargs): # noqa: E501 + """Get org-level workflow runs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_workflow_runs(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str event: workflow event name + :param str branch: workflow branch + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param str actor: triggered by user + :param str head_sha: triggering sha of the workflow run + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowRunsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_org_workflow_runs_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.get_org_workflow_runs_with_http_info(org, **kwargs) # noqa: E501 + return data + + def get_org_workflow_runs_with_http_info(self, org, **kwargs): # noqa: E501 + """Get org-level workflow runs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_org_workflow_runs_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str event: workflow event name + :param str branch: workflow branch + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param str actor: triggered by user + :param str head_sha: triggering sha of the workflow run + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowRunsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'event', 'branch', 'status', 'actor', 'head_sha', 'page', 'limit'] # 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 get_org_workflow_runs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `get_org_workflow_runs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'event' in params: + query_params.append(('event', params['event'])) # noqa: E501 + if 'branch' in params: + query_params.append(('branch', params['branch'])) # noqa: E501 + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'actor' in params: + query_params.append(('actor', params['actor'])) # noqa: E501 + if 'head_sha' in params: + query_params.append(('head_sha', params['head_sha'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/runs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowRunsResponse', # 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 org_add_team_member(self, id, username, **kwargs): # noqa: E501 + """Add a team member # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_add_team_member(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to add to a team (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_add_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + else: + (data) = self.org_add_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + return data + + def org_add_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 + """Add a team member # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_add_team_member_with_http_info(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to add to a team (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'username'] # 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 org_add_team_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_add_team_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_add_team_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/members/{username}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_add_team_repository(self, id, org, repo, **kwargs): # noqa: E501 + """Add a repository to a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_add_team_repository(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to add (required) + :param str repo: name of the repo to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_add_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + else: + (data) = self.org_add_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + return data + + def org_add_team_repository_with_http_info(self, id, org, repo, **kwargs): # noqa: E501 + """Add a repository to a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_add_team_repository_with_http_info(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to add (required) + :param str repo: name of the repo to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'org', 'repo'] # 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 org_add_team_repository" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_add_team_repository`") # noqa: E501 + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_add_team_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `org_add_team_repository`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/repos/{org}/{repo}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_conceal_member(self, org, username, **kwargs): # noqa: E501 + """Conceal a user's membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_conceal_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user whose membership is to be concealed (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_conceal_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_conceal_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_conceal_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Conceal a user's membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_conceal_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user whose membership is to be concealed (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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 org_conceal_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_conceal_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_conceal_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/public_members/{username}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_create(self, organization, **kwargs): # noqa: E501 + """Create an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create(organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_create_with_http_info(organization, **kwargs) # noqa: E501 + else: + (data) = self.org_create_with_http_info(organization, **kwargs) # noqa: E501 + return data + + def org_create_with_http_info(self, organization, **kwargs): # noqa: E501 + """Create an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_with_http_info(organization, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOrgOption organization: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['organization'] # 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 org_create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'organization' is set + if self.api_client.client_side_validation and ('organization' not in params or + params['organization'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `organization` when calling `org_create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'organization' in params: + body_params = params['organization'] + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Organization', # 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 org_create_hook(self, org, body, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_hook(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateHookOption body: (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_create_hook_with_http_info(org, body, **kwargs) # noqa: E501 + else: + (data) = self.org_create_hook_with_http_info(org, body, **kwargs) # noqa: E501 + return data + + def org_create_hook_with_http_info(self, org, body, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_hook_with_http_info(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateHookOption body: (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 org_create_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_create_hook`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `org_create_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 org_create_label(self, org, **kwargs): # noqa: E501 + """Create a label for an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_label(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_create_label_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_create_label_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_create_label_with_http_info(self, org, **kwargs): # noqa: E501 + """Create a label for an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_label_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 org_create_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_create_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/labels', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # 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 org_create_runner_registration_token(self, org, **kwargs): # noqa: E501 + """Get an organization's actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_runner_registration_token(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_create_runner_registration_token_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_create_runner_registration_token_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_create_runner_registration_token_with_http_info(self, org, **kwargs): # noqa: E501 + """Get an organization's actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_runner_registration_token_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # 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 org_create_runner_registration_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_create_runner_registration_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/runners/registration-token', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_create_team(self, org, **kwargs): # noqa: E501 + """Create a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_team(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_create_team_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_create_team_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_create_team_with_http_info(self, org, **kwargs): # noqa: E501 + """Create a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_team_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 org_create_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_create_team`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/teams', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # 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 org_delete(self, org, **kwargs): # noqa: E501 + """Delete an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: organization that is to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_delete_with_http_info(self, org, **kwargs): # noqa: E501 + """Delete an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: organization that is to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # 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 org_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_delete_avatar(self, org, **kwargs): # noqa: E501 + """Delete Avatar # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_avatar(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_avatar_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_avatar_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_delete_avatar_with_http_info(self, org, **kwargs): # noqa: E501 + """Delete Avatar # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_avatar_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # 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 org_delete_avatar" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete_avatar`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/avatar', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_delete_hook(self, org, id, **kwargs): # noqa: E501 + """Delete a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_hook(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_hook_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_hook_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_delete_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Delete a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_hook_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 org_delete_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_delete_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_delete_label(self, org, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_label(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the label to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_label_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_label_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_delete_label_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_label_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the label to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 org_delete_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_delete_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/labels/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_delete_member(self, org, username, **kwargs): # noqa: E501 + """Remove a member from an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to remove from the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_delete_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Remove a member from an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to remove from the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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 org_delete_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_delete_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/members/{username}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_delete_team(self, id, **kwargs): # noqa: E501 + """Delete a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_team(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_team_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_team_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_delete_team_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_team_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to delete (required) + :return: None + 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 org_delete_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_delete_team`") # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_edit(self, org, body, **kwargs): # noqa: E501 + """Edit an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to edit (required) + :param EditOrgOption body: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_edit_with_http_info(org, body, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_with_http_info(org, body, **kwargs) # noqa: E501 + return data + + def org_edit_with_http_info(self, org, body, **kwargs): # noqa: E501 + """Edit an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_with_http_info(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to edit (required) + :param EditOrgOption body: (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 org_edit" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_edit`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `org_edit`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Organization', # 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 org_edit_hook(self, org, id, **kwargs): # noqa: E501 + """Update a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_hook(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_edit_hook_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_hook_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_edit_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Update a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_hook_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'id', '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 org_edit_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_edit_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_edit_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 org_edit_label(self, org, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_label(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_edit_label_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_label_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_edit_label_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_label_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'id', '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 org_edit_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_edit_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_edit_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/labels/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # 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 org_edit_team(self, id, **kwargs): # noqa: E501 + """Edit a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_team(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to edit (required) + :param EditTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_edit_team_with_http_info(self, id, **kwargs): # noqa: E501 + """Edit a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_team_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to edit (required) + :param EditTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', '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 org_edit_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_edit_team`") # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # 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 org_get(self, org, **kwargs): # noqa: E501 + """Get an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to get (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_get_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_get_with_http_info(self, org, **kwargs): # noqa: E501 + """Get an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to get (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # 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 org_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Organization', # 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 org_get_all(self, **kwargs): # noqa: E501 + """Get list of organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_all(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_all_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.org_get_all_with_http_info(**kwargs) # noqa: E501 + return data + + def org_get_all_with_http_info(self, **kwargs): # noqa: E501 + """Get list of organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_all_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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 org_get_all" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Organization]', # 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 org_get_hook(self, org, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_hook(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to get (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_get_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_hook_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the hook to get (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 org_get_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_get_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 org_get_label(self, org, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_label(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the label to get (required) + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_label_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_get_label_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_get_label_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_label_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the label to get (required) + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 org_get_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_label`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_get_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/labels/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # 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 org_get_runner_registration_token(self, org, **kwargs): # noqa: E501 + """Get an organization's actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_runner_registration_token(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_runner_registration_token_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_get_runner_registration_token_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_get_runner_registration_token_with_http_info(self, org, **kwargs): # noqa: E501 + """Get an organization's actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_runner_registration_token_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # 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 org_get_runner_registration_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_runner_registration_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/runners/registration-token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_get_team(self, id, **kwargs): # noqa: E501 + """Get a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_team(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to get (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_team_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_get_team_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_get_team_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_team_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to get (required) + :return: Team + 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 org_get_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_get_team`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # 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 org_get_user_permissions(self, username, org, **kwargs): # noqa: E501 + """Get user permissions in organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_user_permissions(username, org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose permissions are to be obtained (required) + :param str org: name of the organization (required) + :return: OrganizationPermissions + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_user_permissions_with_http_info(username, org, **kwargs) # noqa: E501 + else: + (data) = self.org_get_user_permissions_with_http_info(username, org, **kwargs) # noqa: E501 + return data + + def org_get_user_permissions_with_http_info(self, username, org, **kwargs): # noqa: E501 + """Get user permissions in organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_user_permissions_with_http_info(username, org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose permissions are to be obtained (required) + :param str org: name of the organization (required) + :return: OrganizationPermissions + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'org'] # 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 org_get_user_permissions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_get_user_permissions`") # noqa: E501 + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_user_permissions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + if 'org' in params: + path_params['org'] = params['org'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/orgs/{org}/permissions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OrganizationPermissions', # 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 org_is_member(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a member of an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_is_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to check for an organization membership (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_is_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_is_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_is_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a member of an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_is_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to check for an organization membership (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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 org_is_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_is_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_is_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/members/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_is_public_member(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a public member of an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_is_public_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to check for a public organization membership (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_is_public_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_is_public_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_is_public_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Check if a user is a public member of an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_is_public_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to check for a public organization membership (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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 org_is_public_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_is_public_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_is_public_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/public_members/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_list_actions_secrets(self, org, **kwargs): # noqa: E501 + """List an organization's actions secrets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_actions_secrets(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Secret] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_actions_secrets_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_actions_secrets_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_actions_secrets_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's actions secrets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_actions_secrets_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Secret] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # 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 org_list_actions_secrets" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_actions_secrets`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/secrets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Secret]', # 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 org_list_activity_feeds(self, org, **kwargs): # noqa: E501 + """List an organization's activity feeds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_activity_feeds(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the org (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_activity_feeds_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_activity_feeds_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_activity_feeds_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's activity feeds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_activity_feeds_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the org (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '_date', 'page', 'limit'] # 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 org_list_activity_feeds" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_activity_feeds`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if '_date' in params: + query_params.append(('date', params['_date'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/activities/feeds', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Activity]', # 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 org_list_current_user_orgs(self, **kwargs): # noqa: E501 + """List the current user's organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_current_user_orgs(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_current_user_orgs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.org_list_current_user_orgs_with_http_info(**kwargs) # noqa: E501 + return data + + def org_list_current_user_orgs_with_http_info(self, **kwargs): # noqa: E501 + """List the current user's organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_current_user_orgs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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 org_list_current_user_orgs" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Organization]', # 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 org_list_hooks(self, org, **kwargs): # noqa: E501 + """List an organization's 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.org_list_hooks(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_hooks_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_hooks_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_hooks_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's 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.org_list_hooks_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # 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 org_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_hooks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Hook]', # 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 org_list_labels(self, org, **kwargs): # noqa: E501 + """List an organization's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_labels(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_labels_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_labels_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_labels_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_labels_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # 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 org_list_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/labels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # 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 org_list_members(self, org, **kwargs): # noqa: E501 + """List an organization's members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_members(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_members_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_members_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_members_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_members_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # 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 org_list_members" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_members`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 org_list_public_members(self, org, **kwargs): # noqa: E501 + """List an organization's public members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_public_members(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_public_members_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_public_members_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_public_members_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's public members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_public_members_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # 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 org_list_public_members" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_public_members`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/public_members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 org_list_repos(self, org, **kwargs): # noqa: E501 + """List an organization's repos # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_repos(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_repos_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_repos_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_repos_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's repos # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_repos_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # 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 org_list_repos" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_repos`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # 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 org_list_team_activity_feeds(self, id, **kwargs): # noqa: E501 + """List a team's activity feeds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_activity_feeds(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_team_activity_feeds_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_activity_feeds_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_list_team_activity_feeds_with_http_info(self, id, **kwargs): # noqa: E501 + """List a team's activity feeds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_activity_feeds_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', '_date', 'page', 'limit'] # 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 org_list_team_activity_feeds" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_list_team_activity_feeds`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if '_date' in params: + query_params.append(('date', params['_date'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/activities/feeds', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Activity]', # 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 org_list_team_member(self, id, username, **kwargs): # noqa: E501 + """List a particular member of team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_member(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user whose data is to be listed (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + return data + + def org_list_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 + """List a particular member of team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_member_with_http_info(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user whose data is to be listed (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'username'] # 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 org_list_team_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_list_team_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_list_team_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/members/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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 org_list_team_members(self, id, **kwargs): # noqa: E501 + """List a team's members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_members(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_team_members_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_members_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_list_team_members_with_http_info(self, id, **kwargs): # noqa: E501 + """List a team's members # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_members_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'page', 'limit'] # 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 org_list_team_members" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_list_team_members`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 org_list_team_repo(self, id, org, repo, **kwargs): # noqa: E501 + """List a particular repo of team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_repo(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to list (required) + :param str repo: name of the repo to list (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_team_repo_with_http_info(id, org, repo, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_repo_with_http_info(id, org, repo, **kwargs) # noqa: E501 + return data + + def org_list_team_repo_with_http_info(self, id, org, repo, **kwargs): # noqa: E501 + """List a particular repo of team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_repo_with_http_info(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to list (required) + :param str repo: name of the repo to list (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'org', 'repo'] # 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 org_list_team_repo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_list_team_repo`") # noqa: E501 + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_team_repo`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `org_list_team_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/repos/{org}/{repo}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 org_list_team_repos(self, id, **kwargs): # noqa: E501 + """List a team's repos # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_repos(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_team_repos_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_list_team_repos_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_list_team_repos_with_http_info(self, id, **kwargs): # noqa: E501 + """List a team's repos # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_team_repos_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'page', 'limit'] # 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 org_list_team_repos" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_list_team_repos`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # 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 org_list_teams(self, org, **kwargs): # noqa: E501 + """List an organization's teams # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_teams(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_teams_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_teams_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_teams_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's teams # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_teams_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # 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 org_list_teams" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_list_teams`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/teams', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Team]', # 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 org_list_user_orgs(self, username, **kwargs): # noqa: E501 + """List a user's organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_user_orgs(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose organizations are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_user_orgs_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.org_list_user_orgs_with_http_info(username, **kwargs) # noqa: E501 + return data + + def org_list_user_orgs_with_http_info(self, username, **kwargs): # noqa: E501 + """List a user's organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_user_orgs_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose organizations are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Organization] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', 'limit'] # 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 org_list_user_orgs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_list_user_orgs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/orgs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Organization]', # 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 org_publicize_member(self, org, username, **kwargs): # noqa: E501 + """Publicize a user's membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_publicize_member(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user whose membership is to be publicized (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_publicize_member_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.org_publicize_member_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def org_publicize_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Publicize a user's membership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_publicize_member_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user whose membership is to be publicized (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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 org_publicize_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_publicize_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_publicize_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/public_members/{username}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_remove_team_member(self, id, username, **kwargs): # noqa: E501 + """Remove a team member # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_remove_team_member(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to remove from a team (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_remove_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + else: + (data) = self.org_remove_team_member_with_http_info(id, username, **kwargs) # noqa: E501 + return data + + def org_remove_team_member_with_http_info(self, id, username, **kwargs): # noqa: E501 + """Remove a team member # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_remove_team_member_with_http_info(id, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str username: username of the user to remove from a team (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'username'] # 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 org_remove_team_member" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_remove_team_member`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `org_remove_team_member`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/members/{username}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_remove_team_repository(self, id, org, repo, **kwargs): # noqa: E501 + """Remove a repository from a team # noqa: E501 + + This does not delete the repository, it only removes the repository from the team. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_remove_team_repository(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to remove (required) + :param str repo: name of the repo to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_remove_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + else: + (data) = self.org_remove_team_repository_with_http_info(id, org, repo, **kwargs) # noqa: E501 + return data + + def org_remove_team_repository_with_http_info(self, id, org, repo, **kwargs): # noqa: E501 + """Remove a repository from a team # noqa: E501 + + This does not delete the repository, it only removes the repository from the team. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_remove_team_repository_with_http_info(id, org, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team (required) + :param str org: organization that owns the repo to remove (required) + :param str repo: name of the repo to remove (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'org', 'repo'] # 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 org_remove_team_repository" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_remove_team_repository`") # noqa: E501 + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_remove_team_repository`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `org_remove_team_repository`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}/repos/{org}/{repo}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 org_update_avatar(self, org, **kwargs): # noqa: E501 + """Update Avatar # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_update_avatar(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param UpdateUserAvatarOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_update_avatar_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_update_avatar_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_update_avatar_with_http_info(self, org, **kwargs): # noqa: E501 + """Update Avatar # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_update_avatar_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param UpdateUserAvatarOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 org_update_avatar" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_update_avatar`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/avatar', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 organization_block_user(self, org, username, **kwargs): # noqa: E501 + """Block 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.organization_block_user(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to block (required) + :param str note: optional note for the block + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.organization_block_user_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.organization_block_user_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def organization_block_user_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Block 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.organization_block_user_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to block (required) + :param str note: optional note for the block + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username', 'note'] # 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 organization_block_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `organization_block_user`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `organization_block_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'note' in params: + query_params.append(('note', params['note'])) # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/blocks/{username}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 organization_check_user_block(self, org, username, **kwargs): # noqa: E501 + """Check if a user is blocked by the organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.organization_check_user_block(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to check (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.organization_check_user_block_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.organization_check_user_block_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def organization_check_user_block_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Check if a user is blocked by the organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.organization_check_user_block_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to check (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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 organization_check_user_block" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `organization_check_user_block`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `organization_check_user_block`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/blocks/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 organization_list_blocks(self, org, **kwargs): # noqa: E501 + """List users blocked by the organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.organization_list_blocks(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.organization_list_blocks_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.organization_list_blocks_with_http_info(org, **kwargs) # noqa: E501 + return data + + def organization_list_blocks_with_http_info(self, org, **kwargs): # noqa: E501 + """List users blocked by the organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.organization_list_blocks_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # 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 organization_list_blocks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `organization_list_blocks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/blocks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 organization_unblock_user(self, org, username, **kwargs): # noqa: E501 + """Unblock 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.organization_unblock_user(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to unblock (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.organization_unblock_user_with_http_info(org, username, **kwargs) # noqa: E501 + else: + (data) = self.organization_unblock_user_with_http_info(org, username, **kwargs) # noqa: E501 + return data + + def organization_unblock_user_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Unblock 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.organization_unblock_user_with_http_info(org, username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str username: username of the user to unblock (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'username'] # 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 organization_unblock_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `organization_unblock_user`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `organization_unblock_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/blocks/{username}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 rename_org(self, org, body, **kwargs): # noqa: E501 + """Rename an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rename_org(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: existing org name (required) + :param RenameOrgOption body: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.rename_org_with_http_info(org, body, **kwargs) # noqa: E501 + else: + (data) = self.rename_org_with_http_info(org, body, **kwargs) # noqa: E501 + return data + + def rename_org_with_http_info(self, org, body, **kwargs): # noqa: E501 + """Rename an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.rename_org_with_http_info(org, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: existing org name (required) + :param RenameOrgOption body: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', '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 rename_org" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `rename_org`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `rename_org`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/rename', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 team_search(self, org, **kwargs): # noqa: E501 + """Search for teams within an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.team_search(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str q: keywords to search + :param bool include_desc: include search within team description (defaults to true) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.team_search_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.team_search_with_http_info(org, **kwargs) # noqa: E501 + return data + + def team_search_with_http_info(self, org, **kwargs): # noqa: E501 + """Search for teams within an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.team_search_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str q: keywords to search + :param bool include_desc: include search within team description (defaults to true) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'q', 'include_desc', 'page', 'limit'] # 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 team_search" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `team_search`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'include_desc' in params: + query_params.append(('include_desc', params['include_desc'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/teams/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse200', # 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 update_org_secret(self, org, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_org_secret(org, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 + else: + (data) = self.update_org_secret_with_http_info(org, secretname, **kwargs) # noqa: E501 + return data + + def update_org_secret_with_http_info(self, org, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_org_secret_with_http_info(org, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'secretname', '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 update_org_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `update_org_secret`") # noqa: E501 + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `update_org_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/secrets/{secretname}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 update_org_variable(self, org, variablename, **kwargs): # noqa: E501 + """Update an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_org_variable(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :param UpdateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + else: + (data) = self.update_org_variable_with_http_info(org, variablename, **kwargs) # noqa: E501 + return data + + def update_org_variable_with_http_info(self, org, variablename, **kwargs): # noqa: E501 + """Update an org-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_org_variable_with_http_info(org, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param str variablename: name of the variable (required) + :param UpdateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'variablename', '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 update_org_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if self.api_client.client_side_validation and ('org' not in params or + params['org'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `update_org_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `update_org_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/actions/variables/{variablename}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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/swagger_client/api/package_api.py b/swagger_client/api/package_api.py new file mode 100644 index 0000000..e0ca9e1 --- /dev/null +++ b/swagger_client/api/package_api.py @@ -0,0 +1,978 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class PackageApi(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 delete_package(self, owner, type, name, version, **kwargs): # noqa: E501 + """Delete a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_package(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + else: + (data) = self.delete_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + return data + + def delete_package_with_http_info(self, owner, type, name, version, **kwargs): # noqa: E501 + """Delete a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_package_with_http_info(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', 'name', 'version'] # 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 delete_package" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `delete_package`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `delete_package`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `delete_package`") # noqa: E501 + # verify the required parameter 'version' is set + if self.api_client.client_side_validation and ('version' not in params or + params['version'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `version` when calling `delete_package`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + if 'version' in params: + path_params['version'] = params['version'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}/{version}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_latest_package_version(self, owner, type, name, **kwargs): # noqa: E501 + """Gets the latest version of a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_latest_package_version(owner, type, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :return: Package + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_latest_package_version_with_http_info(owner, type, name, **kwargs) # noqa: E501 + else: + (data) = self.get_latest_package_version_with_http_info(owner, type, name, **kwargs) # noqa: E501 + return data + + def get_latest_package_version_with_http_info(self, owner, type, name, **kwargs): # noqa: E501 + """Gets the latest version of a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_latest_package_version_with_http_info(owner, type, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :return: Package + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', '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 get_latest_package_version" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_latest_package_version`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `get_latest_package_version`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `get_latest_package_version`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}/-/latest', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Package', # 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 get_package(self, owner, type, name, version, **kwargs): # noqa: E501 + """Gets a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_package(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: Package + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + else: + (data) = self.get_package_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + return data + + def get_package_with_http_info(self, owner, type, name, version, **kwargs): # noqa: E501 + """Gets a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_package_with_http_info(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: Package + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', 'name', 'version'] # 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 get_package" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_package`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `get_package`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `get_package`") # noqa: E501 + # verify the required parameter 'version' is set + if self.api_client.client_side_validation and ('version' not in params or + params['version'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `version` when calling `get_package`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + if 'version' in params: + path_params['version'] = params['version'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}/{version}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Package', # 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 link_package(self, owner, type, name, repo_name, **kwargs): # noqa: E501 + """Link a package to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.link_package(owner, type, name, repo_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str repo_name: name of the repository to link. (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.link_package_with_http_info(owner, type, name, repo_name, **kwargs) # noqa: E501 + else: + (data) = self.link_package_with_http_info(owner, type, name, repo_name, **kwargs) # noqa: E501 + return data + + def link_package_with_http_info(self, owner, type, name, repo_name, **kwargs): # noqa: E501 + """Link a package to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.link_package_with_http_info(owner, type, name, repo_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str repo_name: name of the repository to link. (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', 'name', 'repo_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 link_package" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `link_package`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `link_package`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `link_package`") # noqa: E501 + # verify the required parameter 'repo_name' is set + if self.api_client.client_side_validation and ('repo_name' not in params or + params['repo_name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo_name` when calling `link_package`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + if 'repo_name' in params: + path_params['repo_name'] = params['repo_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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}/-/link/{repo_name}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 list_package_files(self, owner, type, name, version, **kwargs): # noqa: E501 + """Gets all files of a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_package_files(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: list[PackageFile] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_package_files_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + else: + (data) = self.list_package_files_with_http_info(owner, type, name, version, **kwargs) # noqa: E501 + return data + + def list_package_files_with_http_info(self, owner, type, name, version, **kwargs): # noqa: E501 + """Gets all files of a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_package_files_with_http_info(owner, type, name, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param str version: version of the package (required) + :return: list[PackageFile] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', 'name', 'version'] # 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 list_package_files" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_package_files`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `list_package_files`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `list_package_files`") # noqa: E501 + # verify the required parameter 'version' is set + if self.api_client.client_side_validation and ('version' not in params or + params['version'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `version` when calling `list_package_files`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + if 'version' in params: + path_params['version'] = params['version'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}/{version}/files', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PackageFile]', # 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 list_package_versions(self, owner, type, name, **kwargs): # noqa: E501 + """Gets all versions of a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_package_versions(owner, type, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Package] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_package_versions_with_http_info(owner, type, name, **kwargs) # noqa: E501 + else: + (data) = self.list_package_versions_with_http_info(owner, type, name, **kwargs) # noqa: E501 + return data + + def list_package_versions_with_http_info(self, owner, type, name, **kwargs): # noqa: E501 + """Gets all versions of a package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_package_versions_with_http_info(owner, type, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Package] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', 'name', 'page', 'limit'] # 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 list_package_versions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_package_versions`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `list_package_versions`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `list_package_versions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Package]', # 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 list_packages(self, owner, **kwargs): # noqa: E501 + """Gets all packages of an owner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_packages(owner, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the packages (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str type: package type filter + :param str q: name filter + :return: list[Package] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_packages_with_http_info(owner, **kwargs) # noqa: E501 + else: + (data) = self.list_packages_with_http_info(owner, **kwargs) # noqa: E501 + return data + + def list_packages_with_http_info(self, owner, **kwargs): # noqa: E501 + """Gets all packages of an owner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_packages_with_http_info(owner, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the packages (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param str type: package type filter + :param str q: name filter + :return: list[Package] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'page', 'limit', 'type', 'q'] # 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 list_packages" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_packages`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'q' in params: + query_params.append(('q', params['q'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Package]', # 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 unlink_package(self, owner, type, name, **kwargs): # noqa: E501 + """Unlink a package from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unlink_package(owner, type, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.unlink_package_with_http_info(owner, type, name, **kwargs) # noqa: E501 + else: + (data) = self.unlink_package_with_http_info(owner, type, name, **kwargs) # noqa: E501 + return data + + def unlink_package_with_http_info(self, owner, type, name, **kwargs): # noqa: E501 + """Unlink a package from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unlink_package_with_http_info(owner, type, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the package (required) + :param str type: type of the package (required) + :param str name: name of the package (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'type', '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 unlink_package" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `unlink_package`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in params or + params['type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `type` when calling `unlink_package`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `unlink_package`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/packages/{owner}/{type}/{name}/-/unlink', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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/swagger_client/api/repository_api.py b/swagger_client/api/repository_api.py new file mode 100644 index 0000000..e648da0 --- /dev/null +++ b/swagger_client/api/repository_api.py @@ -0,0 +1,21800 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class RepositoryApi(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 accept_repo_transfer(self, owner, repo, **kwargs): # noqa: E501 + """Accept a repo transfer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.accept_repo_transfer(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.accept_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.accept_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def accept_repo_transfer_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Accept a repo transfer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.accept_repo_transfer_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 accept_repo_transfer" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `accept_repo_transfer`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `accept_repo_transfer`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/transfer/accept', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 actions_disable_workflow(self, owner, repo, workflow_id, **kwargs): # noqa: E501 + """Disable a workflow # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_disable_workflow(owner, repo, workflow_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str workflow_id: id of the workflow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.actions_disable_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 + else: + (data) = self.actions_disable_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 + return data + + def actions_disable_workflow_with_http_info(self, owner, repo, workflow_id, **kwargs): # noqa: E501 + """Disable a workflow # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_disable_workflow_with_http_info(owner, repo, workflow_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str workflow_id: id of the workflow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'workflow_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 actions_disable_workflow" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `actions_disable_workflow`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `actions_disable_workflow`") # noqa: E501 + # verify the required parameter 'workflow_id' is set + if self.api_client.client_side_validation and ('workflow_id' not in params or + params['workflow_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `workflow_id` when calling `actions_disable_workflow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'workflow_id' in params: + path_params['workflow_id'] = params['workflow_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 actions_dispatch_workflow(self, owner, repo, workflow_id, **kwargs): # noqa: E501 + """Create a workflow dispatch event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_dispatch_workflow(owner, repo, workflow_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str workflow_id: id of the workflow (required) + :param CreateActionWorkflowDispatch body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.actions_dispatch_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 + else: + (data) = self.actions_dispatch_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 + return data + + def actions_dispatch_workflow_with_http_info(self, owner, repo, workflow_id, **kwargs): # noqa: E501 + """Create a workflow dispatch event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_dispatch_workflow_with_http_info(owner, repo, workflow_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str workflow_id: id of the workflow (required) + :param CreateActionWorkflowDispatch body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'workflow_id', '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 actions_dispatch_workflow" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `actions_dispatch_workflow`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `actions_dispatch_workflow`") # noqa: E501 + # verify the required parameter 'workflow_id' is set + if self.api_client.client_side_validation and ('workflow_id' not in params or + params['workflow_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `workflow_id` when calling `actions_dispatch_workflow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'workflow_id' in params: + path_params['workflow_id'] = params['workflow_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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 actions_enable_workflow(self, owner, repo, workflow_id, **kwargs): # noqa: E501 + """Enable a workflow # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_enable_workflow(owner, repo, workflow_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str workflow_id: id of the workflow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.actions_enable_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 + else: + (data) = self.actions_enable_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 + return data + + def actions_enable_workflow_with_http_info(self, owner, repo, workflow_id, **kwargs): # noqa: E501 + """Enable a workflow # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_enable_workflow_with_http_info(owner, repo, workflow_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str workflow_id: id of the workflow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'workflow_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 actions_enable_workflow" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `actions_enable_workflow`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `actions_enable_workflow`") # noqa: E501 + # verify the required parameter 'workflow_id' is set + if self.api_client.client_side_validation and ('workflow_id' not in params or + params['workflow_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `workflow_id` when calling `actions_enable_workflow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'workflow_id' in params: + path_params['workflow_id'] = params['workflow_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 actions_get_workflow(self, owner, repo, workflow_id, **kwargs): # noqa: E501 + """Get a workflow # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_get_workflow(owner, repo, workflow_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str workflow_id: id of the workflow (required) + :return: ActionWorkflow + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.actions_get_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 + else: + (data) = self.actions_get_workflow_with_http_info(owner, repo, workflow_id, **kwargs) # noqa: E501 + return data + + def actions_get_workflow_with_http_info(self, owner, repo, workflow_id, **kwargs): # noqa: E501 + """Get a workflow # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_get_workflow_with_http_info(owner, repo, workflow_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str workflow_id: id of the workflow (required) + :return: ActionWorkflow + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'workflow_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 actions_get_workflow" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `actions_get_workflow`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `actions_get_workflow`") # noqa: E501 + # verify the required parameter 'workflow_id' is set + if self.api_client.client_side_validation and ('workflow_id' not in params or + params['workflow_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `workflow_id` when calling `actions_get_workflow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'workflow_id' in params: + path_params['workflow_id'] = params['workflow_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/workflows/{workflow_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflow', # 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 actions_list_repository_workflows(self, owner, repo, **kwargs): # noqa: E501 + """List repository workflows # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_list_repository_workflows(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: ActionWorkflowResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.actions_list_repository_workflows_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.actions_list_repository_workflows_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def actions_list_repository_workflows_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List repository workflows # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.actions_list_repository_workflows_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: ActionWorkflowResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 actions_list_repository_workflows" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `actions_list_repository_workflows`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `actions_list_repository_workflows`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/workflows', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowResponse', # 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 create_current_user_repo(self, **kwargs): # noqa: E501 + """Create a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_current_user_repo(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + return data + + def create_current_user_repo_with_http_info(self, **kwargs): # noqa: E501 + """Create a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_current_user_repo_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + 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 create_current_user_repo" % key + ) + params[key] = val + del params['kwargs'] + + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 create_fork(self, owner, repo, **kwargs): # noqa: E501 + """Fork a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_fork(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to fork (required) + :param str repo: name of the repo to fork (required) + :param CreateForkOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_fork_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.create_fork_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def create_fork_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Fork a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_fork_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to fork (required) + :param str repo: name of the repo to fork (required) + :param CreateForkOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 create_fork" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `create_fork`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `create_fork`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/forks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 create_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Create a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_repo_variable(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :param CreateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + else: + (data) = self.create_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + return data + + def create_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Create a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_repo_variable_with_http_info(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :param CreateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'variablename', '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 create_repo_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `create_repo_variable`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `create_repo_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `create_repo_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables/{variablename}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_action_run(self, owner, repo, run, **kwargs): # noqa: E501 + """Delete a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_action_run(owner, repo, run, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int run: runid of the workflow run (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_action_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 + else: + (data) = self.delete_action_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 + return data + + def delete_action_run_with_http_info(self, owner, repo, run, **kwargs): # noqa: E501 + """Delete a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_action_run_with_http_info(owner, repo, run, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int run: runid of the workflow run (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'run'] # 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 delete_action_run" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `delete_action_run`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `delete_action_run`") # noqa: E501 + # verify the required parameter 'run' is set + if self.api_client.client_side_validation and ('run' not in params or + params['run'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `run` when calling `delete_action_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'run' in params: + path_params['run'] = params['run'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runs/{run}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_artifact(self, owner, repo, artifact_id, **kwargs): # noqa: E501 + """Deletes a specific artifact for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_artifact(owner, repo, artifact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str artifact_id: id of the artifact (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 + return data + + def delete_artifact_with_http_info(self, owner, repo, artifact_id, **kwargs): # noqa: E501 + """Deletes a specific artifact for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_artifact_with_http_info(owner, repo, artifact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str artifact_id: id of the artifact (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'artifact_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 delete_artifact" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `delete_artifact`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `delete_artifact`") # noqa: E501 + # verify the required parameter 'artifact_id' is set + if self.api_client.client_side_validation and ('artifact_id' not in params or + params['artifact_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `artifact_id` when calling `delete_artifact`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'artifact_id' in params: + path_params['artifact_id'] = params['artifact_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_repo_runner(self, owner, repo, runner_id, **kwargs): # noqa: E501 + """Delete an repo-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_repo_runner(owner, repo, runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_repo_runner_with_http_info(owner, repo, runner_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_repo_runner_with_http_info(owner, repo, runner_id, **kwargs) # noqa: E501 + return data + + def delete_repo_runner_with_http_info(self, owner, repo, runner_id, **kwargs): # noqa: E501 + """Delete an repo-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_repo_runner_with_http_info(owner, repo, runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'runner_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 delete_repo_runner" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `delete_repo_runner`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `delete_repo_runner`") # noqa: E501 + # verify the required parameter 'runner_id' is set + if self.api_client.client_side_validation and ('runner_id' not in params or + params['runner_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `runner_id` when calling `delete_repo_runner`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'runner_id' in params: + path_params['runner_id'] = params['runner_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runners/{runner_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_repo_secret(self, owner, repo, secretname, **kwargs): # noqa: E501 + """Delete a secret in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_repo_secret(owner, repo, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param str secretname: name of the secret (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 + else: + (data) = self.delete_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 + return data + + def delete_repo_secret_with_http_info(self, owner, repo, secretname, **kwargs): # noqa: E501 + """Delete a secret in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_repo_secret_with_http_info(owner, repo, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param str secretname: name of the secret (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'secretname'] # 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 delete_repo_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `delete_repo_secret`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `delete_repo_secret`") # noqa: E501 + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `delete_repo_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/secrets/{secretname}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Delete a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_repo_variable(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + else: + (data) = self.delete_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + return data + + def delete_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Delete a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_repo_variable_with_http_info(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'variablename'] # 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 delete_repo_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `delete_repo_variable`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `delete_repo_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `delete_repo_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables/{variablename}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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 download_actions_run_job_logs(self, owner, repo, job_id, **kwargs): # noqa: E501 + """Downloads the job logs for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_actions_run_job_logs(owner, repo, job_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int job_id: id of the job (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.download_actions_run_job_logs_with_http_info(owner, repo, job_id, **kwargs) # noqa: E501 + else: + (data) = self.download_actions_run_job_logs_with_http_info(owner, repo, job_id, **kwargs) # noqa: E501 + return data + + def download_actions_run_job_logs_with_http_info(self, owner, repo, job_id, **kwargs): # noqa: E501 + """Downloads the job logs for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_actions_run_job_logs_with_http_info(owner, repo, job_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int job_id: id of the job (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'job_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 download_actions_run_job_logs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `download_actions_run_job_logs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `download_actions_run_job_logs`") # noqa: E501 + # verify the required parameter 'job_id' is set + if self.api_client.client_side_validation and ('job_id' not in params or + params['job_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `job_id` when calling `download_actions_run_job_logs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'job_id' in params: + path_params['job_id'] = params['job_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/jobs/{job_id}/logs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 download_artifact(self, owner, repo, artifact_id, **kwargs): # noqa: E501 + """Downloads a specific artifact for a workflow run redirects to blob url # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_artifact(owner, repo, artifact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str artifact_id: id of the artifact (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.download_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 + else: + (data) = self.download_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 + return data + + def download_artifact_with_http_info(self, owner, repo, artifact_id, **kwargs): # noqa: E501 + """Downloads a specific artifact for a workflow run redirects to blob url # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_artifact_with_http_info(owner, repo, artifact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str artifact_id: id of the artifact (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'artifact_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 download_artifact" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `download_artifact`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `download_artifact`") # noqa: E501 + # verify the required parameter 'artifact_id' is set + if self.api_client.client_side_validation and ('artifact_id' not in params or + params['artifact_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `artifact_id` when calling `download_artifact`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'artifact_id' in params: + path_params['artifact_id'] = params['artifact_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 generate_repo(self, template_owner, template_repo, **kwargs): # noqa: E501 + """Create a repository using a template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_repo(template_owner, template_repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str template_owner: owner of the template repository (required) + :param str template_repo: name of the template repository (required) + :param GenerateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.generate_repo_with_http_info(template_owner, template_repo, **kwargs) # noqa: E501 + else: + (data) = self.generate_repo_with_http_info(template_owner, template_repo, **kwargs) # noqa: E501 + return data + + def generate_repo_with_http_info(self, template_owner, template_repo, **kwargs): # noqa: E501 + """Create a repository using a template # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_repo_with_http_info(template_owner, template_repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str template_owner: owner of the template repository (required) + :param str template_repo: name of the template repository (required) + :param GenerateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['template_owner', 'template_repo', '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 generate_repo" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'template_owner' is set + if self.api_client.client_side_validation and ('template_owner' not in params or + params['template_owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `template_owner` when calling `generate_repo`") # noqa: E501 + # verify the required parameter 'template_repo' is set + if self.api_client.client_side_validation and ('template_repo' not in params or + params['template_repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `template_repo` when calling `generate_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'template_owner' in params: + path_params['template_owner'] = params['template_owner'] # noqa: E501 + if 'template_repo' in params: + path_params['template_repo'] = params['template_repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{template_owner}/{template_repo}/generate', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 get_annotated_tag(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tag object of an annotated tag (not lightweight 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.get_annotated_tag(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) + :return: AnnotatedTag + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_annotated_tag_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.get_annotated_tag_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def get_annotated_tag_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tag object of an annotated tag (not lightweight 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.get_annotated_tag_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) + :return: AnnotatedTag + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha'] # 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 get_annotated_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_annotated_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_annotated_tag`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `get_annotated_tag`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/tags/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AnnotatedTag', # 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 get_artifact(self, owner, repo, artifact_id, **kwargs): # noqa: E501 + """Gets a specific artifact for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_artifact(owner, repo, artifact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str artifact_id: id of the artifact (required) + :return: ActionArtifact + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 + else: + (data) = self.get_artifact_with_http_info(owner, repo, artifact_id, **kwargs) # noqa: E501 + return data + + def get_artifact_with_http_info(self, owner, repo, artifact_id, **kwargs): # noqa: E501 + """Gets a specific artifact for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_artifact_with_http_info(owner, repo, artifact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str artifact_id: id of the artifact (required) + :return: ActionArtifact + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'artifact_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 get_artifact" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_artifact`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_artifact`") # noqa: E501 + # verify the required parameter 'artifact_id' is set + if self.api_client.client_side_validation and ('artifact_id' not in params or + params['artifact_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `artifact_id` when calling `get_artifact`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'artifact_id' in params: + path_params['artifact_id'] = params['artifact_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/artifacts/{artifact_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionArtifact', # 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 get_artifacts(self, owner, repo, **kwargs): # noqa: E501 + """Lists all artifacts for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_artifacts(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str name: name of the artifact + :return: ActionArtifactsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_artifacts_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.get_artifacts_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def get_artifacts_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Lists all artifacts for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_artifacts_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str name: name of the artifact + :return: ActionArtifactsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 get_artifacts" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_artifacts`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_artifacts`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/artifacts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionArtifactsResponse', # 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 get_artifacts_of_run(self, owner, repo, run, **kwargs): # noqa: E501 + """Lists all artifacts for a repository run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_artifacts_of_run(owner, repo, run, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int run: runid of the workflow run (required) + :param str name: name of the artifact + :return: ActionArtifactsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_artifacts_of_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 + else: + (data) = self.get_artifacts_of_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 + return data + + def get_artifacts_of_run_with_http_info(self, owner, repo, run, **kwargs): # noqa: E501 + """Lists all artifacts for a repository run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_artifacts_of_run_with_http_info(owner, repo, run, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int run: runid of the workflow run (required) + :param str name: name of the artifact + :return: ActionArtifactsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'run', '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 get_artifacts_of_run" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_artifacts_of_run`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_artifacts_of_run`") # noqa: E501 + # verify the required parameter 'run' is set + if self.api_client.client_side_validation and ('run' not in params or + params['run'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `run` when calling `get_artifacts_of_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'run' in params: + path_params['run'] = params['run'] # noqa: E501 + + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runs/{run}/artifacts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionArtifactsResponse', # 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 get_blob(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the blob of a repository. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_blob(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :return: GitBlobResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_blob_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.get_blob_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def get_blob_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the blob of a repository. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_blob_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :return: GitBlobResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha'] # 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 get_blob" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_blob`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_blob`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `get_blob`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/blobs/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitBlobResponse', # 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 get_repo_runner(self, owner, repo, runner_id, **kwargs): # noqa: E501 + """Get an repo-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repo_runner(owner, repo, runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_repo_runner_with_http_info(owner, repo, runner_id, **kwargs) # noqa: E501 + else: + (data) = self.get_repo_runner_with_http_info(owner, repo, runner_id, **kwargs) # noqa: E501 + return data + + def get_repo_runner_with_http_info(self, owner, repo, runner_id, **kwargs): # noqa: E501 + """Get an repo-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repo_runner_with_http_info(owner, repo, runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'runner_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 get_repo_runner" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_repo_runner`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_repo_runner`") # noqa: E501 + # verify the required parameter 'runner_id' is set + if self.api_client.client_side_validation and ('runner_id' not in params or + params['runner_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `runner_id` when calling `get_repo_runner`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'runner_id' in params: + path_params['runner_id'] = params['runner_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runners/{runner_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_repo_runners(self, owner, repo, **kwargs): # noqa: E501 + """Get repo-level runners # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repo_runners(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_repo_runners_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.get_repo_runners_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def get_repo_runners_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get repo-level runners # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repo_runners_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 get_repo_runners" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_repo_runners`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_repo_runners`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runners', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Get a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repo_variable(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + else: + (data) = self.get_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + return data + + def get_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Get a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repo_variable_with_http_info(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'variablename'] # 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 get_repo_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_repo_variable`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_repo_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `get_repo_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables/{variablename}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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 get_repo_variables_list(self, owner, repo, **kwargs): # noqa: E501 + """Get repo-level variables list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repo_variables_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_repo_variables_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.get_repo_variables_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def get_repo_variables_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get repo-level variables list # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repo_variables_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 get_repo_variables_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_repo_variables_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_repo_variables_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ActionVariable]', # 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 get_tree(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tree of a repository. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tree(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :param bool recursive: show all directories and files + :param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page + :param int per_page: number of items per page + :return: GitTreeResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.get_tree_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def get_tree_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Gets the tree of a repository. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tree_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :param bool recursive: show all directories and files + :param int page: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page + :param int per_page: number of items per page + :return: GitTreeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'recursive', 'page', 'per_page'] # 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 get_tree" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_tree`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_tree`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `get_tree`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + + query_params = [] + if 'recursive' in params: + query_params.append(('recursive', params['recursive'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'per_page' in params: + query_params.append(('per_page', params['per_page'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/trees/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitTreeResponse', # 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 get_workflow_job(self, owner, repo, job_id, **kwargs): # noqa: E501 + """Gets a specific workflow job for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_workflow_job(owner, repo, job_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str job_id: id of the job (required) + :return: ActionWorkflowJob + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_workflow_job_with_http_info(owner, repo, job_id, **kwargs) # noqa: E501 + else: + (data) = self.get_workflow_job_with_http_info(owner, repo, job_id, **kwargs) # noqa: E501 + return data + + def get_workflow_job_with_http_info(self, owner, repo, job_id, **kwargs): # noqa: E501 + """Gets a specific workflow job for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_workflow_job_with_http_info(owner, repo, job_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str job_id: id of the job (required) + :return: ActionWorkflowJob + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'job_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 get_workflow_job" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_workflow_job`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_workflow_job`") # noqa: E501 + # verify the required parameter 'job_id' is set + if self.api_client.client_side_validation and ('job_id' not in params or + params['job_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `job_id` when calling `get_workflow_job`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'job_id' in params: + path_params['job_id'] = params['job_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/jobs/{job_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowJob', # 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 get_workflow_run(self, owner, repo, run, **kwargs): # noqa: E501 + """Gets a specific workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_workflow_run(owner, repo, run, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str run: id of the run (required) + :return: ActionWorkflowRun + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_workflow_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 + else: + (data) = self.get_workflow_run_with_http_info(owner, repo, run, **kwargs) # noqa: E501 + return data + + def get_workflow_run_with_http_info(self, owner, repo, run, **kwargs): # noqa: E501 + """Gets a specific workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_workflow_run_with_http_info(owner, repo, run, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str run: id of the run (required) + :return: ActionWorkflowRun + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'run'] # 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 get_workflow_run" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_workflow_run`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_workflow_run`") # noqa: E501 + # verify the required parameter 'run' is set + if self.api_client.client_side_validation and ('run' not in params or + params['run'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `run` when calling `get_workflow_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'run' in params: + path_params['run'] = params['run'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runs/{run}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowRun', # 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 get_workflow_runs(self, owner, repo, **kwargs): # noqa: E501 + """Lists all runs for a repository run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_workflow_runs(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str event: workflow event name + :param str branch: workflow branch + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param str actor: triggered by user + :param str head_sha: triggering sha of the workflow run + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowRunsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_workflow_runs_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.get_workflow_runs_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def get_workflow_runs_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Lists all runs for a repository run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_workflow_runs_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str event: workflow event name + :param str branch: workflow branch + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param str actor: triggered by user + :param str head_sha: triggering sha of the workflow run + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowRunsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'event', 'branch', 'status', 'actor', 'head_sha', 'page', 'limit'] # 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 get_workflow_runs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `get_workflow_runs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `get_workflow_runs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'event' in params: + query_params.append(('event', params['event'])) # noqa: E501 + if 'branch' in params: + query_params.append(('branch', params['branch'])) # noqa: E501 + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'actor' in params: + query_params.append(('actor', params['actor'])) # noqa: E501 + if 'head_sha' in params: + query_params.append(('head_sha', params['head_sha'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowRunsResponse', # 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 list_action_tasks(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's action tasks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_action_tasks(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 + :return: ActionTaskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_action_tasks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.list_action_tasks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def list_action_tasks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's action tasks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_action_tasks_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 + :return: ActionTaskResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 list_action_tasks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_action_tasks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `list_action_tasks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/tasks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionTaskResponse', # 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 list_forks(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's forks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_forks(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.list_forks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def list_forks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's forks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_forks_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 list_forks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_forks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `list_forks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/forks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # 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 list_workflow_jobs(self, owner, repo, **kwargs): # noqa: E501 + """Lists all jobs for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_workflow_jobs(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_workflow_jobs_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.list_workflow_jobs_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def list_workflow_jobs_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Lists all jobs for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_workflow_jobs_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'status', 'page', 'limit'] # 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 list_workflow_jobs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_workflow_jobs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `list_workflow_jobs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/jobs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowJobsResponse', # 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 list_workflow_run_jobs(self, owner, repo, run, **kwargs): # noqa: E501 + """Lists all jobs for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_workflow_run_jobs(owner, repo, run, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int run: runid of the workflow run (required) + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_workflow_run_jobs_with_http_info(owner, repo, run, **kwargs) # noqa: E501 + else: + (data) = self.list_workflow_run_jobs_with_http_info(owner, repo, run, **kwargs) # noqa: E501 + return data + + def list_workflow_run_jobs_with_http_info(self, owner, repo, run, **kwargs): # noqa: E501 + """Lists all jobs for a workflow run # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_workflow_run_jobs_with_http_info(owner, repo, run, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int run: runid of the workflow run (required) + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'run', 'status', 'page', 'limit'] # 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 list_workflow_run_jobs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `list_workflow_run_jobs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `list_workflow_run_jobs`") # noqa: E501 + # verify the required parameter 'run' is set + if self.api_client.client_side_validation and ('run' not in params or + params['run'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `run` when calling `list_workflow_run_jobs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'run' in params: + path_params['run'] = params['run'] # noqa: E501 + + query_params = [] + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runs/{run}/jobs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowJobsResponse', # 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 reject_repo_transfer(self, owner, repo, **kwargs): # noqa: E501 + """Reject a repo transfer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reject_repo_transfer(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.reject_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.reject_repo_transfer_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def reject_repo_transfer_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Reject a repo transfer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reject_repo_transfer_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 reject_repo_transfer" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `reject_repo_transfer`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `reject_repo_transfer`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/transfer/reject', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 repo_add_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Add or Update a collaborator to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_collaborator(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the user to add or update as a collaborator (required) + :param AddCollaboratorOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_add_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Add or Update a collaborator to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_collaborator_with_http_info(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the user to add or update as a collaborator (required) + :param AddCollaboratorOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator', '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 repo_add_collaborator" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_add_collaborator`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_add_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if self.api_client.client_side_validation and ('collaborator' not in params or + params['collaborator'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `collaborator` when calling `repo_add_collaborator`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators/{collaborator}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_add_push_mirror(self, owner, repo, **kwargs): # noqa: E501 + """add a push mirror to the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_push_mirror(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreatePushMirrorOption body: + :return: PushMirror + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_add_push_mirror_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_push_mirror_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_add_push_mirror_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """add a push mirror to the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_push_mirror_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreatePushMirrorOption body: + :return: PushMirror + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_add_push_mirror" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_add_push_mirror`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_add_push_mirror`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PushMirror', # 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 repo_add_team(self, owner, repo, team, **kwargs): # noqa: E501 + """Add a team to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_team(owner, repo, team, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str team: team name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_add_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + return data + + def repo_add_team_with_http_info(self, owner, repo, team, **kwargs): # noqa: E501 + """Add a team to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_team_with_http_info(owner, repo, team, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str team: team name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'team'] # 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 repo_add_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_add_team`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_add_team`") # noqa: E501 + # verify the required parameter 'team' is set + if self.api_client.client_side_validation and ('team' not in params or + params['team'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `team` when calling `repo_add_team`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'team' in params: + path_params['team'] = params['team'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/teams/{team}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_add_topic(self, owner, repo, topic, **kwargs): # noqa: E501 + """Add a topic to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_topic(owner, repo, topic, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str topic: name of the topic to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_add_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + else: + (data) = self.repo_add_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + return data + + def repo_add_topic_with_http_info(self, owner, repo, topic, **kwargs): # noqa: E501 + """Add a topic to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_add_topic_with_http_info(owner, repo, topic, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str topic: name of the topic to add (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'topic'] # 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 repo_add_topic" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_add_topic`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_add_topic`") # noqa: E501 + # verify the required parameter 'topic' is set + if self.api_client.client_side_validation and ('topic' not in params or + params['topic'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `topic` when calling `repo_add_topic`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'topic' in params: + path_params['topic'] = params['topic'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/topics/{topic}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_apply_diff_patch(self, owner, repo, body, **kwargs): # noqa: E501 + """Apply diff patch to repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_apply_diff_patch(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param ApplyDiffPatchFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_apply_diff_patch_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_apply_diff_patch_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + return data + + def repo_apply_diff_patch_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 + """Apply diff patch to repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_apply_diff_patch_with_http_info(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param ApplyDiffPatchFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_apply_diff_patch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_apply_diff_patch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_apply_diff_patch`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_apply_diff_patch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/diffpatch', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileResponse', # 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 repo_cancel_scheduled_auto_merge(self, owner, repo, index, **kwargs): # noqa: E501 + """Cancel the scheduled auto merge for the given pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_cancel_scheduled_auto_merge(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to merge (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_cancel_scheduled_auto_merge_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_cancel_scheduled_auto_merge_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_cancel_scheduled_auto_merge_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Cancel the scheduled auto merge for the given pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_cancel_scheduled_auto_merge_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to merge (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 repo_cancel_scheduled_auto_merge" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_cancel_scheduled_auto_merge`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_cancel_scheduled_auto_merge`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_cancel_scheduled_auto_merge`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/merge', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_change_files(self, owner, repo, body, **kwargs): # noqa: E501 + """Modify multiple files in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_change_files(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param ChangeFilesOptions body: (required) + :return: FilesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_change_files_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_change_files_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + return data + + def repo_change_files_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 + """Modify multiple files in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_change_files_with_http_info(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param ChangeFilesOptions body: (required) + :return: FilesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_change_files" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_change_files`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_change_files`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_change_files`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FilesResponse', # 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 repo_check_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Check if a user is a collaborator of a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_check_collaborator(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the user to check for being a collaborator (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_check_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_check_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Check if a user is a collaborator of a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_check_collaborator_with_http_info(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the user to check for being a collaborator (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator'] # 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 repo_check_collaborator" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_check_collaborator`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_check_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if self.api_client.client_side_validation and ('collaborator' not in params or + params['collaborator'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `collaborator` when calling `repo_check_collaborator`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators/{collaborator}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_check_team(self, owner, repo, team, **kwargs): # noqa: E501 + """Check if a team is assigned to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_check_team(owner, repo, team, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str team: team name (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_check_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + else: + (data) = self.repo_check_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + return data + + def repo_check_team_with_http_info(self, owner, repo, team, **kwargs): # noqa: E501 + """Check if a team is assigned to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_check_team_with_http_info(owner, repo, team, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str team: team name (required) + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'team'] # 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 repo_check_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_check_team`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_check_team`") # noqa: E501 + # verify the required parameter 'team' is set + if self.api_client.client_side_validation and ('team' not in params or + params['team'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `team` when calling `repo_check_team`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'team' in params: + path_params['team'] = params['team'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/teams/{team}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # 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 repo_compare_diff(self, owner, repo, basehead, **kwargs): # noqa: E501 + """Get commit comparison information # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_compare_diff(owner, repo, basehead, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str basehead: compare two branches or commits (required) + :return: Compare + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_compare_diff_with_http_info(owner, repo, basehead, **kwargs) # noqa: E501 + else: + (data) = self.repo_compare_diff_with_http_info(owner, repo, basehead, **kwargs) # noqa: E501 + return data + + def repo_compare_diff_with_http_info(self, owner, repo, basehead, **kwargs): # noqa: E501 + """Get commit comparison information # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_compare_diff_with_http_info(owner, repo, basehead, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str basehead: compare two branches or commits (required) + :return: Compare + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'basehead'] # 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 repo_compare_diff" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_compare_diff`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_compare_diff`") # noqa: E501 + # verify the required parameter 'basehead' is set + if self.api_client.client_side_validation and ('basehead' not in params or + params['basehead'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `basehead` when calling `repo_compare_diff`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'basehead' in params: + path_params['basehead'] = params['basehead'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/compare/{basehead}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Compare', # 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 repo_create_branch(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_branch(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateBranchRepoOption body: + :return: Branch + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_branch_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_branch_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_branch_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_branch_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateBranchRepoOption body: + :return: Branch + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_create_branch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_branch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_branch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Branch', # 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 repo_create_branch_protection(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_branch_protection(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateBranchProtectionOption body: + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_branch_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_branch_protection_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateBranchProtectionOption body: + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_create_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_branch_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BranchProtection', # 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 repo_create_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Create a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_file(owner, repo, filepath, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to create (required) + :param CreateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + return data + + def repo_create_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Create a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_file_with_http_info(owner, repo, filepath, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to create (required) + :param CreateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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 repo_create_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_file`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_create_file`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_create_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents/{filepath}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileResponse', # 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 repo_create_hook(self, owner, repo, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_hook(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_hook_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_hook_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_hook_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_create_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 repo_create_key(self, owner, repo, **kwargs): # noqa: E501 + """Add a key to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_key(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateKeyOption body: + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Add a key to a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_key_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateKeyOption body: + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_create_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeployKey', # 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 repo_create_pull_request(self, owner, repo, **kwargs): # noqa: E501 + """Create a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_pull_request(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreatePullRequestOption body: + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_pull_request_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_pull_request_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_pull_request_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreatePullRequestOption body: + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_create_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullRequest', # 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 repo_create_pull_review(self, owner, repo, index, body, **kwargs): # noqa: E501 + """Create a review to an pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_pull_review(owner, repo, index, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param CreatePullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_pull_review_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_pull_review_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + return data + + def repo_create_pull_review_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 + """Create a review to an pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_pull_review_with_http_info(owner, repo, index, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param CreatePullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 repo_create_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_create_pull_review`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_create_pull_review`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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 repo_create_pull_review_requests(self, owner, repo, index, body, **kwargs): # noqa: E501 + """create review requests for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_pull_review_requests(owner, repo, index, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param PullReviewRequestOptions body: (required) + :return: list[PullReview] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + return data + + def repo_create_pull_review_requests_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 + """create review requests for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_pull_review_requests_with_http_info(owner, repo, index, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param PullReviewRequestOptions body: (required) + :return: list[PullReview] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 repo_create_pull_review_requests" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_review_requests`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_review_requests`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_create_pull_review_requests`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_create_pull_review_requests`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/requested_reviewers', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PullReview]', # 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 repo_create_release(self, owner, repo, **kwargs): # noqa: E501 + """Create a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_release(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateReleaseOption body: + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_release_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_release_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateReleaseOption body: + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_create_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Release', # 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 repo_create_release_attachment(self, owner, repo, id, **kwargs): # noqa: E501 + """Create a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_release_attachment(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param str name: name of the attachment + :param file attachment: attachment to upload + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_release_attachment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_release_attachment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_create_release_attachment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Create a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_release_attachment_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param str name: name of the attachment + :param file attachment: attachment to upload + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'name', 'attachment'] # 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 repo_create_release_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_create_release_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + if 'attachment' in params: + local_var_files['attachment'] = params['attachment'] # noqa: E501 + + body_params = None + # 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 + ['multipart/form-data', 'application/octet-stream']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # 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 repo_create_runner_registration_token(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository's actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_runner_registration_token(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_runner_registration_token_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository's actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_runner_registration_token_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_create_runner_registration_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_runner_registration_token`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_runner_registration_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runners/registration-token', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_create_status(self, owner, repo, sha, **kwargs): # noqa: E501 + """Create a commit status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_status(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :param CreateStatusOption body: + :return: CommitStatus + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_status_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_create_status_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Create a commit status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_status_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :param CreateStatusOption body: + :return: CommitStatus + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', '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 repo_create_status" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_status`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_status`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_create_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/statuses/{sha}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CommitStatus', # 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 repo_create_tag(self, owner, repo, **kwargs): # noqa: E501 + """Create a new git tag in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_tag(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateTagOption body: + :return: Tag + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_tag_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_tag_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_tag_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a new git tag in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_tag_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateTagOption body: + :return: Tag + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_create_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_tag`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tags', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Tag', # 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 repo_create_tag_protection(self, owner, repo, **kwargs): # noqa: E501 + """Create a tag protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_tag_protection(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateTagProtectionOption body: + :return: TagProtection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_tag_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a tag protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_tag_protection_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateTagProtectionOption body: + :return: TagProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_create_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_tag_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TagProtection', # 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 repo_create_wiki_page(self, owner, repo, **kwargs): # noqa: E501 + """Create a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_wiki_page(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateWikiPageOptions body: + :return: WikiPage + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_wiki_page_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_wiki_page_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_wiki_page_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_wiki_page_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateWikiPageOptions body: + :return: WikiPage + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_create_wiki_page" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_create_wiki_page`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_create_wiki_page`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/new', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WikiPage', # 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 repo_delete(self, owner, repo, **kwargs): # noqa: E501 + """Delete a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to delete (required) + :param str repo: name of the repo to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_delete_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Delete a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to delete (required) + :param str repo: name of the repo to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_avatar(self, owner, repo, **kwargs): # noqa: E501 + """Delete avatar # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_avatar(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_delete_avatar_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Delete avatar # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_avatar_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_delete_avatar" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_avatar`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_avatar`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/avatar', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_branch(self, owner, repo, branch, **kwargs): # noqa: E501 + """Delete a specific branch from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_branch(owner, repo, branch, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str branch: branch to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + return data + + def repo_delete_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 + """Delete a specific branch from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_branch_with_http_info(owner, repo, branch, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str branch: branch to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'branch'] # 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 repo_delete_branch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_branch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_branch`") # noqa: E501 + # verify the required parameter 'branch' is set + if self.api_client.client_side_validation and ('branch' not in params or + params['branch'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `branch` when calling `repo_delete_branch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'branch' in params: + path_params['branch'] = params['branch'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches/{branch}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 + """Delete a specific branch protection for the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_branch_protection(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: name of protected branch (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_delete_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Delete a specific branch protection for the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_branch_protection_with_http_info(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: name of protected branch (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_delete_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_branch_protection`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_delete_branch_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Delete a collaborator from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_collaborator(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Delete a collaborator from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_collaborator_with_http_info(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator'] # 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 repo_delete_collaborator" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_collaborator`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if self.api_client.client_side_validation and ('collaborator' not in params or + params['collaborator'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `collaborator` when calling `repo_delete_collaborator`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators/{collaborator}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Delete a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_file(owner, repo, filepath, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to delete (required) + :param DeleteFileOptions body: (required) + :return: FileDeleteResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + return data + + def repo_delete_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Delete a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_file_with_http_info(owner, repo, filepath, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to delete (required) + :param DeleteFileOptions body: (required) + :return: FileDeleteResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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 repo_delete_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_file`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_delete_file`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_delete_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents/{filepath}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileDeleteResponse', # 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 repo_delete_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a Git hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_git_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: id of the hook to get (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a Git hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_git_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: id of the hook to get (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_delete_git_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_git_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_git_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_git_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/git/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_delete_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_key(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a key from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_key(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a key from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_key_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_delete_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_key`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a specific review from a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_pull_review(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def repo_delete_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a specific review from a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_pull_review_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 repo_delete_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_delete_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_pull_review`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_pull_review_requests(self, owner, repo, index, body, **kwargs): # noqa: E501 + """cancel review requests for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_pull_review_requests(owner, repo, index, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param PullReviewRequestOptions body: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_pull_review_requests_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + return data + + def repo_delete_pull_review_requests_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 + """cancel review requests for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_pull_review_requests_with_http_info(owner, repo, index, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param PullReviewRequestOptions body: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 repo_delete_pull_review_requests" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_pull_review_requests`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_pull_review_requests`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_delete_pull_review_requests`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_delete_pull_review_requests`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/requested_reviewers', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_push_mirror(self, owner, repo, name, **kwargs): # noqa: E501 + """deletes a push mirror from a repository by remoteName # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_push_mirror(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: remote name of the pushMirror (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_push_mirror_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_push_mirror_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_delete_push_mirror_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """deletes a push mirror from a repository by remoteName # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_push_mirror_with_http_info(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: remote name of the pushMirror (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_delete_push_mirror" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_push_mirror`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_push_mirror`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_delete_push_mirror`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_release(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_delete_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release_attachment(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment_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 repo_delete_release_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `repo_delete_release_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_release_by_tag(self, owner, repo, tag, **kwargs): # noqa: E501 + """Delete a release by tag 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.repo_delete_release_by_tag(owner, repo, tag, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str tag: tag name of the release to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + return data + + def repo_delete_release_by_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 + """Delete a release by tag 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.repo_delete_release_by_tag_with_http_info(owner, repo, tag, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str tag: tag name of the release to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'tag'] # 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 repo_delete_release_by_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_by_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_by_tag`") # noqa: E501 + # verify the required parameter 'tag' is set + if self.api_client.client_side_validation and ('tag' not in params or + params['tag'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `tag` when calling `repo_delete_release_by_tag`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'tag' in params: + path_params['tag'] = params['tag'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/tags/{tag}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_tag(self, owner, repo, tag, **kwargs): # noqa: E501 + """Delete a repository's tag 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.repo_delete_tag(owner, repo, tag, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str tag: name of tag to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + return data + + def repo_delete_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 + """Delete a repository's tag 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.repo_delete_tag_with_http_info(owner, repo, tag, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str tag: name of tag to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'tag'] # 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 repo_delete_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_tag`") # noqa: E501 + # verify the required parameter 'tag' is set + if self.api_client.client_side_validation and ('tag' not in params or + params['tag'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `tag` when calling `repo_delete_tag`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'tag' in params: + path_params['tag'] = params['tag'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tags/{tag}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_tag_protection(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a specific tag protection for the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_tag_protection(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of protected tag (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_delete_tag_protection_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a specific tag protection for the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_tag_protection_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of protected tag (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_delete_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_tag_protection`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_tag_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_team(self, owner, repo, team, **kwargs): # noqa: E501 + """Delete a team from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_team(owner, repo, team, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str team: team name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_team_with_http_info(owner, repo, team, **kwargs) # noqa: E501 + return data + + def repo_delete_team_with_http_info(self, owner, repo, team, **kwargs): # noqa: E501 + """Delete a team from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_team_with_http_info(owner, repo, team, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str team: team name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'team'] # 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 repo_delete_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_team`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_team`") # noqa: E501 + # verify the required parameter 'team' is set + if self.api_client.client_side_validation and ('team' not in params or + params['team'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `team` when calling `repo_delete_team`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'team' in params: + path_params['team'] = params['team'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/teams/{team}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_topic(self, owner, repo, topic, **kwargs): # noqa: E501 + """Delete a topic from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_topic(owner, repo, topic, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str topic: name of the topic to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + return data + + def repo_delete_topic_with_http_info(self, owner, repo, topic, **kwargs): # noqa: E501 + """Delete a topic from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_topic_with_http_info(owner, repo, topic, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str topic: name of the topic to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'topic'] # 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 repo_delete_topic" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_topic`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_topic`") # noqa: E501 + # verify the required parameter 'topic' is set + if self.api_client.client_side_validation and ('topic' not in params or + params['topic'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `topic` when calling `repo_delete_topic`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'topic' in params: + path_params['topic'] = params['topic'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/topics/{topic}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_delete_wiki_page(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Delete a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_wiki_page(owner, repo, page_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str page_name: name of the page (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_delete_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + else: + (data) = self.repo_delete_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + return data + + def repo_delete_wiki_page_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Delete a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_delete_wiki_page_with_http_info(owner, repo, page_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str page_name: name of the page (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page_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 repo_delete_wiki_page" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_wiki_page`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_wiki_page`") # noqa: E501 + # verify the required parameter 'page_name' is set + if self.api_client.client_side_validation and ('page_name' not in params or + params['page_name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `page_name` when calling `repo_delete_wiki_page`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'page_name' in params: + path_params['pageName'] = params['page_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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/page/{pageName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_dismiss_pull_review(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Dismiss a review for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_dismiss_pull_review(owner, repo, index, id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :param DismissPullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_dismiss_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_dismiss_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + return data + + def repo_dismiss_pull_review_with_http_info(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Dismiss a review for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_dismiss_pull_review_with_http_info(owner, repo, index, id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :param DismissPullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'id', '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 repo_dismiss_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_dismiss_pull_review`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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 repo_download_commit_diff_or_patch(self, owner, repo, sha, diff_type, **kwargs): # noqa: E501 + """Get a commit's diff or patch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_download_commit_diff_or_patch(owner, repo, sha, diff_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: SHA of the commit to get (required) + :param str diff_type: whether the output is diff or patch (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_download_commit_diff_or_patch_with_http_info(owner, repo, sha, diff_type, **kwargs) # noqa: E501 + else: + (data) = self.repo_download_commit_diff_or_patch_with_http_info(owner, repo, sha, diff_type, **kwargs) # noqa: E501 + return data + + def repo_download_commit_diff_or_patch_with_http_info(self, owner, repo, sha, diff_type, **kwargs): # noqa: E501 + """Get a commit's diff or patch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_download_commit_diff_or_patch_with_http_info(owner, repo, sha, diff_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: SHA of the commit to get (required) + :param str diff_type: whether the output is diff or patch (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'diff_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 repo_download_commit_diff_or_patch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 + # verify the required parameter 'diff_type' is set + if self.api_client.client_side_validation and ('diff_type' not in params or + params['diff_type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `diff_type` when calling `repo_download_commit_diff_or_patch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + if 'diff_type' in params: + path_params['diffType'] = params['diff_type'] # 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( + ['text/plain']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/commits/{sha}.{diffType}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 repo_download_pull_diff_or_patch(self, owner, repo, index, diff_type, **kwargs): # noqa: E501 + """Get a pull request diff or patch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_download_pull_diff_or_patch(owner, repo, index, diff_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :param str diff_type: whether the output is diff or patch (required) + :param bool binary: whether to include binary file changes. if true, the diff is applicable with `git apply` + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_download_pull_diff_or_patch_with_http_info(owner, repo, index, diff_type, **kwargs) # noqa: E501 + else: + (data) = self.repo_download_pull_diff_or_patch_with_http_info(owner, repo, index, diff_type, **kwargs) # noqa: E501 + return data + + def repo_download_pull_diff_or_patch_with_http_info(self, owner, repo, index, diff_type, **kwargs): # noqa: E501 + """Get a pull request diff or patch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_download_pull_diff_or_patch_with_http_info(owner, repo, index, diff_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :param str diff_type: whether the output is diff or patch (required) + :param bool binary: whether to include binary file changes. if true, the diff is applicable with `git apply` + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'diff_type', 'binary'] # 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 repo_download_pull_diff_or_patch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 + # verify the required parameter 'diff_type' is set + if self.api_client.client_side_validation and ('diff_type' not in params or + params['diff_type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `diff_type` when calling `repo_download_pull_diff_or_patch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'diff_type' in params: + path_params['diffType'] = params['diff_type'] # noqa: E501 + + query_params = [] + if 'binary' in params: + query_params.append(('binary', params['binary'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}.{diffType}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 repo_edit(self, owner, repo, **kwargs): # noqa: E501 + """Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to edit (required) + :param str repo: name of the repo to edit (required) + :param EditRepoOption body: Properties of a repo that you can edit + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to edit (required) + :param str repo: name of the repo to edit (required) + :param EditRepoOption body: Properties of a repo that you can edit + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_edit" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 repo_edit_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 + """Edit a branch protections for a repository. Only fields that are set will be changed # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_branch_protection(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: name of protected branch (required) + :param EditBranchProtectionOption body: + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_edit_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Edit a branch protections for a repository. Only fields that are set will be changed # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_branch_protection_with_http_info(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: name of protected branch (required) + :param EditBranchProtectionOption body: + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'name', '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 repo_edit_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_branch_protection`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_edit_branch_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BranchProtection', # 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 repo_edit_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a Git hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_git_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: id of the hook to get (required) + :param EditGitHookOption body: + :return: GitHook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a Git hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_git_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: id of the hook to get (required) + :param EditGitHookOption body: + :return: GitHook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', '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 repo_edit_git_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_git_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_git_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_edit_git_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/git/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitHook', # 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 repo_edit_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: index of the hook (required) + :param EditHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a hook in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: index of the hook (required) + :param EditHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', '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 repo_edit_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_edit_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 repo_edit_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_pull_request(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to edit (required) + :param EditPullRequestOption body: + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_pull_request_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to edit (required) + :param EditPullRequestOption body: + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 repo_edit_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_edit_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullRequest', # 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 repo_edit_release(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_release(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to edit (required) + :param EditReleaseOption body: + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_release_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to edit (required) + :param EditReleaseOption body: + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', '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 repo_edit_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_edit_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Release', # 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 repo_edit_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_release_attachment(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment_id', '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 repo_edit_release_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `repo_edit_release_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # 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 repo_edit_tag_protection(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a tag protections for a repository. Only fields that are set will be changed # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_tag_protection(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of protected tag (required) + :param EditTagProtectionOption body: + :return: TagProtection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_edit_tag_protection_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a tag protections for a repository. Only fields that are set will be changed # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_tag_protection_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of protected tag (required) + :param EditTagProtectionOption body: + :return: TagProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', '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 repo_edit_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_tag_protection`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_edit_tag_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TagProtection', # 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 repo_edit_wiki_page(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Edit a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_wiki_page(owner, repo, page_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str page_name: name of the page (required) + :param CreateWikiPageOptions body: + :return: WikiPage + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_edit_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + else: + (data) = self.repo_edit_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + return data + + def repo_edit_wiki_page_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Edit a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_edit_wiki_page_with_http_info(owner, repo, page_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str page_name: name of the page (required) + :param CreateWikiPageOptions body: + :return: WikiPage + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page_name', '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 repo_edit_wiki_page" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_wiki_page`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_wiki_page`") # noqa: E501 + # verify the required parameter 'page_name' is set + if self.api_client.client_side_validation and ('page_name' not in params or + params['page_name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `page_name` when calling `repo_edit_wiki_page`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'page_name' in params: + path_params['pageName'] = params['page_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', 'text/html']) # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/page/{pageName}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WikiPage', # 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 repo_get(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 repo_get_all_commits(self, owner, repo, **kwargs): # noqa: E501 + """Get a list of all commits from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_all_commits(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: SHA or branch to start listing commits from (usually 'master') + :param str path: filepath of a file/dir + :param datetime since: Only commits after this date will be returned (ISO 8601 format) + :param datetime until: Only commits before this date will be returned (ISO 8601 format) + :param bool stat: include diff stats for every commit (disable for speedup, default 'true') + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :param int page: page number of results to return (1-based) + :param int limit: page size of results (ignored if used with 'path') + :param str _not: commits that match the given specifier will not be listed. + :return: list[Commit] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_all_commits_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get a list of all commits from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_all_commits_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: SHA or branch to start listing commits from (usually 'master') + :param str path: filepath of a file/dir + :param datetime since: Only commits after this date will be returned (ISO 8601 format) + :param datetime until: Only commits before this date will be returned (ISO 8601 format) + :param bool stat: include diff stats for every commit (disable for speedup, default 'true') + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :param int page: page number of results to return (1-based) + :param int limit: page size of results (ignored if used with 'path') + :param str _not: commits that match the given specifier will not be listed. + :return: list[Commit] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'path', 'since', 'until', 'stat', 'verification', 'files', 'page', 'limit', '_not'] # 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 repo_get_all_commits" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_all_commits`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_all_commits`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'sha' in params: + query_params.append(('sha', params['sha'])) # noqa: E501 + if 'path' in params: + query_params.append(('path', params['path'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'until' in params: + query_params.append(('until', params['until'])) # noqa: E501 + if 'stat' in params: + query_params.append(('stat', params['stat'])) # noqa: E501 + if 'verification' in params: + query_params.append(('verification', params['verification'])) # noqa: E501 + if 'files' in params: + query_params.append(('files', params['files'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if '_not' in params: + query_params.append(('not', params['_not'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/commits', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Commit]', # 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 repo_get_archive(self, owner, repo, archive, **kwargs): # noqa: E501 + """Get an archive of a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_archive(owner, repo, archive, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str archive: the git reference for download with attached archive format (e.g. master.zip) (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 + return data + + def repo_get_archive_with_http_info(self, owner, repo, archive, **kwargs): # noqa: E501 + """Get an archive of a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_archive_with_http_info(owner, repo, archive, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str archive: the git reference for download with attached archive format (e.g. master.zip) (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'archive'] # 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 repo_get_archive" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_archive`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_archive`") # noqa: E501 + # verify the required parameter 'archive' is set + if self.api_client.client_side_validation and ('archive' not in params or + params['archive'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `archive` when calling `repo_get_archive`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'archive' in params: + path_params['archive'] = params['archive'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/archive/{archive}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_get_assignees(self, owner, repo, **kwargs): # noqa: E501 + """Return all users that have write access and can be assigned to issues # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_assignees(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_assignees_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_assignees_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_assignees_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Return all users that have write access and can be assigned to issues # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_assignees_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_get_assignees" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_assignees`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_assignees`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/assignees', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 repo_get_branch(self, owner, repo, branch, **kwargs): # noqa: E501 + """Retrieve a specific branch from a repository, including its effective branch protection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_branch(owner, repo, branch, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str branch: branch to get (required) + :return: Branch + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + return data + + def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 + """Retrieve a specific branch from a repository, including its effective branch protection # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_branch_with_http_info(owner, repo, branch, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str branch: branch to get (required) + :return: Branch + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'branch'] # 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 repo_get_branch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch`") # noqa: E501 + # verify the required parameter 'branch' is set + if self.api_client.client_side_validation and ('branch' not in params or + params['branch'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `branch` when calling `repo_get_branch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'branch' in params: + path_params['branch'] = params['branch'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches/{branch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Branch', # 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 repo_get_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 + """Get a specific branch protection for the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_branch_protection(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: name of protected branch (required) + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_get_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Get a specific branch protection for the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_branch_protection_with_http_info(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: name of protected branch (required) + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_get_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch_protection`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_get_branch_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BranchProtection', # 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 repo_get_by_id(self, id, **kwargs): # noqa: E501 + """Get a repository 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.repo_get_by_id(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the repo to get (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 + return data + + def repo_get_by_id_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a repository 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.repo_get_by_id_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the repo to get (required) + :return: Repository + 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 repo_get_by_id" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_by_id`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repositories/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 repo_get_combined_status_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_combined_status_by_ref(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: name of branch/tag/commit (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: CombinedStatus + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + return data + + def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: name of branch/tag/commit (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: CombinedStatus + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref', 'page', 'limit'] # 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 repo_get_combined_status_by_ref" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + # verify the required parameter 'ref' is set + if self.api_client.client_side_validation and ('ref' not in params or + params['ref'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `ref` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'ref' in params: + path_params['ref'] = params['ref'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/commits/{ref}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CombinedStatus', # 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 repo_get_commit_pull_request(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get the merged pull request of the commit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_commit_pull_request(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: SHA of the commit to get (required) + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_commit_pull_request_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_commit_pull_request_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_get_commit_pull_request_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get the merged pull request of the commit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_commit_pull_request_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: SHA of the commit to get (required) + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha'] # 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 repo_get_commit_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_commit_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_commit_pull_request`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_get_commit_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/commits/{sha}/pull', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullRequest', # 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 repo_get_contents(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir. # noqa: E501 + + This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the dir, file, symlink or submodule in the repo (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: ContentsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_contents_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir. # noqa: E501 + + This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents_with_http_info(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the dir, file, symlink or submodule in the repo (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: ContentsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', 'ref'] # 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 repo_get_contents" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_contents`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents/{filepath}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContentsResponse', # 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 repo_get_contents_ext(self, owner, repo, filepath, **kwargs): # noqa: E501 + """The extended \"contents\" API, to get file metadata and/or content, or list a directory. # noqa: E501 + + It guarantees that only one of the response fields is set if the request succeeds. Users can pass \"includes=file_content\" or \"includes=lfs_metadata\" to retrieve more fields. \"includes=file_content\" only works for single file, if you need to retrieve file contents in batch, use \"file-contents\" API after listing the directory. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents_ext(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the dir, file, symlink or submodule in the repo. Swagger requires path parameter to be \"required\", you can leave it empty or pass a single dot (\".\") to get the root directory. (required) + :param str ref: the name of the commit/branch/tag, default to the repository’s default branch. + :param str includes: By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, \"lfs_metadata\" will try to retrieve LFS metadata, \"commit_metadata\" will try to retrieve commit metadata, and \"commit_message\" will try to retrieve commit message. + :return: ContentsExtResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_contents_ext_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_contents_ext_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_contents_ext_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """The extended \"contents\" API, to get file metadata and/or content, or list a directory. # noqa: E501 + + It guarantees that only one of the response fields is set if the request succeeds. Users can pass \"includes=file_content\" or \"includes=lfs_metadata\" to retrieve more fields. \"includes=file_content\" only works for single file, if you need to retrieve file contents in batch, use \"file-contents\" API after listing the directory. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents_ext_with_http_info(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the dir, file, symlink or submodule in the repo. Swagger requires path parameter to be \"required\", you can leave it empty or pass a single dot (\".\") to get the root directory. (required) + :param str ref: the name of the commit/branch/tag, default to the repository’s default branch. + :param str includes: By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, \"lfs_metadata\" will try to retrieve LFS metadata, \"commit_metadata\" will try to retrieve commit metadata, and \"commit_message\" will try to retrieve commit message. + :return: ContentsExtResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', 'ref', 'includes'] # 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 repo_get_contents_ext" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents_ext`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents_ext`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_contents_ext`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # noqa: E501 + if 'includes' in params: + query_params.append(('includes', params['includes'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents-ext/{filepath}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContentsExtResponse', # 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 repo_get_contents_list(self, owner, repo, **kwargs): # noqa: E501 + """Gets the metadata of all the entries of the root dir. # noqa: E501 + + This API follows GitHub's design, and it is not easy to use. Recommend users to use our \"contents-ext\" API instead. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: list[ContentsResponse] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_contents_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Gets the metadata of all the entries of the root dir. # noqa: E501 + + This API follows GitHub's design, and it is not easy to use. Recommend users to use our \"contents-ext\" API instead. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: list[ContentsResponse] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref'] # 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 repo_get_contents_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ContentsResponse]', # 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 repo_get_editor_config(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get the EditorConfig definitions of a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_editor_config(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: filepath of file to get (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get the EditorConfig definitions of a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_editor_config_with_http_info(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: filepath of file to get (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', 'ref'] # 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 repo_get_editor_config" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_editor_config`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_editor_config`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_editor_config`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/editorconfig/{filepath}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_get_file_contents(self, owner, repo, body, **kwargs): # noqa: E501 + """Get the metadata and contents of requested files # noqa: E501 + + See the POST method. This GET method supports using JSON encoded request body in query parameter. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_file_contents(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str body: The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]} (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: list[ContentsResponse] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_file_contents_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_file_contents_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + return data + + def repo_get_file_contents_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 + """Get the metadata and contents of requested files # noqa: E501 + + See the POST method. This GET method supports using JSON encoded request body in query parameter. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_file_contents_with_http_info(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str body: The JSON encoded body (see the POST request): {\"files\": [\"filename1\", \"filename2\"]} (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: list[ContentsResponse] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'body', 'ref'] # 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 repo_get_file_contents" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_file_contents`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_file_contents`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_get_file_contents`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # noqa: E501 + if 'body' in params: + query_params.append(('body', params['body'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/file-contents', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ContentsResponse]', # 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 repo_get_file_contents_post(self, owner, repo, body, **kwargs): # noqa: E501 + """Get the metadata and contents of requested files # noqa: E501 + + Uses automatic pagination based on default page size and max response size and returns the maximum allowed number of files. Files which could not be retrieved are null. Files which are too large are being returned with `encoding == null`, `content == null` and `size > 0`, they can be requested separately by using the `download_url`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_file_contents_post(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param GetFilesOptions body: (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: list[ContentsResponse] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_file_contents_post_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_file_contents_post_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + return data + + def repo_get_file_contents_post_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 + """Get the metadata and contents of requested files # noqa: E501 + + Uses automatic pagination based on default page size and max response size and returns the maximum allowed number of files. Files which could not be retrieved are null. Files which are too large are being returned with `encoding == null`, `content == null` and `size > 0`, they can be requested separately by using the `download_url`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_file_contents_post_with_http_info(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param GetFilesOptions body: (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch. + :return: list[ContentsResponse] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'body', 'ref'] # 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 repo_get_file_contents_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_file_contents_post`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_file_contents_post`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_get_file_contents_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # noqa: E501 + + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/file-contents', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ContentsResponse]', # 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 repo_get_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a Git hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_git_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: id of the hook to get (required) + :return: GitHook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a Git hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_git_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: id of the hook to get (required) + :return: GitHook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_get_git_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_git_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_git_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_git_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/git/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitHook', # 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 repo_get_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to get (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to get (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_get_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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 repo_get_issue_config(self, owner, repo, **kwargs): # noqa: E501 + """Returns the issue config for a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_issue_config(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: IssueConfig + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_issue_config_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Returns the issue config for a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_issue_config_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: IssueConfig + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_get_issue_config" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_issue_config`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_issue_config`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issue_config', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IssueConfig', # 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 repo_get_issue_templates(self, owner, repo, **kwargs): # noqa: E501 + """Get available issue templates for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_issue_templates(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[IssueTemplate] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_issue_templates_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_issue_templates_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_issue_templates_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get available issue templates for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_issue_templates_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[IssueTemplate] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_get_issue_templates" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_issue_templates`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_issue_templates`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issue_templates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[IssueTemplate]', # 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 repo_get_key(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a repository's key 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.repo_get_key(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to get (required) + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a repository's key 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.repo_get_key_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to get (required) + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_get_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_key`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeployKey', # 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 repo_get_languages(self, owner, repo, **kwargs): # noqa: E501 + """Get languages and number of bytes of code written # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_languages(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: dict(str, int) + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_languages_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_languages_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_languages_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get languages and number of bytes of code written # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_languages_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: dict(str, int) + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_get_languages" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_languages`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_languages`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/languages', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='dict(str, int)', # 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 repo_get_latest_release(self, owner, repo, **kwargs): # noqa: E501 + """Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_latest_release(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_latest_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_latest_release_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_latest_release_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_latest_release_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_get_latest_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_latest_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_latest_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/latest', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Release', # 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 repo_get_licenses(self, owner, repo, **kwargs): # noqa: E501 + """Get repo licenses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_licenses(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_licenses_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_licenses_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_licenses_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get repo licenses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_licenses_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_get_licenses" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_licenses`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_licenses`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/licenses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # 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 repo_get_note(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a note corresponding to a single commit from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_note(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: a git ref or commit sha (required) + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: Note + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_note_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_note_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_get_note_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a note corresponding to a single commit from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_note_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: a git ref or commit sha (required) + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: Note + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'verification', 'files'] # 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 repo_get_note" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_note`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_note`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_get_note`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + + query_params = [] + if 'verification' in params: + query_params.append(('verification', params['verification'])) # noqa: E501 + if 'files' in params: + query_params.append(('files', params['files'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/notes/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Note', # 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 repo_get_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_request(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_request_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 repo_get_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullRequest', # 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 repo_get_pull_request_by_base_head(self, owner, repo, base, head, **kwargs): # noqa: E501 + """Get a pull request by base and head # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_request_by_base_head(owner, repo, base, head, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str base: base of the pull request to get (required) + :param str head: head of the pull request to get (required) + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_pull_request_by_base_head_with_http_info(owner, repo, base, head, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_request_by_base_head_with_http_info(owner, repo, base, head, **kwargs) # noqa: E501 + return data + + def repo_get_pull_request_by_base_head_with_http_info(self, owner, repo, base, head, **kwargs): # noqa: E501 + """Get a pull request by base and head # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_request_by_base_head_with_http_info(owner, repo, base, head, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str base: base of the pull request to get (required) + :param str head: head of the pull request to get (required) + :return: PullRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'base', 'head'] # 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 repo_get_pull_request_by_base_head" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 + # verify the required parameter 'base' is set + if self.api_client.client_side_validation and ('base' not in params or + params['base'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `base` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 + # verify the required parameter 'head' is set + if self.api_client.client_side_validation and ('head' not in params or + params['head'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `head` when calling `repo_get_pull_request_by_base_head`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'base' in params: + path_params['base'] = params['base'] # noqa: E501 + if 'head' in params: + path_params['head'] = params['head'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{base}/{head}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullRequest', # 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 repo_get_pull_request_commits(self, owner, repo, index, **kwargs): # noqa: E501 + """Get commits for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_request_commits(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: list[Commit] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_pull_request_commits_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_request_commits_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_get_pull_request_commits_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get commits for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_request_commits_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: list[Commit] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', 'limit', 'verification', 'files'] # 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 repo_get_pull_request_commits" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request_commits`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request_commits`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request_commits`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'verification' in params: + query_params.append(('verification', params['verification'])) # noqa: E501 + if 'files' in params: + query_params.append(('files', params['files'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/commits', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Commit]', # 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 repo_get_pull_request_files(self, owner, repo, index, **kwargs): # noqa: E501 + """Get changed files for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_request_files(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :param str skip_to: skip to given file + :param str whitespace: whitespace behavior + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ChangedFile] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_pull_request_files_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_request_files_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_get_pull_request_files_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get changed files for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_request_files_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :param str skip_to: skip to given file + :param str whitespace: whitespace behavior + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ChangedFile] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'skip_to', 'whitespace', 'page', 'limit'] # 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 repo_get_pull_request_files" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request_files`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request_files`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request_files`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'skip_to' in params: + query_params.append(('skip-to', params['skip_to'])) # noqa: E501 + if 'whitespace' in params: + query_params.append(('whitespace', params['whitespace'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/files', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ChangedFile]', # 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 repo_get_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_review(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def repo_get_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_review_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 repo_get_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_pull_review`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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 repo_get_pull_review_comments(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_review_comments(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: list[PullReviewComment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def repo_get_pull_review_comments_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: list[PullReviewComment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 repo_get_pull_review_comments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_review_comments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_review_comments`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_review_comments`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_pull_review_comments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PullReviewComment]', # 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 repo_get_push_mirror_by_remote_name(self, owner, repo, name, **kwargs): # noqa: E501 + """Get push mirror of the repository by remoteName # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_push_mirror_by_remote_name(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: remote name of push mirror (required) + :return: PushMirror + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_push_mirror_by_remote_name_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_push_mirror_by_remote_name_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_get_push_mirror_by_remote_name_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Get push mirror of the repository by remoteName # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_push_mirror_by_remote_name_with_http_info(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: remote name of push mirror (required) + :return: PushMirror + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_get_push_mirror_by_remote_name" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_push_mirror_by_remote_name`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_push_mirror_by_remote_name`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `repo_get_push_mirror_by_remote_name`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PushMirror', # 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 repo_get_raw_file(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_raw_file(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch + :return: file + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_raw_file_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_raw_file_with_http_info(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch + :return: file + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', 'ref'] # 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 repo_get_raw_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_raw_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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/octet-stream']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/raw/{filepath}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='file', # 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 repo_get_raw_file_or_lfs(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file or it's LFS object from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_raw_file_or_lfs(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch + :return: file + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_raw_file_or_lfs_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_raw_file_or_lfs_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_raw_file_or_lfs_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file or it's LFS object from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_raw_file_or_lfs_with_http_info(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch (required) + :param str ref: The name of the commit/branch/tag. Default to the repository’s default branch + :return: file + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', 'ref'] # 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 repo_get_raw_file_or_lfs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file_or_lfs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file_or_lfs`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_raw_file_or_lfs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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/octet-stream']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/media/{filepath}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='file', # 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 repo_get_release(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to get (required) + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a release # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to get (required) + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_get_release" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_release`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Release', # 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 repo_get_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release_attachment(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return data + + def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a release attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'attachment_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 repo_get_release_attachment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in params or + params['attachment_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `attachment_id` when calling `repo_get_release_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Attachment', # 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 repo_get_release_by_tag(self, owner, repo, tag, **kwargs): # noqa: E501 + """Get a release by tag 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.repo_get_release_by_tag(owner, repo, tag, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str tag: tag name of the release to get (required) + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_release_by_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + return data + + def repo_get_release_by_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 + """Get a release by tag 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.repo_get_release_by_tag_with_http_info(owner, repo, tag, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str tag: tag name of the release to get (required) + :return: Release + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'tag'] # 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 repo_get_release_by_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_by_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_by_tag`") # noqa: E501 + # verify the required parameter 'tag' is set + if self.api_client.client_side_validation and ('tag' not in params or + params['tag'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `tag` when calling `repo_get_release_by_tag`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'tag' in params: + path_params['tag'] = params['tag'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/tags/{tag}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Release', # 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 repo_get_repo_permissions(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Get repository permissions 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.repo_get_repo_permissions(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator whose permissions are to be obtained (required) + :return: RepoCollaboratorPermission + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_repo_permissions_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_repo_permissions_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return data + + def repo_get_repo_permissions_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Get repository permissions 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.repo_get_repo_permissions_with_http_info(owner, repo, collaborator, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str collaborator: username of the collaborator whose permissions are to be obtained (required) + :return: RepoCollaboratorPermission + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'collaborator'] # 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 repo_get_repo_permissions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_repo_permissions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_repo_permissions`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if self.api_client.client_side_validation and ('collaborator' not in params or + params['collaborator'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `collaborator` when calling `repo_get_repo_permissions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators/{collaborator}/permission', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RepoCollaboratorPermission', # 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 repo_get_reviewers(self, owner, repo, **kwargs): # noqa: E501 + """Return all users that can be requested to review in this repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_reviewers(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_reviewers_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_reviewers_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_reviewers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Return all users that can be requested to review in this repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_reviewers_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_get_reviewers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_reviewers`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_reviewers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/reviewers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 repo_get_runner_registration_token(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository's actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_runner_registration_token(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_runner_registration_token_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_runner_registration_token_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository's actions runner registration token # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_runner_registration_token_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_get_runner_registration_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_runner_registration_token`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_runner_registration_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/runners/registration-token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_get_single_commit(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a single commit from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_single_commit(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: a git ref or commit sha (required) + :param bool stat: include diff stats for every commit (disable for speedup, default 'true') + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: Commit + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_get_single_commit_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a single commit from a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_single_commit_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: a git ref or commit sha (required) + :param bool stat: include diff stats for every commit (disable for speedup, default 'true') + :param bool verification: include verification for every commit (disable for speedup, default 'true') + :param bool files: include a list of affected files for every commit (disable for speedup, default 'true') + :return: Commit + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'stat', 'verification', 'files'] # 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 repo_get_single_commit" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_single_commit`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_single_commit`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_get_single_commit`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + + query_params = [] + if 'stat' in params: + query_params.append(('stat', params['stat'])) # noqa: E501 + if 'verification' in params: + query_params.append(('verification', params['verification'])) # noqa: E501 + if 'files' in params: + query_params.append(('files', params['files'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/commits/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Commit', # 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 repo_get_tag(self, owner, repo, tag, **kwargs): # noqa: E501 + """Get the tag of a repository by tag 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.repo_get_tag(owner, repo, tag, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str tag: name of tag (required) + :return: Tag + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_tag_with_http_info(owner, repo, tag, **kwargs) # noqa: E501 + return data + + def repo_get_tag_with_http_info(self, owner, repo, tag, **kwargs): # noqa: E501 + """Get the tag of a repository by tag 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.repo_get_tag_with_http_info(owner, repo, tag, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str tag: name of tag (required) + :return: Tag + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'tag'] # 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 repo_get_tag" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_tag`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_tag`") # noqa: E501 + # verify the required parameter 'tag' is set + if self.api_client.client_side_validation and ('tag' not in params or + params['tag'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `tag` when calling `repo_get_tag`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'tag' in params: + path_params['tag'] = params['tag'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tags/{tag}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Tag', # 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 repo_get_tag_protection(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a specific tag protection for the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_tag_protection(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the tag protect to get (required) + :return: TagProtection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_tag_protection_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_tag_protection_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a specific tag protection for the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_tag_protection_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the tag protect to get (required) + :return: TagProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_get_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_tag_protection`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_tag_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TagProtection', # 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 repo_get_wiki_page(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Get a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_wiki_page(owner, repo, page_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str page_name: name of the page (required) + :return: WikiPage + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_wiki_page_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + return data + + def repo_get_wiki_page_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Get a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_wiki_page_with_http_info(owner, repo, page_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str page_name: name of the page (required) + :return: WikiPage + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page_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 repo_get_wiki_page" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_wiki_page`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_wiki_page`") # noqa: E501 + # verify the required parameter 'page_name' is set + if self.api_client.client_side_validation and ('page_name' not in params or + params['page_name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `page_name` when calling `repo_get_wiki_page`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'page_name' in params: + path_params['pageName'] = params['page_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/page/{pageName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WikiPage', # 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 repo_get_wiki_page_revisions(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Get revisions of a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_wiki_page_revisions(owner, repo, page_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str page_name: name of the page (required) + :param int page: page number of results to return (1-based) + :return: WikiCommitList + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_wiki_page_revisions_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_wiki_page_revisions_with_http_info(owner, repo, page_name, **kwargs) # noqa: E501 + return data + + def repo_get_wiki_page_revisions_with_http_info(self, owner, repo, page_name, **kwargs): # noqa: E501 + """Get revisions of a wiki page # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_wiki_page_revisions_with_http_info(owner, repo, page_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str page_name: name of the page (required) + :param int page: page number of results to return (1-based) + :return: WikiCommitList + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page_name', 'page'] # 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 repo_get_wiki_page_revisions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_wiki_page_revisions`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_wiki_page_revisions`") # noqa: E501 + # verify the required parameter 'page_name' is set + if self.api_client.client_side_validation and ('page_name' not in params or + params['page_name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `page_name` when calling `repo_get_wiki_page_revisions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'page_name' in params: + path_params['pageName'] = params['page_name'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/revisions/{pageName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WikiCommitList', # 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 repo_get_wiki_pages(self, owner, repo, **kwargs): # noqa: E501 + """Get all wiki pages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_wiki_pages(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[WikiPageMetaData] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_wiki_pages_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_wiki_pages_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_wiki_pages_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all wiki pages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_wiki_pages_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[WikiPageMetaData] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_get_wiki_pages" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_wiki_pages`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_wiki_pages`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/wiki/pages', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[WikiPageMetaData]', # 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 repo_list_actions_secrets(self, owner, repo, **kwargs): # noqa: E501 + """List an repo's actions secrets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_actions_secrets(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Secret] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_actions_secrets_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_actions_secrets_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_actions_secrets_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List an repo's actions secrets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_actions_secrets_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Secret] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_list_actions_secrets" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_actions_secrets`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_actions_secrets`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/secrets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Secret]', # 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 repo_list_activity_feeds(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's activity feeds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_activity_feeds(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_activity_feeds_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_activity_feeds_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_activity_feeds_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's activity feeds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_activity_feeds_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '_date', 'page', 'limit'] # 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 repo_list_activity_feeds" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_activity_feeds`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_activity_feeds`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if '_date' in params: + query_params.append(('date', params['_date'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/activities/feeds', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Activity]', # 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 repo_list_all_git_refs(self, owner, repo, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_all_git_refs(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Reference] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_all_git_refs_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_all_git_refs_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Reference] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_list_all_git_refs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_all_git_refs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_all_git_refs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/refs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reference]', # 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 repo_list_branch_protection(self, owner, repo, **kwargs): # noqa: E501 + """List branch protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_branch_protection(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[BranchProtection] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_branch_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List branch protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_branch_protection_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[BranchProtection] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_list_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_branch_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BranchProtection]', # 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 repo_list_branches(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's branches # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_branches(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_branches_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_branches_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's branches # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_branches_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Branch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_list_branches" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_branches`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_branches`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Branch]', # 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 repo_list_collaborators(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's collaborators # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_collaborators(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_collaborators_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_collaborators_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's collaborators # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_collaborators_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_list_collaborators" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_collaborators`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_collaborators`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/collaborators', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 repo_list_git_hooks(self, owner, repo, **kwargs): # noqa: E501 + """List the Git hooks in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_git_hooks(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[GitHook] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_git_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_git_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_git_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List the Git hooks in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_git_hooks_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[GitHook] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_list_git_hooks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_git_hooks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_git_hooks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/git', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[GitHook]', # 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 repo_list_git_refs(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_git_refs(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: part or full name of the ref (required) + :return: list[Reference] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_git_refs_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + return data + + def repo_list_git_refs_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_git_refs_with_http_info(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: part or full name of the ref (required) + :return: list[Reference] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref'] # 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 repo_list_git_refs" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_git_refs`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_git_refs`") # noqa: E501 + # verify the required parameter 'ref' is set + if self.api_client.client_side_validation and ('ref' not in params or + params['ref'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `ref` when calling `repo_list_git_refs`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'ref' in params: + path_params['ref'] = params['ref'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/git/refs/{ref}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reference]', # 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 repo_list_hooks(self, owner, repo, **kwargs): # noqa: E501 + """List the hooks in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_hooks(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_hooks_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List the hooks in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_hooks_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_hooks`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_hooks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Hook]', # 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 repo_list_keys(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's keys # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_keys(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int key_id: the key_id to search for + :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[DeployKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's keys # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_keys_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int key_id: the key_id to search for + :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[DeployKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'key_id', 'fingerprint', 'page', 'limit'] # 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 repo_list_keys" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_keys`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'key_id' in params: + query_params.append(('key_id', params['key_id'])) # noqa: E501 + if 'fingerprint' in params: + query_params.append(('fingerprint', params['fingerprint'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DeployKey]', # 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 repo_list_pinned_issues(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pinned issues # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pinned_issues(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_pinned_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pinned_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_pinned_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pinned issues # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pinned_issues_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Issue] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_list_pinned_issues" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pinned_issues`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pinned_issues`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/pinned', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Issue]', # 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 repo_list_pinned_pull_requests(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pinned pull requests # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pinned_pull_requests(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[PullRequest] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_pinned_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pinned_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_pinned_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pinned pull requests # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pinned_pull_requests_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[PullRequest] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_list_pinned_pull_requests" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pinned_pull_requests`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pinned_pull_requests`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/pinned', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PullRequest]', # 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 repo_list_pull_requests(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pull requests # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pull_requests(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: Name of the repo (required) + :param str base_branch: Filter by target base branch of the pull request + :param str state: State of pull request + :param str sort: Type of sort + :param int milestone: ID of the milestone + :param list[int] labels: Label IDs + :param str poster: Filter by pull request author + :param int page: Page number of results to return (1-based) + :param int limit: Page size of results + :return: list[PullRequest] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pull requests # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pull_requests_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: Name of the repo (required) + :param str base_branch: Filter by target base branch of the pull request + :param str state: State of pull request + :param str sort: Type of sort + :param int milestone: ID of the milestone + :param list[int] labels: Label IDs + :param str poster: Filter by pull request author + :param int page: Page number of results to return (1-based) + :param int limit: Page size of results + :return: list[PullRequest] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'base_branch', 'state', 'sort', 'milestone', 'labels', 'poster', 'page', 'limit'] # 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 repo_list_pull_requests" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_requests`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_requests`") # noqa: E501 + + if self.api_client.client_side_validation and ('page' in params and params['page'] < 1): # noqa: E501 + raise ValueError("Invalid value for parameter `page` when calling `repo_list_pull_requests`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0): # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `repo_list_pull_requests`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'base_branch' in params: + query_params.append(('base_branch', params['base_branch'])) # noqa: E501 + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'sort' in params: + query_params.append(('sort', params['sort'])) # noqa: E501 + if 'milestone' in params: + query_params.append(('milestone', params['milestone'])) # noqa: E501 + if 'labels' in params: + query_params.append(('labels', params['labels'])) # noqa: E501 + collection_formats['labels'] = 'multi' # noqa: E501 + if 'poster' in params: + query_params.append(('poster', params['poster'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PullRequest]', # 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 repo_list_pull_reviews(self, owner, repo, index, **kwargs): # noqa: E501 + """List all reviews for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pull_reviews(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PullReview] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_pull_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pull_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_list_pull_reviews_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List all reviews for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pull_reviews_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PullReview] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', 'limit'] # 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 repo_list_pull_reviews" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_reviews`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_reviews`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_list_pull_reviews`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PullReview]', # 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 repo_list_push_mirrors(self, owner, repo, **kwargs): # noqa: E501 + """Get all push mirrors of the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_push_mirrors(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PushMirror] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_push_mirrors_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_push_mirrors_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_push_mirrors_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all push mirrors of the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_push_mirrors_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PushMirror] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_list_push_mirrors" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_push_mirrors`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_push_mirrors`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PushMirror]', # 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 repo_list_release_attachments(self, owner, repo, id, **kwargs): # noqa: E501 + """List release's attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_release_attachments(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :return: list[Attachment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_release_attachments_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_list_release_attachments_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """List release's attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_release_attachments_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release (required) + :return: list[Attachment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_list_release_attachments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_release_attachments`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_release_attachments`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_list_release_attachments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases/{id}/assets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Attachment]', # 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 repo_list_releases(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's releases # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_releases(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param bool draft: filter (exclude / include) drafts, if you dont have repo write access none will show + :param bool pre_release: filter (exclude / include) pre-releases + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Release] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_releases_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_releases_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's releases # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_releases_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param bool draft: filter (exclude / include) drafts, if you dont have repo write access none will show + :param bool pre_release: filter (exclude / include) pre-releases + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Release] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'draft', 'pre_release', 'page', 'limit'] # 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 repo_list_releases" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_releases`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_releases`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'draft' in params: + query_params.append(('draft', params['draft'])) # noqa: E501 + if 'pre_release' in params: + query_params.append(('pre-release', params['pre_release'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/releases', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Release]', # 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 repo_list_stargazers(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's stargazers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_stargazers(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_stargazers_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_stargazers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's stargazers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_stargazers_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_list_stargazers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_stargazers`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_stargazers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/stargazers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 repo_list_statuses(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a commit's statuses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_statuses(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :param str sort: type of sort + :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[CommitStatus] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_statuses_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return data + + def repo_list_statuses_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a commit's statuses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_statuses_with_http_info(owner, repo, sha, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str sha: sha of the commit (required) + :param str sort: type of sort + :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[CommitStatus] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'sha', 'sort', 'state', 'page', 'limit'] # 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 repo_list_statuses" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_statuses`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_statuses`") # noqa: E501 + # verify the required parameter 'sha' is set + if self.api_client.client_side_validation and ('sha' not in params or + params['sha'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `sha` when calling `repo_list_statuses`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 + + query_params = [] + if 'sort' in params: + query_params.append(('sort', params['sort'])) # noqa: E501 + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/statuses/{sha}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CommitStatus]', # 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 repo_list_statuses_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's statuses, by branch/tag/commit reference # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_statuses_by_ref(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: name of branch/tag/commit (required) + :param str sort: type of sort + :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[CommitStatus] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_statuses_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_statuses_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + return data + + def repo_list_statuses_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's statuses, by branch/tag/commit reference # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_statuses_by_ref_with_http_info(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: name of branch/tag/commit (required) + :param str sort: type of sort + :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[CommitStatus] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref', 'sort', 'state', 'page', 'limit'] # 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 repo_list_statuses_by_ref" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_statuses_by_ref`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_statuses_by_ref`") # noqa: E501 + # verify the required parameter 'ref' is set + if self.api_client.client_side_validation and ('ref' not in params or + params['ref'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `ref` when calling `repo_list_statuses_by_ref`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'ref' in params: + path_params['ref'] = params['ref'] # noqa: E501 + + query_params = [] + if 'sort' in params: + query_params.append(('sort', params['sort'])) # noqa: E501 + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/commits/{ref}/statuses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[CommitStatus]', # 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 repo_list_subscribers(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's watchers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_subscribers(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_subscribers_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_subscribers_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's watchers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_subscribers_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_list_subscribers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_subscribers`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_subscribers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/subscribers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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 repo_list_tag_protection(self, owner, repo, **kwargs): # noqa: E501 + """List tag protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_tag_protection(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[TagProtection] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_tag_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_tag_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List tag protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_tag_protection_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[TagProtection] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_list_tag_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_tag_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_tag_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tag_protections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TagProtection]', # 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 repo_list_tags(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's 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.repo_list_tags(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 + :return: list[Tag] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_tags_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_tags_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_tags_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's 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.repo_list_tags_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 + :return: list[Tag] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_list_tags" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_tags`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_tags`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/tags', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Tag]', # 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 repo_list_teams(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's teams # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_teams(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_teams_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_teams_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_teams_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's teams # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_teams_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_list_teams" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_teams`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_teams`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/teams', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Team]', # 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 repo_list_topics(self, owner, repo, **kwargs): # noqa: E501 + """Get list of topics that a repository has # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_topics(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: TopicName + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get list of topics that a repository has # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_topics_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: TopicName + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'page', 'limit'] # 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 repo_list_topics" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_topics`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_topics`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/topics', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TopicName', # 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 repo_merge_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_merge_pull_request(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to merge (required) + :param MergePullRequestOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_merge_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_merge_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_merge_pull_request_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to merge (required) + :param MergePullRequestOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 repo_merge_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_merge_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_merge_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_merge_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/merge', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_merge_upstream(self, owner, repo, **kwargs): # noqa: E501 + """Merge a branch from upstream # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_merge_upstream(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param MergeUpstreamRequest body: + :return: MergeUpstreamResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_merge_upstream_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_merge_upstream_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_merge_upstream_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Merge a branch from upstream # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_merge_upstream_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param MergeUpstreamRequest body: + :return: MergeUpstreamResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_merge_upstream" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_merge_upstream`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_merge_upstream`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/merge-upstream', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MergeUpstreamResponse', # 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 repo_migrate(self, **kwargs): # noqa: E501 + """Migrate a remote git repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_migrate(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MigrateRepoOptions body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_migrate_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.repo_migrate_with_http_info(**kwargs) # noqa: E501 + return data + + def repo_migrate_with_http_info(self, **kwargs): # noqa: E501 + """Migrate a remote git repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_migrate_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param MigrateRepoOptions body: + :return: Repository + 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 repo_migrate" % key + ) + params[key] = val + del params['kwargs'] + + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/migrate', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 repo_mirror_sync(self, owner, repo, **kwargs): # noqa: E501 + """Sync a mirrored repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_mirror_sync(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to sync (required) + :param str repo: name of the repo to sync (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_mirror_sync_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Sync a mirrored repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_mirror_sync_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to sync (required) + :param str repo: name of the repo to sync (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_mirror_sync" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_mirror_sync`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_mirror_sync`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/mirror-sync', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_new_pin_allowed(self, owner, repo, **kwargs): # noqa: E501 + """Returns if new Issue Pins are allowed # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_new_pin_allowed(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: NewIssuePinsAllowed + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_new_pin_allowed_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_new_pin_allowed_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_new_pin_allowed_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Returns if new Issue Pins are allowed # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_new_pin_allowed_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: NewIssuePinsAllowed + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_new_pin_allowed" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_new_pin_allowed`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_new_pin_allowed`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/new_pin_allowed', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NewIssuePinsAllowed', # 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 repo_pull_request_is_merged(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if a pull request has been merged # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_pull_request_is_merged(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_pull_request_is_merged_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_pull_request_is_merged_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if a pull request has been merged # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_pull_request_is_merged_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # 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 repo_pull_request_is_merged" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_pull_request_is_merged`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_pull_request_is_merged`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_pull_request_is_merged`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/merge', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_push_mirror_sync(self, owner, repo, **kwargs): # noqa: E501 + """Sync all push mirrored repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_push_mirror_sync(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to sync (required) + :param str repo: name of the repo to sync (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_push_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_push_mirror_sync_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_push_mirror_sync_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Sync all push mirrored repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_push_mirror_sync_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to sync (required) + :param str repo: name of the repo to sync (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_push_mirror_sync" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_push_mirror_sync`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_push_mirror_sync`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/push_mirrors-sync', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_rename_branch(self, owner, repo, branch, **kwargs): # noqa: E501 + """Rename a branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_rename_branch(owner, repo, branch, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str branch: name of the branch (required) + :param RenameBranchRepoOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_rename_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + else: + (data) = self.repo_rename_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + return data + + def repo_rename_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 + """Rename a branch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_rename_branch_with_http_info(owner, repo, branch, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str branch: name of the branch (required) + :param RenameBranchRepoOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'branch', '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 repo_rename_branch" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_rename_branch`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_rename_branch`") # noqa: E501 + # verify the required parameter 'branch' is set + if self.api_client.client_side_validation and ('branch' not in params or + params['branch'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `branch` when calling `repo_rename_branch`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'branch' in params: + path_params['branch'] = params['branch'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branches/{branch}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_search(self, **kwargs): # noqa: E501 + """Search for repositories # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_search(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param bool topic: Limit search to repositories with keyword as topic + :param bool include_desc: include search of keyword within repository description + :param int uid: search only for repos that the user with the given id owns or contributes to + :param int priority_owner_id: repo owner to prioritize in the results + :param int team_id: search only for repos that belong to the given team id + :param int starred_by: search only for repos that the user with the given id has starred + :param bool private: include private repositories this user has access to (defaults to true) + :param bool is_private: show only pubic, private or all repositories (defaults to all) + :param bool template: include template repositories this user has access to (defaults to true) + :param bool archived: show only archived, non-archived or all repositories (defaults to all) + :param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" + :param bool exclusive: if `uid` is given, search only for repos that the user owns + :param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\" + :param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: SearchResults + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_search_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.repo_search_with_http_info(**kwargs) # noqa: E501 + return data + + def repo_search_with_http_info(self, **kwargs): # noqa: E501 + """Search for repositories # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_search_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param bool topic: Limit search to repositories with keyword as topic + :param bool include_desc: include search of keyword within repository description + :param int uid: search only for repos that the user with the given id owns or contributes to + :param int priority_owner_id: repo owner to prioritize in the results + :param int team_id: search only for repos that belong to the given team id + :param int starred_by: search only for repos that the user with the given id has starred + :param bool private: include private repositories this user has access to (defaults to true) + :param bool is_private: show only pubic, private or all repositories (defaults to all) + :param bool template: include template repositories this user has access to (defaults to true) + :param bool archived: show only archived, non-archived or all repositories (defaults to all) + :param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" + :param bool exclusive: if `uid` is given, search only for repos that the user owns + :param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", \"git_size\", \"lfs_size\", \"stars\", \"forks\" and \"id\". Default is \"alpha\" + :param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: SearchResults + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'topic', 'include_desc', 'uid', 'priority_owner_id', 'team_id', 'starred_by', 'private', 'is_private', 'template', 'archived', 'mode', 'exclusive', 'sort', 'order', 'page', 'limit'] # 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 repo_search" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'topic' in params: + query_params.append(('topic', params['topic'])) # noqa: E501 + if 'include_desc' in params: + query_params.append(('includeDesc', params['include_desc'])) # noqa: E501 + if 'uid' in params: + query_params.append(('uid', params['uid'])) # noqa: E501 + if 'priority_owner_id' in params: + query_params.append(('priority_owner_id', params['priority_owner_id'])) # noqa: E501 + if 'team_id' in params: + query_params.append(('team_id', params['team_id'])) # noqa: E501 + if 'starred_by' in params: + query_params.append(('starredBy', params['starred_by'])) # noqa: E501 + if 'private' in params: + query_params.append(('private', params['private'])) # noqa: E501 + if 'is_private' in params: + query_params.append(('is_private', params['is_private'])) # noqa: E501 + if 'template' in params: + query_params.append(('template', params['template'])) # noqa: E501 + if 'archived' in params: + query_params.append(('archived', params['archived'])) # noqa: E501 + if 'mode' in params: + query_params.append(('mode', params['mode'])) # noqa: E501 + if 'exclusive' in params: + query_params.append(('exclusive', params['exclusive'])) # noqa: E501 + if 'sort' in params: + query_params.append(('sort', params['sort'])) # noqa: E501 + if 'order' in params: + query_params.append(('order', params['order'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SearchResults', # 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 repo_signing_key(self, owner, repo, **kwargs): # noqa: E501 + """Get signing-key.gpg for given repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_signing_key(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_signing_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get signing-key.gpg for given repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_signing_key_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_signing_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_signing_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_signing_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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( + ['text/plain']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/signing-key.gpg', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 repo_signing_key_ssh(self, owner, repo, **kwargs): # noqa: E501 + """Get signing-key.pub for given repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_signing_key_ssh(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_signing_key_ssh_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_signing_key_ssh_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_signing_key_ssh_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get signing-key.pub for given repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_signing_key_ssh_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_signing_key_ssh" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_signing_key_ssh`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_signing_key_ssh`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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( + ['text/plain']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/signing-key.pub', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 repo_submit_pull_review(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Submit a pending review to an pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_submit_pull_review(owner, repo, index, id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :param SubmitPullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 + return data + + def repo_submit_pull_review_with_http_info(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Submit a pending review to an pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :param SubmitPullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'id', '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 repo_submit_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_submit_pull_review`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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 repo_test_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Test a push 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.repo_test_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to test (required) + :param str ref: The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_test_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_test_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Test a push 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.repo_test_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to test (required) + :param str ref: The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'ref'] # 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 repo_test_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_test_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_test_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_test_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/{id}/tests', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_tracked_times(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_tracked_times(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str user: optional filter by user (available for issue managers) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_tracked_times_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_tracked_times_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's tracked times # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_tracked_times_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str user: optional filter by user (available for issue managers) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'user', 'since', 'before', 'page', 'limit'] # 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 repo_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_tracked_times`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'user' in params: + query_params.append(('user', params['user'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/times', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TrackedTime]', # 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 repo_transfer(self, owner, repo, body, **kwargs): # noqa: E501 + """Transfer a repo ownership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_transfer(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :param TransferRepoOption body: Transfer Options (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_transfer_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_transfer_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + return data + + def repo_transfer_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 + """Transfer a repo ownership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_transfer_with_http_info(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :param TransferRepoOption body: Transfer Options (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_transfer" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_transfer`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_transfer`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_transfer`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/transfer', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 repo_un_dismiss_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Cancel to dismiss a review for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_un_dismiss_pull_review(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_un_dismiss_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_un_dismiss_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def repo_un_dismiss_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Cancel to dismiss a review for a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_un_dismiss_pull_review_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', '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 repo_un_dismiss_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_un_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_un_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_un_dismiss_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_un_dismiss_pull_review`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # 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 repo_update_avatar(self, owner, repo, **kwargs): # noqa: E501 + """Update avatar # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_avatar(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param UpdateRepoAvatarOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_update_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_avatar_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_update_avatar_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Update avatar # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_avatar_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param UpdateRepoAvatarOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_update_avatar" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_avatar`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_avatar`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/avatar', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_update_branch_protection_priories(self, owner, repo, **kwargs): # noqa: E501 + """Update the priorities of branch protections for a repository. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_branch_protection_priories(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param UpdateBranchProtectionPriories body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_update_branch_protection_priories_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_branch_protection_priories_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_update_branch_protection_priories_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Update the priorities of branch protections for a repository. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_branch_protection_priories_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param UpdateBranchProtectionPriories body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_update_branch_protection_priories" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_branch_protection_priories`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_branch_protection_priories`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections/priority', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_update_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Update a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_file(owner, repo, filepath, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to update (required) + :param UpdateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_update_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + return data + + def repo_update_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Update a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_file_with_http_info(owner, repo, filepath, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the file to update (required) + :param UpdateFileOptions body: (required) + :return: FileResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', '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 repo_update_file" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_file`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if self.api_client.client_side_validation and ('filepath' not in params or + params['filepath'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `filepath` when calling `repo_update_file`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `repo_update_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents/{filepath}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileResponse', # 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 repo_update_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge PR's baseBranch into headBranch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_pull_request(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :param str style: how to update pull request + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_update_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def repo_update_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Merge PR's baseBranch into headBranch # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_pull_request_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :param str style: how to update pull request + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'style'] # 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 repo_update_pull_request" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_pull_request`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in params or + params['index'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `repo_update_pull_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'style' in params: + query_params.append(('style', params['style'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/update', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_update_topics(self, owner, repo, **kwargs): # noqa: E501 + """Replace list of topics for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_topics(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param RepoTopicOptions body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_update_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_update_topics_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_update_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Replace list of topics for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_update_topics_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param RepoTopicOptions body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 repo_update_topics" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_update_topics`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_update_topics`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/topics', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 repo_validate_issue_config(self, owner, repo, **kwargs): # noqa: E501 + """Returns the validation information for a issue config # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_validate_issue_config(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: IssueConfigValidation + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_validate_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_validate_issue_config_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_validate_issue_config_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Returns the validation information for a issue config # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_validate_issue_config_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: IssueConfigValidation + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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 repo_validate_issue_config" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_validate_issue_config`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_validate_issue_config`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issue_config/validate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IssueConfigValidation', # 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 topic_search(self, q, **kwargs): # noqa: E501 + """search topics via keyword # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.topic_search(q, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keywords to search (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TopicResponse] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.topic_search_with_http_info(q, **kwargs) # noqa: E501 + else: + (data) = self.topic_search_with_http_info(q, **kwargs) # noqa: E501 + return data + + def topic_search_with_http_info(self, q, **kwargs): # noqa: E501 + """search topics via keyword # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.topic_search_with_http_info(q, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keywords to search (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[TopicResponse] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'page', 'limit'] # 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 topic_search" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'q' is set + if self.api_client.client_side_validation and ('q' not in params or + params['q'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `q` when calling `topic_search`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/topics/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TopicResponse]', # 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 update_repo_secret(self, owner, repo, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_repo_secret(owner, repo, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 + else: + (data) = self.update_repo_secret_with_http_info(owner, repo, secretname, **kwargs) # noqa: E501 + return data + + def update_repo_secret_with_http_info(self, owner, repo, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_repo_secret_with_http_info(owner, repo, secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'secretname', '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 update_repo_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `update_repo_secret`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `update_repo_secret`") # noqa: E501 + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `update_repo_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/secrets/{secretname}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 update_repo_variable(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Update a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_repo_variable(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :param UpdateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + else: + (data) = self.update_repo_variable_with_http_info(owner, repo, variablename, **kwargs) # noqa: E501 + return data + + def update_repo_variable_with_http_info(self, owner, repo, variablename, **kwargs): # noqa: E501 + """Update a repo-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_repo_variable_with_http_info(owner, repo, variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repository (required) + :param str variablename: name of the variable (required) + :param UpdateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'variablename', '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 update_repo_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `update_repo_variable`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `update_repo_variable`") # noqa: E501 + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `update_repo_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/actions/variables/{variablename}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_check_subscription(self, owner, repo, **kwargs): # noqa: E501 + """Check if the current user is watching a repo # 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_current_check_subscription(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_check_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_check_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Check if the current user is watching a repo # 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_current_check_subscription_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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_current_check_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_check_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `user_current_check_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/subscription', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WatchInfo', # 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_current_delete_subscription(self, owner, repo, **kwargs): # noqa: E501 + """Unwatch a repo # 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_current_delete_subscription(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_delete_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Unwatch a repo # 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_current_delete_subscription_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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_current_delete_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_delete_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `user_current_delete_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/subscription', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_put_subscription(self, owner, repo, **kwargs): # noqa: E501 + """Watch a repo # 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_current_put_subscription(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_put_subscription_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_put_subscription_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Watch a repo # 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_current_put_subscription_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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_current_put_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_put_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `user_current_put_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/subscription', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WatchInfo', # 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_tracked_times(self, owner, repo, user, **kwargs): # noqa: E501 + """List a user's tracked times in a repo # 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_tracked_times(owner, repo, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str user: username of the user whose tracked times are to be listed (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 + else: + (data) = self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 + return data + + def user_tracked_times_with_http_info(self, owner, repo, user, **kwargs): # noqa: E501 + """List a user's tracked times in a repo # 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_tracked_times_with_http_info(owner, repo, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str user: username of the user whose tracked times are to be listed (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', '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 user_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `user_tracked_times`") # noqa: E501 + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in params or + params['user'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user` when calling `user_tracked_times`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'user' in params: + path_params['user'] = params['user'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/times/{user}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TrackedTime]', # 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/swagger_client/api/settings_api.py b/swagger_client/api/settings_api.py new file mode 100644 index 0000000..b3e8b39 --- /dev/null +++ b/swagger_client/api/settings_api.py @@ -0,0 +1,390 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class SettingsApi(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 get_general_api_settings(self, **kwargs): # noqa: E501 + """Get instance's global settings for api # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_general_api_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralAPISettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_general_api_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_general_api_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_general_api_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get instance's global settings for api # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_general_api_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralAPISettings + 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 get_general_api_settings" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/settings/api', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GeneralAPISettings', # 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 get_general_attachment_settings(self, **kwargs): # noqa: E501 + """Get instance's global settings for Attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_general_attachment_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralAttachmentSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_general_attachment_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_general_attachment_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_general_attachment_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get instance's global settings for Attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_general_attachment_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralAttachmentSettings + 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 get_general_attachment_settings" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/settings/attachment', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GeneralAttachmentSettings', # 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 get_general_repository_settings(self, **kwargs): # noqa: E501 + """Get instance's global settings for repositories # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_general_repository_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralRepoSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_general_repository_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_general_repository_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_general_repository_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get instance's global settings for repositories # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_general_repository_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralRepoSettings + 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 get_general_repository_settings" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/settings/repository', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GeneralRepoSettings', # 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 get_general_ui_settings(self, **kwargs): # noqa: E501 + """Get instance's global settings for ui # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_general_ui_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralUISettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_general_ui_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_general_ui_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_general_ui_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get instance's global settings for ui # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_general_ui_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GeneralUISettings + 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 get_general_ui_settings" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/settings/ui', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GeneralUISettings', # 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/swagger_client/api/user_api.py b/swagger_client/api/user_api.py new file mode 100644 index 0000000..2f5a9fd --- /dev/null +++ b/swagger_client/api/user_api.py @@ -0,0 +1,7506 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.api_client import ApiClient + + +class UserApi(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 create_current_user_repo(self, **kwargs): # noqa: E501 + """Create a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_current_user_repo(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_current_user_repo_with_http_info(**kwargs) # noqa: E501 + return data + + def create_current_user_repo_with_http_info(self, **kwargs): # noqa: E501 + """Create a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_current_user_repo_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateRepoOption body: + :return: Repository + 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 create_current_user_repo" % key + ) + params[key] = val + del params['kwargs'] + + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # 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 create_user_variable(self, variablename, **kwargs): # noqa: E501 + """Create a user-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_user_variable(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :param CreateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + else: + (data) = self.create_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + return data + + def create_user_variable_with_http_info(self, variablename, **kwargs): # noqa: E501 + """Create a user-level variable # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_user_variable_with_http_info(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :param CreateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['variablename', '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 create_user_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `create_user_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables/{variablename}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_user_runner(self, runner_id, **kwargs): # noqa: E501 + """Delete an user-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_runner(runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_user_runner_with_http_info(runner_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_user_runner_with_http_info(runner_id, **kwargs) # noqa: E501 + return data + + def delete_user_runner_with_http_info(self, runner_id, **kwargs): # noqa: E501 + """Delete an user-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_runner_with_http_info(runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['runner_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 delete_user_runner" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'runner_id' is set + if self.api_client.client_side_validation and ('runner_id' not in params or + params['runner_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `runner_id` when calling `delete_user_runner`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'runner_id' in params: + path_params['runner_id'] = params['runner_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/runners/{runner_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_user_secret(self, secretname, **kwargs): # noqa: E501 + """Delete a secret in a user scope # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_secret(secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str secretname: name of the secret (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_user_secret_with_http_info(secretname, **kwargs) # noqa: E501 + else: + (data) = self.delete_user_secret_with_http_info(secretname, **kwargs) # noqa: E501 + return data + + def delete_user_secret_with_http_info(self, secretname, **kwargs): # noqa: E501 + """Delete a secret in a user scope # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_secret_with_http_info(secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str secretname: name of the secret (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['secretname'] # 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 delete_user_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `delete_user_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/secrets/{secretname}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 delete_user_variable(self, variablename, **kwargs): # noqa: E501 + """Delete a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_variable(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + else: + (data) = self.delete_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + return data + + def delete_user_variable_with_http_info(self, variablename, **kwargs): # noqa: E501 + """Delete a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_variable_with_http_info(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['variablename'] # 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 delete_user_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `delete_user_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables/{variablename}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_user_runner(self, runner_id, **kwargs): # noqa: E501 + """Get an user-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_runner(runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_runner_with_http_info(runner_id, **kwargs) # noqa: E501 + else: + (data) = self.get_user_runner_with_http_info(runner_id, **kwargs) # noqa: E501 + return data + + def get_user_runner_with_http_info(self, runner_id, **kwargs): # noqa: E501 + """Get an user-level runner # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_runner_with_http_info(runner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str runner_id: id of the runner (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['runner_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 get_user_runner" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'runner_id' is set + if self.api_client.client_side_validation and ('runner_id' not in params or + params['runner_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `runner_id` when calling `get_user_runner`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'runner_id' in params: + path_params['runner_id'] = params['runner_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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/runners/{runner_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_user_runners(self, **kwargs): # noqa: E501 + """Get user-level runners # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_runners(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_runners_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_runners_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_runners_with_http_info(self, **kwargs): # noqa: E501 + """Get user-level runners # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_runners_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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 get_user_runners" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/runners', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 get_user_settings(self, **kwargs): # noqa: E501 + """Get user settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[UserSettings] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_settings_with_http_info(self, **kwargs): # noqa: E501 + """Get user settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[UserSettings] + 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 get_user_settings" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UserSettings]', # 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 get_user_variable(self, variablename, **kwargs): # noqa: E501 + """Get a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_variable(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + else: + (data) = self.get_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + return data + + def get_user_variable_with_http_info(self, variablename, **kwargs): # noqa: E501 + """Get a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_variable_with_http_info(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :return: ActionVariable + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['variablename'] # 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 get_user_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `get_user_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables/{variablename}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionVariable', # 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 get_user_variables_list(self, **kwargs): # noqa: E501 + """Get the user-level list of variables which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_variables_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_variables_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_variables_list_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_variables_list_with_http_info(self, **kwargs): # noqa: E501 + """Get the user-level list of variables which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_variables_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[ActionVariable] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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 get_user_variables_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ActionVariable]', # 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 get_user_workflow_jobs(self, **kwargs): # noqa: E501 + """Get workflow jobs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_workflow_jobs(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_workflow_jobs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_workflow_jobs_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_workflow_jobs_with_http_info(self, **kwargs): # noqa: E501 + """Get workflow jobs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_workflow_jobs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['status', 'page', 'limit'] # 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 get_user_workflow_jobs" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/jobs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowJobsResponse', # 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 get_user_workflow_runs(self, **kwargs): # noqa: E501 + """Get workflow runs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_workflow_runs(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str event: workflow event name + :param str branch: workflow branch + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param str actor: triggered by user + :param str head_sha: triggering sha of the workflow run + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowRunsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_workflow_runs_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_workflow_runs_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_workflow_runs_with_http_info(self, **kwargs): # noqa: E501 + """Get workflow runs # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_workflow_runs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str event: workflow event name + :param str branch: workflow branch + :param str status: workflow status (pending, queued, in_progress, failure, success, skipped) + :param str actor: triggered by user + :param str head_sha: triggering sha of the workflow run + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: ActionWorkflowRunsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['event', 'branch', 'status', 'actor', 'head_sha', 'page', 'limit'] # 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 get_user_workflow_runs" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'event' in params: + query_params.append(('event', params['event'])) # noqa: E501 + if 'branch' in params: + query_params.append(('branch', params['branch'])) # noqa: E501 + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'actor' in params: + query_params.append(('actor', params['actor'])) # noqa: E501 + if 'head_sha' in params: + query_params.append(('head_sha', params['head_sha'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/runs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActionWorkflowRunsResponse', # 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 get_verification_token(self, **kwargs): # noqa: E501 + """Get a Token to verify # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_verification_token(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_verification_token_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_verification_token_with_http_info(**kwargs) # noqa: E501 + return data + + def get_verification_token_with_http_info(self, **kwargs): # noqa: E501 + """Get a Token to verify # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_verification_token_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + 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 get_verification_token" % 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( + ['text/plain']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_key_token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 update_user_secret(self, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value in a user scope # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_secret(secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_user_secret_with_http_info(secretname, **kwargs) # noqa: E501 + else: + (data) = self.update_user_secret_with_http_info(secretname, **kwargs) # noqa: E501 + return data + + def update_user_secret_with_http_info(self, secretname, **kwargs): # noqa: E501 + """Create or Update a secret value in a user scope # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_secret_with_http_info(secretname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str secretname: name of the secret (required) + :param CreateOrUpdateSecretOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['secretname', '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 update_user_secret" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'secretname' is set + if self.api_client.client_side_validation and ('secretname' not in params or + params['secretname'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `secretname` when calling `update_user_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'secretname' in params: + path_params['secretname'] = params['secretname'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/secrets/{secretname}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 update_user_settings(self, **kwargs): # noqa: E501 + """Update user settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_settings(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UserSettingsOptions body: + :return: list[UserSettings] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_user_settings_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.update_user_settings_with_http_info(**kwargs) # noqa: E501 + return data + + def update_user_settings_with_http_info(self, **kwargs): # noqa: E501 + """Update user settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_settings_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UserSettingsOptions body: + :return: list[UserSettings] + 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 update_user_settings" % key + ) + params[key] = val + del params['kwargs'] + + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/settings', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UserSettings]', # 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 update_user_variable(self, variablename, **kwargs): # noqa: E501 + """Update a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_variable(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :param UpdateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + else: + (data) = self.update_user_variable_with_http_info(variablename, **kwargs) # noqa: E501 + return data + + def update_user_variable_with_http_info(self, variablename, **kwargs): # noqa: E501 + """Update a user-level variable which is created by current doer # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_variable_with_http_info(variablename, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str variablename: name of the variable (required) + :param UpdateVariableOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['variablename', '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 update_user_variable" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'variablename' is set + if self.api_client.client_side_validation and ('variablename' not in params or + params['variablename'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `variablename` when calling `update_user_variable`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'variablename' in params: + path_params['variablename'] = params['variablename'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/variables/{variablename}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_add_email(self, **kwargs): # noqa: E501 + """Add email addresses # 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_add_email(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateEmailOption body: + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_add_email_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_add_email_with_http_info(**kwargs) # noqa: E501 + return data + + def user_add_email_with_http_info(self, **kwargs): # noqa: E501 + """Add email addresses # 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_add_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateEmailOption body: + :return: list[Email] + 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_add_email" % key + ) + params[key] = val + del params['kwargs'] + + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/emails', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Email]', # 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_block_user(self, username, **kwargs): # noqa: E501 + """Block 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_block_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to block (required) + :param str note: optional note for the block + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_block_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_block_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_block_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Block 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_block_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to block (required) + :param str note: optional note for the block + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'note'] # 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_block_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_block_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'note' in params: + query_params.append(('note', params['note'])) # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/blocks/{username}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_check_following(self, username, target, **kwargs): # noqa: E501 + """Check if one user is following another 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_check_following(username, target, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the following user (required) + :param str target: username of the followed user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_check_following_with_http_info(username, target, **kwargs) # noqa: E501 + else: + (data) = self.user_check_following_with_http_info(username, target, **kwargs) # noqa: E501 + return data + + def user_check_following_with_http_info(self, username, target, **kwargs): # noqa: E501 + """Check if one user is following another 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_check_following_with_http_info(username, target, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the following user (required) + :param str target: username of the followed user (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'target'] # 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_check_following" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_check_following`") # noqa: E501 + # verify the required parameter 'target' is set + if self.api_client.client_side_validation and ('target' not in params or + params['target'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `target` when calling `user_check_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + if 'target' in params: + path_params['target'] = params['target'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/following/{target}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_check_user_block(self, username, **kwargs): # noqa: E501 + """Check if a user is blocked by the authenticated 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_check_user_block(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to check (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_check_user_block_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_check_user_block_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_check_user_block_with_http_info(self, username, **kwargs): # noqa: E501 + """Check if a user is blocked by the authenticated 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_check_user_block_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to check (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_check_user_block" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_check_user_block`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/blocks/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_create_hook(self, body, **kwargs): # noqa: E501 + """Create a hook # 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_create_hook(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateHookOption body: (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_create_hook_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.user_create_hook_with_http_info(body, **kwargs) # noqa: E501 + return data + + def user_create_hook_with_http_info(self, body, **kwargs): # noqa: E501 + """Create a hook # 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_create_hook_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateHookOption body: (required) + :return: Hook + 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_create_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `user_create_hook`") # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/hooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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_create_o_auth2_application(self, body, **kwargs): # noqa: E501 + """creates a new OAuth2 application # 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_create_o_auth2_application(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_create_o_auth2_application_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.user_create_o_auth2_application_with_http_info(body, **kwargs) # noqa: E501 + return data + + def user_create_o_auth2_application_with_http_info(self, body, **kwargs): # noqa: E501 + """creates a new OAuth2 application # 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_create_o_auth2_application_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + 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_create_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `user_create_o_auth2_application`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Application', # 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_create_runner_registration_token(self, **kwargs): # noqa: E501 + """Get an user's actions runner registration token # 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_create_runner_registration_token(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_create_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_create_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + return data + + def user_create_runner_registration_token_with_http_info(self, **kwargs): # noqa: E501 + """Get an user's actions runner registration token # 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_create_runner_registration_token_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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_create_runner_registration_token" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/runners/registration-token', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_create_token(self, username, **kwargs): # noqa: E501 + """Create an access token # 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_create_token(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose token is to be created (required) + :param CreateAccessTokenOption body: + :return: AccessToken + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_create_token_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_create_token_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_create_token_with_http_info(self, username, **kwargs): # noqa: E501 + """Create an access token # 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_create_token_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose token is to be created (required) + :param CreateAccessTokenOption body: + :return: AccessToken + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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_create_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_create_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/tokens', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccessToken', # 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_current_check_following(self, username, **kwargs): # noqa: E501 + """Check whether a user is followed by the authenticated 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_current_check_following(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to check for authenticated followers (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_check_following_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_current_check_following_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_current_check_following_with_http_info(self, username, **kwargs): # noqa: E501 + """Check whether a user is followed by the authenticated 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_current_check_following_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to check for authenticated followers (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_current_check_following" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_current_check_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/following/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_check_starring(self, owner, repo, **kwargs): # noqa: E501 + """Whether the authenticated is starring the repo # 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_current_check_starring(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_check_starring_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_check_starring_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_check_starring_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Whether the authenticated is starring the repo # 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_current_check_starring_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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_current_check_starring" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_check_starring`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `user_current_check_starring`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/starred/{owner}/{repo}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_delete_follow(self, username, **kwargs): # noqa: E501 + """Unfollow 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_current_delete_follow(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to unfollow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_follow_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_follow_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_current_delete_follow_with_http_info(self, username, **kwargs): # noqa: E501 + """Unfollow 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_current_delete_follow_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to unfollow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_current_delete_follow" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_current_delete_follow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/following/{username}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_delete_gpg_key(self, id, **kwargs): # noqa: E501 + """Remove a GPG key # 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_current_delete_gpg_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_delete_gpg_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Remove a GPG key # 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_current_delete_gpg_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to delete (required) + :return: None + 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 user_current_delete_gpg_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_current_delete_gpg_key`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_keys/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_delete_key(self, id, **kwargs): # noqa: E501 + """Delete a public key # 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_current_delete_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_delete_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete a public key # 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_current_delete_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to delete (required) + :return: None + 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 user_current_delete_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_current_delete_key`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/keys/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_delete_star(self, owner, repo, **kwargs): # noqa: E501 + """Unstar the given repo # 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_current_delete_star(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to unstar (required) + :param str repo: name of the repo to unstar (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_delete_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_delete_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_delete_star_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Unstar the given repo # 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_current_delete_star_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to unstar (required) + :param str repo: name of the repo to unstar (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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_current_delete_star" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_delete_star`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `user_current_delete_star`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/starred/{owner}/{repo}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_get_gpg_key(self, id, **kwargs): # noqa: E501 + """Get a GPG key # 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_current_get_gpg_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_get_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_get_gpg_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_get_gpg_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a GPG key # 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_current_get_gpg_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: GPGKey + 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 user_current_get_gpg_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_current_get_gpg_key`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GPGKey', # 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_current_get_key(self, id, **kwargs): # noqa: E501 + """Get a public key # 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_current_get_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_get_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_current_get_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_current_get_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a public key # 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_current_get_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of key to get (required) + :return: PublicKey + 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 user_current_get_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_current_get_key`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKey', # 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_current_list_followers(self, **kwargs): # noqa: E501 + """List the authenticated user's followers # 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_current_list_followers(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_followers_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_followers_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_followers_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's followers # 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_current_list_followers_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_current_list_followers" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/followers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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_current_list_following(self, **kwargs): # noqa: E501 + """List the users that the authenticated user is following # 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_current_list_following(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_following_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_following_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_following_with_http_info(self, **kwargs): # noqa: E501 + """List the users that the authenticated user is following # 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_current_list_following_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_current_list_following" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/following', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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_current_list_gpg_keys(self, **kwargs): # noqa: E501 + """List the authenticated user's GPG keys # 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_current_list_gpg_keys(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_gpg_keys_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_gpg_keys_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_gpg_keys_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's GPG keys # 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_current_list_gpg_keys_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_current_list_gpg_keys" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[GPGKey]', # 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_current_list_keys(self, **kwargs): # noqa: E501 + """List the authenticated user's public keys # 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_current_list_keys(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_keys_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_keys_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_keys_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's public keys # 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_current_list_keys_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['fingerprint', 'page', 'limit'] # 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_current_list_keys" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'fingerprint' in params: + query_params.append(('fingerprint', params['fingerprint'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PublicKey]', # 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_current_list_repos(self, **kwargs): # noqa: E501 + """List the repos that the authenticated user owns # 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_current_list_repos(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_repos_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_repos_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_repos_with_http_info(self, **kwargs): # noqa: E501 + """List the repos that the authenticated user owns # 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_current_list_repos_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_current_list_repos" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # 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_current_list_starred(self, **kwargs): # noqa: E501 + """The repos that the authenticated user has starred # 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_current_list_starred(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_starred_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_starred_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_starred_with_http_info(self, **kwargs): # noqa: E501 + """The repos that the authenticated user has starred # 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_current_list_starred_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_current_list_starred" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/starred', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # 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_current_list_subscriptions(self, **kwargs): # noqa: E501 + """List repositories watched by the authenticated 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_current_list_subscriptions(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_list_subscriptions_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_list_subscriptions_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_list_subscriptions_with_http_info(self, **kwargs): # noqa: E501 + """List repositories watched by the authenticated 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_current_list_subscriptions_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_current_list_subscriptions" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/subscriptions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # 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_current_post_gpg_key(self, **kwargs): # noqa: E501 + """Create a GPG key # 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_current_post_gpg_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateGPGKeyOption form: + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_post_gpg_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_post_gpg_key_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_post_gpg_key_with_http_info(self, **kwargs): # noqa: E501 + """Create a GPG key # 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_current_post_gpg_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateGPGKeyOption form: + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['form'] # 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_current_post_gpg_key" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'form' in params: + body_params = params['form'] + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GPGKey', # 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_current_post_key(self, **kwargs): # noqa: E501 + """Create a public key # 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_current_post_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateKeyOption body: + :return: PublicKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_post_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_post_key_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_post_key_with_http_info(self, **kwargs): # noqa: E501 + """Create a public key # 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_current_post_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateKeyOption body: + :return: PublicKey + 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_current_post_key" % key + ) + params[key] = val + del params['kwargs'] + + 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKey', # 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_current_put_follow(self, username, **kwargs): # noqa: E501 + """Follow 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_current_put_follow(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to follow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_put_follow_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_current_put_follow_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_current_put_follow_with_http_info(self, username, **kwargs): # noqa: E501 + """Follow 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_current_put_follow_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to follow (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_current_put_follow" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_current_put_follow`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/following/{username}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_put_star(self, owner, repo, **kwargs): # noqa: E501 + """Star the given repo # 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_current_put_star(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to star (required) + :param str repo: name of the repo to star (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_put_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.user_current_put_star_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def user_current_put_star_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Star the given repo # 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_current_put_star_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to star (required) + :param str repo: name of the repo to star (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # 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_current_put_star" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if self.api_client.client_side_validation and ('owner' not in params or + params['owner'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `user_current_put_star`") # noqa: E501 + # verify the required parameter 'repo' is set + if self.api_client.client_side_validation and ('repo' not in params or + params['repo'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `user_current_put_star`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/starred/{owner}/{repo}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_current_tracked_times(self, **kwargs): # noqa: E501 + """List the current user's tracked times # 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_current_tracked_times(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_current_tracked_times_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_current_tracked_times_with_http_info(**kwargs) # noqa: E501 + return data + + def user_current_tracked_times_with_http_info(self, **kwargs): # noqa: E501 + """List the current user's tracked times # 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_current_tracked_times_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit', 'since', 'before'] # 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_current_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/times', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TrackedTime]', # 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_delete_access_token(self, username, token, **kwargs): # noqa: E501 + """delete an access token # 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_delete_access_token(username, token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose token is to be deleted (required) + :param str token: token to be deleted, identified by ID and if not available by name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_delete_access_token_with_http_info(username, token, **kwargs) # noqa: E501 + else: + (data) = self.user_delete_access_token_with_http_info(username, token, **kwargs) # noqa: E501 + return data + + def user_delete_access_token_with_http_info(self, username, token, **kwargs): # noqa: E501 + """delete an access token # 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_delete_access_token_with_http_info(username, token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose token is to be deleted (required) + :param str token: token to be deleted, identified by ID and if not available by name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', '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_delete_access_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_delete_access_token`") # noqa: E501 + # verify the required parameter 'token' is set + if self.api_client.client_side_validation and ('token' not in params or + params['token'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `token` when calling `user_delete_access_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + if 'token' in params: + path_params['token'] = params['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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/tokens/{token}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_delete_avatar(self, **kwargs): # noqa: E501 + """Delete Avatar # 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_delete_avatar(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_delete_avatar_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_delete_avatar_with_http_info(**kwargs) # noqa: E501 + return data + + def user_delete_avatar_with_http_info(self, **kwargs): # noqa: E501 + """Delete Avatar # 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_delete_avatar_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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_delete_avatar" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/avatar', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_delete_email(self, **kwargs): # noqa: E501 + """Delete email addresses # 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_delete_email(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeleteEmailOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_delete_email_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_delete_email_with_http_info(**kwargs) # noqa: E501 + return data + + def user_delete_email_with_http_info(self, **kwargs): # noqa: E501 + """Delete email addresses # 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_delete_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeleteEmailOption body: + :return: None + 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_delete_email" % key + ) + params[key] = val + del params['kwargs'] + + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/emails', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_delete_hook(self, id, **kwargs): # noqa: E501 + """Delete a hook # 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_delete_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_delete_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_delete_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_delete_hook_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete a hook # 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_delete_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to delete (required) + :return: None + 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 user_delete_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_delete_hook`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/hooks/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_delete_o_auth2_application(self, id, **kwargs): # noqa: E501 + """delete an OAuth2 Application # 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_delete_o_auth2_application(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: token to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_delete_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_delete_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_delete_o_auth2_application_with_http_info(self, id, **kwargs): # noqa: E501 + """delete an OAuth2 Application # 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_delete_o_auth2_application_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: token to be deleted (required) + :return: None + 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 user_delete_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_delete_o_auth2_application`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_edit_hook(self, id, **kwargs): # noqa: E501 + """Update a hook # 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_edit_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_edit_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_edit_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_edit_hook_with_http_info(self, id, **kwargs): # noqa: E501 + """Update a hook # 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_edit_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to update (required) + :param EditHookOption body: + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', '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_edit_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_edit_hook`") # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/hooks/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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_get(self, username, **kwargs): # noqa: E501 + """Get 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_get(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose data is to be listed (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_get_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_get_with_http_info(self, username, **kwargs): # noqa: E501 + """Get 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_get_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose data is to be listed (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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_get_current(self, **kwargs): # noqa: E501 + """Get the authenticated 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_get_current(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_current_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_current_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_current_with_http_info(self, **kwargs): # noqa: E501 + """Get the authenticated 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_get_current_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: User + 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_get_current" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # 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_get_heatmap_data(self, username, **kwargs): # noqa: E501 + """Get a user's heatmap # 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_get_heatmap_data(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose heatmap is to be obtained (required) + :return: list[UserHeatmapData] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_heatmap_data_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_get_heatmap_data_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_get_heatmap_data_with_http_info(self, username, **kwargs): # noqa: E501 + """Get a user's heatmap # 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_get_heatmap_data_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose heatmap is to be obtained (required) + :return: list[UserHeatmapData] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_get_heatmap_data" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_get_heatmap_data`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/heatmap', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UserHeatmapData]', # 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_get_hook(self, id, **kwargs): # noqa: E501 + """Get a hook # 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_get_hook(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to get (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_hook_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_get_hook_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_get_hook_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a hook # 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_get_hook_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the hook to get (required) + :return: Hook + 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 user_get_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_get_hook`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/hooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # 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_get_o_auth2_application(self, id, **kwargs): # noqa: E501 + """get an OAuth2 Application # 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_get_o_auth2_application(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: Application ID to be found (required) + :return: OAuth2Application + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_get_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_get_o_auth2_application_with_http_info(self, id, **kwargs): # noqa: E501 + """get an OAuth2 Application # 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_get_o_auth2_application_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: Application ID to be found (required) + :return: OAuth2Application + 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 user_get_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_get_o_auth2_application`") # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Application', # 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_get_oauth2_application(self, **kwargs): # noqa: E501 + """List the authenticated user's oauth2 applications # 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_get_oauth2_application(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[OAuth2Application] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_oauth2_application_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_oauth2_application_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_oauth2_application_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's oauth2 applications # 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_get_oauth2_application_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[OAuth2Application] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_get_oauth2_application" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OAuth2Application]', # 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_get_runner_registration_token(self, **kwargs): # noqa: E501 + """Get an user's actions runner registration token # 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_get_runner_registration_token(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_runner_registration_token_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_runner_registration_token_with_http_info(self, **kwargs): # noqa: E501 + """Get an user's actions runner registration token # 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_get_runner_registration_token_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + 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_get_runner_registration_token" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/actions/runners/registration-token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_get_stop_watches(self, **kwargs): # noqa: E501 + """Get list of all existing stopwatches # 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_get_stop_watches(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[StopWatch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_stop_watches_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_stop_watches_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_stop_watches_with_http_info(self, **kwargs): # noqa: E501 + """Get list of all existing stopwatches # 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_get_stop_watches_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[StopWatch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_get_stop_watches" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/stopwatches', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[StopWatch]', # 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_get_tokens(self, username, **kwargs): # noqa: E501 + """List the authenticated user's access tokens # 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_get_tokens(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of to user whose access tokens are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[AccessToken] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_tokens_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_get_tokens_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_get_tokens_with_http_info(self, username, **kwargs): # noqa: E501 + """List the authenticated user's access tokens # 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_get_tokens_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of to user whose access tokens are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[AccessToken] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', 'limit'] # 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_get_tokens" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_get_tokens`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/tokens', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AccessToken]', # 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_list_activity_feeds(self, username, **kwargs): # noqa: E501 + """List a user's activity feeds # 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_list_activity_feeds(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose activity feeds are to be listed (required) + :param bool only_performed_by: if true, only show actions performed by the requested user + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_activity_feeds_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_activity_feeds_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_activity_feeds_with_http_info(self, username, **kwargs): # noqa: E501 + """List a user's activity feeds # 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_list_activity_feeds_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose activity feeds are to be listed (required) + :param bool only_performed_by: if true, only show actions performed by the requested user + :param date _date: the date of the activities to be found + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Activity] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'only_performed_by', '_date', 'page', 'limit'] # 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_list_activity_feeds" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_list_activity_feeds`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'only_performed_by' in params: + query_params.append(('only-performed-by', params['only_performed_by'])) # noqa: E501 + if '_date' in params: + query_params.append(('date', params['_date'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/activities/feeds', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Activity]', # 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_list_blocks(self, **kwargs): # noqa: E501 + """List users blocked by the authenticated 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_list_blocks(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_blocks_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_blocks_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_blocks_with_http_info(self, **kwargs): # noqa: E501 + """List users blocked by the authenticated 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_list_blocks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_list_blocks" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/blocks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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_list_emails(self, **kwargs): # noqa: E501 + """List the authenticated user's email addresses # 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_list_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Email] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_emails_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_emails_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_emails_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's email addresses # 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_list_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[Email] + 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_list_emails" % 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/emails', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Email]', # 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_list_followers(self, username, **kwargs): # noqa: E501 + """List the given user's followers # 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_list_followers(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose followers are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_followers_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_followers_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_followers_with_http_info(self, username, **kwargs): # noqa: E501 + """List the given user's followers # 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_list_followers_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose followers are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', 'limit'] # 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_list_followers" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_list_followers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/followers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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_list_following(self, username, **kwargs): # noqa: E501 + """List the users that the given user is following # 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_list_following(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose followed users are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_following_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_following_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_following_with_http_info(self, username, **kwargs): # noqa: E501 + """List the users that the given user is following # 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_list_following_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose followed users are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', 'limit'] # 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_list_following" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_list_following`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/following', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[User]', # 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_list_gpg_keys(self, username, **kwargs): # noqa: E501 + """List the given user's GPG keys # 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_list_gpg_keys(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose GPG key list is to be obtained (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_gpg_keys_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_gpg_keys_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_gpg_keys_with_http_info(self, username, **kwargs): # noqa: E501 + """List the given user's GPG keys # 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_list_gpg_keys_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose GPG key list is to be obtained (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[GPGKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', 'limit'] # 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_list_gpg_keys" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_list_gpg_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/gpg_keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[GPGKey]', # 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_list_hooks(self, **kwargs): # noqa: E501 + """List the authenticated user's 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.user_list_hooks(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_hooks_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_hooks_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_hooks_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's 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.user_list_hooks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Hook] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_list_hooks" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/hooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Hook]', # 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_list_keys(self, username, **kwargs): # noqa: E501 + """List the given user's public keys # 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_list_keys(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose public keys are to be listed (required) + :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_keys_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_keys_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_keys_with_http_info(self, username, **kwargs): # noqa: E501 + """List the given user's public keys # 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_list_keys_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose public keys are to be listed (required) + :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[PublicKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'fingerprint', 'page', 'limit'] # 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_list_keys" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_list_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'fingerprint' in params: + query_params.append(('fingerprint', params['fingerprint'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PublicKey]', # 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_list_repos(self, username, **kwargs): # noqa: E501 + """List the repos owned by the given 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_list_repos(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose owned repos are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_repos_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_repos_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_repos_with_http_info(self, username, **kwargs): # noqa: E501 + """List the repos owned by the given 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_list_repos_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose owned repos are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', 'limit'] # 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_list_repos" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_list_repos`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/repos', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # 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_list_starred(self, username, **kwargs): # noqa: E501 + """The repos that the given user has starred # 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_list_starred(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose starred repos are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_starred_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_starred_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_starred_with_http_info(self, username, **kwargs): # noqa: E501 + """The repos that the given user has starred # 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_list_starred_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose starred repos are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', 'limit'] # 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_list_starred" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_list_starred`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/starred', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # 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_list_subscriptions(self, username, **kwargs): # noqa: E501 + """List the repositories watched by 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_list_subscriptions(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose watched repos are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_subscriptions_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_list_subscriptions_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_list_subscriptions_with_http_info(self, username, **kwargs): # noqa: E501 + """List the repositories watched by 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_list_subscriptions_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user whose watched repos are to be listed (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Repository] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username', 'page', 'limit'] # 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_list_subscriptions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_list_subscriptions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/{username}/subscriptions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Repository]', # 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_list_teams(self, **kwargs): # noqa: E501 + """List all the teams a user belongs to # 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_list_teams(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_list_teams_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_list_teams_with_http_info(**kwargs) # noqa: E501 + return data + + def user_list_teams_with_http_info(self, **kwargs): # noqa: E501 + """List all the teams a user belongs to # 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_list_teams_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: list[Team] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # 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_list_teams" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/teams', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Team]', # 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_search(self, **kwargs): # noqa: E501 + """Search for 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_search(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int uid: ID of the user to search for + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: InlineResponse2001 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_search_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_search_with_http_info(**kwargs) # noqa: E501 + return data + + def user_search_with_http_info(self, **kwargs): # noqa: E501 + """Search for 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_search_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str q: keyword + :param int uid: ID of the user to search for + :param int page: page number of results to return (1-based) + :param int limit: page size of results + :return: InlineResponse2001 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['q', 'uid', 'page', 'limit'] # 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_search" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'uid' in params: + query_params.append(('uid', params['uid'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/users/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2001', # 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_unblock_user(self, username, **kwargs): # noqa: E501 + """Unblock 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_unblock_user(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to unblock (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_unblock_user_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.user_unblock_user_with_http_info(username, **kwargs) # noqa: E501 + return data + + def user_unblock_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Unblock 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_unblock_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: username of the user to unblock (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # 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_unblock_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in params or + params['username'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `user_unblock_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # 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', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/blocks/{username}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_update_avatar(self, **kwargs): # noqa: E501 + """Update Avatar # 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_update_avatar(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UpdateUserAvatarOption body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_update_avatar_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_update_avatar_with_http_info(**kwargs) # noqa: E501 + return data + + def user_update_avatar_with_http_info(self, **kwargs): # noqa: E501 + """Update Avatar # 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_update_avatar_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UpdateUserAvatarOption body: + :return: None + 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_update_avatar" % key + ) + params[key] = val + del params['kwargs'] + + 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/avatar', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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_update_o_auth2_application(self, id, body, **kwargs): # noqa: E501 + """update an OAuth2 Application, this includes regenerating the client secret # 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_update_o_auth2_application(id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: application to be updated (required) + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 + else: + (data) = self.user_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 + return data + + def user_update_o_auth2_application_with_http_info(self, id, body, **kwargs): # noqa: E501 + """update an OAuth2 Application, this includes regenerating the client secret # 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_update_o_auth2_application_with_http_info(id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: application to be updated (required) + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', '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_update_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `user_update_o_auth2_application`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `body` when calling `user_update_o_auth2_application`") # 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', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Application', # 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_verify_gpg_key(self, **kwargs): # noqa: E501 + """Verify a GPG key # 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_verify_gpg_key(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GPGKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_verify_gpg_key_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_verify_gpg_key_with_http_info(**kwargs) # noqa: E501 + return data + + def user_verify_gpg_key_with_http_info(self, **kwargs): # noqa: E501 + """Verify a GPG key # 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_verify_gpg_key_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: GPGKey + 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_verify_gpg_key" % 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 + + # 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 = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'TOTPHeader', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/gpg_key_verify', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GPGKey', # 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/swagger_client/api_client.py b/swagger_client/api_client.py new file mode 100644 index 0000000..f670d59 --- /dev/null +++ b/swagger_client/api_client.py @@ -0,0 +1,639 @@ +# coding: utf-8 +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 swagger_client.configuration import Configuration +import swagger_client.models +from swagger_client 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 + + # Use the pool property to lazily initialize the ThreadPool. + self._pool = None + 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' + self.client_side_validation = configuration.client_side_validation + + def __del__(self): + if self._pool is not None: + self._pool.close() + self._pool.join() + + @property + def pool(self): + if self._pool is None: + self._pool = ThreadPool() + return self._pool + + @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(swagger_client.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) + + with open(path, "w") as f: + 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/swagger_client/configuration.py b/swagger_client/configuration.py new file mode 100644 index 0000000..68897df --- /dev/null +++ b/swagger_client/configuration.py @@ -0,0 +1,300 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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 Configuration(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. + """ + + _default = None + + def __init__(self): + """Constructor""" + if self._default: + for key in self._default.__dict__.keys(): + self.__dict__[key] = copy.copy(self._default.__dict__[key]) + return + + # Default Base url + self.host = "https://localhost/api/v1" + # 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("swagger_client") + 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 = '' + + # Disable client side validation + self.client_side_validation = True + + @classmethod + def set_default(cls, default): + cls._default = default + + @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. + """ + token = "" + if self.username or self.password: + token = urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + return token + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + 'AccessToken': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'access_token', + 'value': self.get_api_key_with_prefix('access_token') + }, + 'AuthorizationHeaderToken': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix('Authorization') + }, + 'BasicAuth': + { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + }, + 'SudoHeader': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'Sudo', + 'value': self.get_api_key_with_prefix('Sudo') + }, + 'SudoParam': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'sudo', + 'value': self.get_api_key_with_prefix('sudo') + }, + 'TOTPHeader': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'X-GITEA-OTP', + 'value': self.get_api_key_with_prefix('X-GITEA-OTP') + }, + 'Token': + { + 'type': 'api_key', + 'in': 'query', + 'key': 'token', + 'value': self.get_api_key_with_prefix('token') + }, + + } + + 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: 1.25.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/swagger_client/models/__init__.py b/swagger_client/models/__init__.py new file mode 100644 index 0000000..64aa699 --- /dev/null +++ b/swagger_client/models/__init__.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +# flake8: noqa +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from swagger_client.models.api_error import APIError +from swagger_client.models.access_token import AccessToken +from swagger_client.models.action_artifact import ActionArtifact +from swagger_client.models.action_artifacts_response import ActionArtifactsResponse +from swagger_client.models.action_runner import ActionRunner +from swagger_client.models.action_runner_label import ActionRunnerLabel +from swagger_client.models.action_runners_response import ActionRunnersResponse +from swagger_client.models.action_task import ActionTask +from swagger_client.models.action_task_response import ActionTaskResponse +from swagger_client.models.action_variable import ActionVariable +from swagger_client.models.action_workflow import ActionWorkflow +from swagger_client.models.action_workflow_job import ActionWorkflowJob +from swagger_client.models.action_workflow_jobs_response import ActionWorkflowJobsResponse +from swagger_client.models.action_workflow_response import ActionWorkflowResponse +from swagger_client.models.action_workflow_run import ActionWorkflowRun +from swagger_client.models.action_workflow_runs_response import ActionWorkflowRunsResponse +from swagger_client.models.action_workflow_step import ActionWorkflowStep +from swagger_client.models.activity import Activity +from swagger_client.models.activity_pub import ActivityPub +from swagger_client.models.add_collaborator_option import AddCollaboratorOption +from swagger_client.models.add_time_option import AddTimeOption +from swagger_client.models.annotated_tag import AnnotatedTag +from swagger_client.models.annotated_tag_object import AnnotatedTagObject +from swagger_client.models.apply_diff_patch_file_options import ApplyDiffPatchFileOptions +from swagger_client.models.attachment import Attachment +from swagger_client.models.badge import Badge +from swagger_client.models.branch import Branch +from swagger_client.models.branch_protection import BranchProtection +from swagger_client.models.change_file_operation import ChangeFileOperation +from swagger_client.models.change_files_options import ChangeFilesOptions +from swagger_client.models.changed_file import ChangedFile +from swagger_client.models.combined_status import CombinedStatus +from swagger_client.models.comment import Comment +from swagger_client.models.commit import Commit +from swagger_client.models.commit_affected_files import CommitAffectedFiles +from swagger_client.models.commit_date_options import CommitDateOptions +from swagger_client.models.commit_meta import CommitMeta +from swagger_client.models.commit_stats import CommitStats +from swagger_client.models.commit_status import CommitStatus +from swagger_client.models.commit_user import CommitUser +from swagger_client.models.compare import Compare +from swagger_client.models.contents_ext_response import ContentsExtResponse +from swagger_client.models.contents_response import ContentsResponse +from swagger_client.models.create_access_token_option import CreateAccessTokenOption +from swagger_client.models.create_action_workflow_dispatch import CreateActionWorkflowDispatch +from swagger_client.models.create_branch_protection_option import CreateBranchProtectionOption +from swagger_client.models.create_branch_repo_option import CreateBranchRepoOption +from swagger_client.models.create_email_option import CreateEmailOption +from swagger_client.models.create_file_options import CreateFileOptions +from swagger_client.models.create_fork_option import CreateForkOption +from swagger_client.models.create_gpg_key_option import CreateGPGKeyOption +from swagger_client.models.create_hook_option import CreateHookOption +from swagger_client.models.create_hook_option_config import CreateHookOptionConfig +from swagger_client.models.create_issue_comment_option import CreateIssueCommentOption +from swagger_client.models.create_issue_option import CreateIssueOption +from swagger_client.models.create_key_option import CreateKeyOption +from swagger_client.models.create_label_option import CreateLabelOption +from swagger_client.models.create_milestone_option import CreateMilestoneOption +from swagger_client.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions +from swagger_client.models.create_or_update_secret_option import CreateOrUpdateSecretOption +from swagger_client.models.create_org_option import CreateOrgOption +from swagger_client.models.create_pull_request_option import CreatePullRequestOption +from swagger_client.models.create_pull_review_comment import CreatePullReviewComment +from swagger_client.models.create_pull_review_options import CreatePullReviewOptions +from swagger_client.models.create_push_mirror_option import CreatePushMirrorOption +from swagger_client.models.create_release_option import CreateReleaseOption +from swagger_client.models.create_repo_option import CreateRepoOption +from swagger_client.models.create_status_option import CreateStatusOption +from swagger_client.models.create_tag_option import CreateTagOption +from swagger_client.models.create_tag_protection_option import CreateTagProtectionOption +from swagger_client.models.create_team_option import CreateTeamOption +from swagger_client.models.create_user_option import CreateUserOption +from swagger_client.models.create_variable_option import CreateVariableOption +from swagger_client.models.create_wiki_page_options import CreateWikiPageOptions +from swagger_client.models.cron import Cron +from swagger_client.models.delete_email_option import DeleteEmailOption +from swagger_client.models.delete_file_options import DeleteFileOptions +from swagger_client.models.deploy_key import DeployKey +from swagger_client.models.dismiss_pull_review_options import DismissPullReviewOptions +from swagger_client.models.edit_attachment_options import EditAttachmentOptions +from swagger_client.models.edit_branch_protection_option import EditBranchProtectionOption +from swagger_client.models.edit_deadline_option import EditDeadlineOption +from swagger_client.models.edit_git_hook_option import EditGitHookOption +from swagger_client.models.edit_hook_option import EditHookOption +from swagger_client.models.edit_issue_comment_option import EditIssueCommentOption +from swagger_client.models.edit_issue_option import EditIssueOption +from swagger_client.models.edit_label_option import EditLabelOption +from swagger_client.models.edit_milestone_option import EditMilestoneOption +from swagger_client.models.edit_org_option import EditOrgOption +from swagger_client.models.edit_pull_request_option import EditPullRequestOption +from swagger_client.models.edit_reaction_option import EditReactionOption +from swagger_client.models.edit_release_option import EditReleaseOption +from swagger_client.models.edit_repo_option import EditRepoOption +from swagger_client.models.edit_tag_protection_option import EditTagProtectionOption +from swagger_client.models.edit_team_option import EditTeamOption +from swagger_client.models.edit_user_option import EditUserOption +from swagger_client.models.email import Email +from swagger_client.models.external_tracker import ExternalTracker +from swagger_client.models.external_wiki import ExternalWiki +from swagger_client.models.file_commit_response import FileCommitResponse +from swagger_client.models.file_delete_response import FileDeleteResponse +from swagger_client.models.file_links_response import FileLinksResponse +from swagger_client.models.file_response import FileResponse +from swagger_client.models.files_response import FilesResponse +from swagger_client.models.gpg_key import GPGKey +from swagger_client.models.gpg_key_email import GPGKeyEmail +from swagger_client.models.general_api_settings import GeneralAPISettings +from swagger_client.models.general_attachment_settings import GeneralAttachmentSettings +from swagger_client.models.general_repo_settings import GeneralRepoSettings +from swagger_client.models.general_ui_settings import GeneralUISettings +from swagger_client.models.generate_repo_option import GenerateRepoOption +from swagger_client.models.get_files_options import GetFilesOptions +from swagger_client.models.git_blob_response import GitBlobResponse +from swagger_client.models.git_entry import GitEntry +from swagger_client.models.git_hook import GitHook +from swagger_client.models.git_object import GitObject +from swagger_client.models.git_tree_response import GitTreeResponse +from swagger_client.models.gitignore_template_info import GitignoreTemplateInfo +from swagger_client.models.hook import Hook +from swagger_client.models.identity import Identity +from swagger_client.models.inline_response200 import InlineResponse200 +from swagger_client.models.inline_response2001 import InlineResponse2001 +from swagger_client.models.internal_tracker import InternalTracker +from swagger_client.models.issue import Issue +from swagger_client.models.issue_config import IssueConfig +from swagger_client.models.issue_config_contact_link import IssueConfigContactLink +from swagger_client.models.issue_config_validation import IssueConfigValidation +from swagger_client.models.issue_deadline import IssueDeadline +from swagger_client.models.issue_form_field import IssueFormField +from swagger_client.models.issue_form_field_type import IssueFormFieldType +from swagger_client.models.issue_form_field_visible import IssueFormFieldVisible +from swagger_client.models.issue_labels_option import IssueLabelsOption +from swagger_client.models.issue_meta import IssueMeta +from swagger_client.models.issue_template import IssueTemplate +from swagger_client.models.issue_template_string_slice import IssueTemplateStringSlice +from swagger_client.models.label import Label +from swagger_client.models.label_template import LabelTemplate +from swagger_client.models.license_template_info import LicenseTemplateInfo +from swagger_client.models.licenses_template_list_entry import LicensesTemplateListEntry +from swagger_client.models.lock_issue_option import LockIssueOption +from swagger_client.models.markdown_option import MarkdownOption +from swagger_client.models.markup_option import MarkupOption +from swagger_client.models.merge_pull_request_option import MergePullRequestOption +from swagger_client.models.merge_upstream_request import MergeUpstreamRequest +from swagger_client.models.merge_upstream_response import MergeUpstreamResponse +from swagger_client.models.migrate_repo_options import MigrateRepoOptions +from swagger_client.models.milestone import Milestone +from swagger_client.models.new_issue_pins_allowed import NewIssuePinsAllowed +from swagger_client.models.node_info import NodeInfo +from swagger_client.models.node_info_services import NodeInfoServices +from swagger_client.models.node_info_software import NodeInfoSoftware +from swagger_client.models.node_info_usage import NodeInfoUsage +from swagger_client.models.node_info_usage_users import NodeInfoUsageUsers +from swagger_client.models.note import Note +from swagger_client.models.notification_count import NotificationCount +from swagger_client.models.notification_subject import NotificationSubject +from swagger_client.models.notification_thread import NotificationThread +from swagger_client.models.notify_subject_type import NotifySubjectType +from swagger_client.models.o_auth2_application import OAuth2Application +from swagger_client.models.organization import Organization +from swagger_client.models.organization_permissions import OrganizationPermissions +from swagger_client.models.pr_branch_info import PRBranchInfo +from swagger_client.models.package import Package +from swagger_client.models.package_file import PackageFile +from swagger_client.models.payload_commit import PayloadCommit +from swagger_client.models.payload_commit_verification import PayloadCommitVerification +from swagger_client.models.payload_user import PayloadUser +from swagger_client.models.permission import Permission +from swagger_client.models.public_key import PublicKey +from swagger_client.models.pull_request import PullRequest +from swagger_client.models.pull_request_meta import PullRequestMeta +from swagger_client.models.pull_review import PullReview +from swagger_client.models.pull_review_comment import PullReviewComment +from swagger_client.models.pull_review_request_options import PullReviewRequestOptions +from swagger_client.models.push_mirror import PushMirror +from swagger_client.models.reaction import Reaction +from swagger_client.models.reference import Reference +from swagger_client.models.release import Release +from swagger_client.models.rename_branch_repo_option import RenameBranchRepoOption +from swagger_client.models.rename_org_option import RenameOrgOption +from swagger_client.models.rename_user_option import RenameUserOption +from swagger_client.models.repo_collaborator_permission import RepoCollaboratorPermission +from swagger_client.models.repo_commit import RepoCommit +from swagger_client.models.repo_topic_options import RepoTopicOptions +from swagger_client.models.repo_transfer import RepoTransfer +from swagger_client.models.repository import Repository +from swagger_client.models.repository_meta import RepositoryMeta +from swagger_client.models.review_state_type import ReviewStateType +from swagger_client.models.search_results import SearchResults +from swagger_client.models.secret import Secret +from swagger_client.models.server_version import ServerVersion +from swagger_client.models.state_type import StateType +from swagger_client.models.stop_watch import StopWatch +from swagger_client.models.submit_pull_review_options import SubmitPullReviewOptions +from swagger_client.models.tag import Tag +from swagger_client.models.tag_protection import TagProtection +from swagger_client.models.team import Team +from swagger_client.models.time_stamp import TimeStamp +from swagger_client.models.timeline_comment import TimelineComment +from swagger_client.models.topic_name import TopicName +from swagger_client.models.topic_response import TopicResponse +from swagger_client.models.tracked_time import TrackedTime +from swagger_client.models.transfer_repo_option import TransferRepoOption +from swagger_client.models.update_branch_protection_priories import UpdateBranchProtectionPriories +from swagger_client.models.update_file_options import UpdateFileOptions +from swagger_client.models.update_repo_avatar_option import UpdateRepoAvatarOption +from swagger_client.models.update_user_avatar_option import UpdateUserAvatarOption +from swagger_client.models.update_variable_option import UpdateVariableOption +from swagger_client.models.user import User +from swagger_client.models.user_badge_option import UserBadgeOption +from swagger_client.models.user_heatmap_data import UserHeatmapData +from swagger_client.models.user_settings import UserSettings +from swagger_client.models.user_settings_options import UserSettingsOptions +from swagger_client.models.watch_info import WatchInfo +from swagger_client.models.wiki_commit import WikiCommit +from swagger_client.models.wiki_commit_list import WikiCommitList +from swagger_client.models.wiki_page import WikiPage +from swagger_client.models.wiki_page_meta_data import WikiPageMetaData diff --git a/swagger_client/models/access_token.py b/swagger_client/models/access_token.py new file mode 100644 index 0000000..d052e9d --- /dev/null +++ b/swagger_client/models/access_token.py @@ -0,0 +1,293 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class AccessToken(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 = { + 'created_at': 'datetime', + 'id': 'int', + 'last_used_at': 'datetime', + 'name': 'str', + 'scopes': 'list[str]', + 'sha1': 'str', + 'token_last_eight': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'id': 'id', + 'last_used_at': 'last_used_at', + 'name': 'name', + 'scopes': 'scopes', + 'sha1': 'sha1', + 'token_last_eight': 'token_last_eight' + } + + def __init__(self, created_at=None, id=None, last_used_at=None, name=None, scopes=None, sha1=None, token_last_eight=None, _configuration=None): # noqa: E501 + """AccessToken - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._id = None + self._last_used_at = None + self._name = None + self._scopes = None + self._sha1 = None + self._token_last_eight = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if id is not None: + self.id = id + if last_used_at is not None: + self.last_used_at = last_used_at + if name is not None: + self.name = name + if scopes is not None: + self.scopes = scopes + if sha1 is not None: + self.sha1 = sha1 + if token_last_eight is not None: + self.token_last_eight = token_last_eight + + @property + def created_at(self): + """Gets the created_at of this AccessToken. # noqa: E501 + + The timestamp when the token was created # noqa: E501 + + :return: The created_at of this AccessToken. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this AccessToken. + + The timestamp when the token was created # noqa: E501 + + :param created_at: The created_at of this AccessToken. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def id(self): + """Gets the id of this AccessToken. # noqa: E501 + + The unique identifier of the access token # noqa: E501 + + :return: The id of this AccessToken. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AccessToken. + + The unique identifier of the access token # noqa: E501 + + :param id: The id of this AccessToken. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def last_used_at(self): + """Gets the last_used_at of this AccessToken. # noqa: E501 + + The timestamp when the token was last used # noqa: E501 + + :return: The last_used_at of this AccessToken. # noqa: E501 + :rtype: datetime + """ + return self._last_used_at + + @last_used_at.setter + def last_used_at(self, last_used_at): + """Sets the last_used_at of this AccessToken. + + The timestamp when the token was last used # noqa: E501 + + :param last_used_at: The last_used_at of this AccessToken. # noqa: E501 + :type: datetime + """ + + self._last_used_at = last_used_at + + @property + def name(self): + """Gets the name of this AccessToken. # noqa: E501 + + The name of the access token # noqa: E501 + + :return: The name of this AccessToken. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AccessToken. + + The name of the access token # noqa: E501 + + :param name: The name of this AccessToken. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def scopes(self): + """Gets the scopes of this AccessToken. # noqa: E501 + + The scopes granted to this access token # noqa: E501 + + :return: The scopes of this AccessToken. # noqa: E501 + :rtype: list[str] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """Sets the scopes of this AccessToken. + + The scopes granted to this access token # noqa: E501 + + :param scopes: The scopes of this AccessToken. # noqa: E501 + :type: list[str] + """ + + self._scopes = scopes + + @property + def sha1(self): + """Gets the sha1 of this AccessToken. # noqa: E501 + + The SHA1 hash of the access token # noqa: E501 + + :return: The sha1 of this AccessToken. # noqa: E501 + :rtype: str + """ + return self._sha1 + + @sha1.setter + def sha1(self, sha1): + """Sets the sha1 of this AccessToken. + + The SHA1 hash of the access token # noqa: E501 + + :param sha1: The sha1 of this AccessToken. # noqa: E501 + :type: str + """ + + self._sha1 = sha1 + + @property + def token_last_eight(self): + """Gets the token_last_eight of this AccessToken. # noqa: E501 + + The last eight characters of the token # noqa: E501 + + :return: The token_last_eight of this AccessToken. # noqa: E501 + :rtype: str + """ + return self._token_last_eight + + @token_last_eight.setter + def token_last_eight(self, token_last_eight): + """Sets the token_last_eight of this AccessToken. + + The last eight characters of the token # noqa: E501 + + :param token_last_eight: The token_last_eight of this AccessToken. # noqa: E501 + :type: str + """ + + self._token_last_eight = token_last_eight + + 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(AccessToken, 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, AccessToken): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AccessToken): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_artifact.py b/swagger_client/models/action_artifact.py new file mode 100644 index 0000000..80ceedc --- /dev/null +++ b/swagger_client/models/action_artifact.py @@ -0,0 +1,357 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionArtifact(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 = { + 'archive_download_url': 'str', + 'created_at': 'datetime', + 'expired': 'bool', + 'expires_at': 'datetime', + 'id': 'int', + 'name': 'str', + 'size_in_bytes': 'int', + 'updated_at': 'datetime', + 'url': 'str', + 'workflow_run': 'ActionWorkflowRun' + } + + attribute_map = { + 'archive_download_url': 'archive_download_url', + 'created_at': 'created_at', + 'expired': 'expired', + 'expires_at': 'expires_at', + 'id': 'id', + 'name': 'name', + 'size_in_bytes': 'size_in_bytes', + 'updated_at': 'updated_at', + 'url': 'url', + 'workflow_run': 'workflow_run' + } + + def __init__(self, archive_download_url=None, created_at=None, expired=None, expires_at=None, id=None, name=None, size_in_bytes=None, updated_at=None, url=None, workflow_run=None, _configuration=None): # noqa: E501 + """ActionArtifact - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._archive_download_url = None + self._created_at = None + self._expired = None + self._expires_at = None + self._id = None + self._name = None + self._size_in_bytes = None + self._updated_at = None + self._url = None + self._workflow_run = None + self.discriminator = None + + if archive_download_url is not None: + self.archive_download_url = archive_download_url + if created_at is not None: + self.created_at = created_at + if expired is not None: + self.expired = expired + if expires_at is not None: + self.expires_at = expires_at + if id is not None: + self.id = id + if name is not None: + self.name = name + if size_in_bytes is not None: + self.size_in_bytes = size_in_bytes + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if workflow_run is not None: + self.workflow_run = workflow_run + + @property + def archive_download_url(self): + """Gets the archive_download_url of this ActionArtifact. # noqa: E501 + + + :return: The archive_download_url of this ActionArtifact. # noqa: E501 + :rtype: str + """ + return self._archive_download_url + + @archive_download_url.setter + def archive_download_url(self, archive_download_url): + """Sets the archive_download_url of this ActionArtifact. + + + :param archive_download_url: The archive_download_url of this ActionArtifact. # noqa: E501 + :type: str + """ + + self._archive_download_url = archive_download_url + + @property + def created_at(self): + """Gets the created_at of this ActionArtifact. # noqa: E501 + + + :return: The created_at of this ActionArtifact. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ActionArtifact. + + + :param created_at: The created_at of this ActionArtifact. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def expired(self): + """Gets the expired of this ActionArtifact. # noqa: E501 + + + :return: The expired of this ActionArtifact. # noqa: E501 + :rtype: bool + """ + return self._expired + + @expired.setter + def expired(self, expired): + """Sets the expired of this ActionArtifact. + + + :param expired: The expired of this ActionArtifact. # noqa: E501 + :type: bool + """ + + self._expired = expired + + @property + def expires_at(self): + """Gets the expires_at of this ActionArtifact. # noqa: E501 + + + :return: The expires_at of this ActionArtifact. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this ActionArtifact. + + + :param expires_at: The expires_at of this ActionArtifact. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + + @property + def id(self): + """Gets the id of this ActionArtifact. # noqa: E501 + + + :return: The id of this ActionArtifact. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ActionArtifact. + + + :param id: The id of this ActionArtifact. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ActionArtifact. # noqa: E501 + + + :return: The name of this ActionArtifact. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionArtifact. + + + :param name: The name of this ActionArtifact. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def size_in_bytes(self): + """Gets the size_in_bytes of this ActionArtifact. # noqa: E501 + + + :return: The size_in_bytes of this ActionArtifact. # noqa: E501 + :rtype: int + """ + return self._size_in_bytes + + @size_in_bytes.setter + def size_in_bytes(self, size_in_bytes): + """Sets the size_in_bytes of this ActionArtifact. + + + :param size_in_bytes: The size_in_bytes of this ActionArtifact. # noqa: E501 + :type: int + """ + + self._size_in_bytes = size_in_bytes + + @property + def updated_at(self): + """Gets the updated_at of this ActionArtifact. # noqa: E501 + + + :return: The updated_at of this ActionArtifact. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this ActionArtifact. + + + :param updated_at: The updated_at of this ActionArtifact. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this ActionArtifact. # noqa: E501 + + + :return: The url of this ActionArtifact. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ActionArtifact. + + + :param url: The url of this ActionArtifact. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def workflow_run(self): + """Gets the workflow_run of this ActionArtifact. # noqa: E501 + + + :return: The workflow_run of this ActionArtifact. # noqa: E501 + :rtype: ActionWorkflowRun + """ + return self._workflow_run + + @workflow_run.setter + def workflow_run(self, workflow_run): + """Sets the workflow_run of this ActionArtifact. + + + :param workflow_run: The workflow_run of this ActionArtifact. # noqa: E501 + :type: ActionWorkflowRun + """ + + self._workflow_run = workflow_run + + 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(ActionArtifact, 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, ActionArtifact): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionArtifact): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_artifacts_response.py b/swagger_client/models/action_artifacts_response.py new file mode 100644 index 0000000..101f8cb --- /dev/null +++ b/swagger_client/models/action_artifacts_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionArtifactsResponse(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 = { + 'artifacts': 'list[ActionArtifact]', + 'total_count': 'int' + } + + attribute_map = { + 'artifacts': 'artifacts', + 'total_count': 'total_count' + } + + def __init__(self, artifacts=None, total_count=None, _configuration=None): # noqa: E501 + """ActionArtifactsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._artifacts = None + self._total_count = None + self.discriminator = None + + if artifacts is not None: + self.artifacts = artifacts + if total_count is not None: + self.total_count = total_count + + @property + def artifacts(self): + """Gets the artifacts of this ActionArtifactsResponse. # noqa: E501 + + + :return: The artifacts of this ActionArtifactsResponse. # noqa: E501 + :rtype: list[ActionArtifact] + """ + return self._artifacts + + @artifacts.setter + def artifacts(self, artifacts): + """Sets the artifacts of this ActionArtifactsResponse. + + + :param artifacts: The artifacts of this ActionArtifactsResponse. # noqa: E501 + :type: list[ActionArtifact] + """ + + self._artifacts = artifacts + + @property + def total_count(self): + """Gets the total_count of this ActionArtifactsResponse. # noqa: E501 + + + :return: The total_count of this ActionArtifactsResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ActionArtifactsResponse. + + + :param total_count: The total_count of this ActionArtifactsResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + 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(ActionArtifactsResponse, 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, ActionArtifactsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionArtifactsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_runner.py b/swagger_client/models/action_runner.py new file mode 100644 index 0000000..6184955 --- /dev/null +++ b/swagger_client/models/action_runner.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionRunner(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 = { + 'busy': 'bool', + 'ephemeral': 'bool', + 'id': 'int', + 'labels': 'list[ActionRunnerLabel]', + 'name': 'str', + 'status': 'str' + } + + attribute_map = { + 'busy': 'busy', + 'ephemeral': 'ephemeral', + 'id': 'id', + 'labels': 'labels', + 'name': 'name', + 'status': 'status' + } + + def __init__(self, busy=None, ephemeral=None, id=None, labels=None, name=None, status=None, _configuration=None): # noqa: E501 + """ActionRunner - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._busy = None + self._ephemeral = None + self._id = None + self._labels = None + self._name = None + self._status = None + self.discriminator = None + + if busy is not None: + self.busy = busy + if ephemeral is not None: + self.ephemeral = ephemeral + if id is not None: + self.id = id + if labels is not None: + self.labels = labels + if name is not None: + self.name = name + if status is not None: + self.status = status + + @property + def busy(self): + """Gets the busy of this ActionRunner. # noqa: E501 + + + :return: The busy of this ActionRunner. # noqa: E501 + :rtype: bool + """ + return self._busy + + @busy.setter + def busy(self, busy): + """Sets the busy of this ActionRunner. + + + :param busy: The busy of this ActionRunner. # noqa: E501 + :type: bool + """ + + self._busy = busy + + @property + def ephemeral(self): + """Gets the ephemeral of this ActionRunner. # noqa: E501 + + + :return: The ephemeral of this ActionRunner. # noqa: E501 + :rtype: bool + """ + return self._ephemeral + + @ephemeral.setter + def ephemeral(self, ephemeral): + """Sets the ephemeral of this ActionRunner. + + + :param ephemeral: The ephemeral of this ActionRunner. # noqa: E501 + :type: bool + """ + + self._ephemeral = ephemeral + + @property + def id(self): + """Gets the id of this ActionRunner. # noqa: E501 + + + :return: The id of this ActionRunner. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ActionRunner. + + + :param id: The id of this ActionRunner. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def labels(self): + """Gets the labels of this ActionRunner. # noqa: E501 + + + :return: The labels of this ActionRunner. # noqa: E501 + :rtype: list[ActionRunnerLabel] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this ActionRunner. + + + :param labels: The labels of this ActionRunner. # noqa: E501 + :type: list[ActionRunnerLabel] + """ + + self._labels = labels + + @property + def name(self): + """Gets the name of this ActionRunner. # noqa: E501 + + + :return: The name of this ActionRunner. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionRunner. + + + :param name: The name of this ActionRunner. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def status(self): + """Gets the status of this ActionRunner. # noqa: E501 + + + :return: The status of this ActionRunner. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ActionRunner. + + + :param status: The status of this ActionRunner. # noqa: E501 + :type: str + """ + + self._status = status + + 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(ActionRunner, 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, ActionRunner): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionRunner): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_runner_label.py b/swagger_client/models/action_runner_label.py new file mode 100644 index 0000000..25cb996 --- /dev/null +++ b/swagger_client/models/action_runner_label.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionRunnerLabel(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', + 'type': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'type': 'type' + } + + def __init__(self, id=None, name=None, type=None, _configuration=None): # noqa: E501 + """ActionRunnerLabel - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._name = None + self._type = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if type is not None: + self.type = type + + @property + def id(self): + """Gets the id of this ActionRunnerLabel. # noqa: E501 + + + :return: The id of this ActionRunnerLabel. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ActionRunnerLabel. + + + :param id: The id of this ActionRunnerLabel. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ActionRunnerLabel. # noqa: E501 + + + :return: The name of this ActionRunnerLabel. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionRunnerLabel. + + + :param name: The name of this ActionRunnerLabel. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def type(self): + """Gets the type of this ActionRunnerLabel. # noqa: E501 + + + :return: The type of this ActionRunnerLabel. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ActionRunnerLabel. + + + :param type: The type of this ActionRunnerLabel. # noqa: E501 + :type: str + """ + + 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(ActionRunnerLabel, 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, ActionRunnerLabel): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionRunnerLabel): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_runners_response.py b/swagger_client/models/action_runners_response.py new file mode 100644 index 0000000..f1ffff2 --- /dev/null +++ b/swagger_client/models/action_runners_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionRunnersResponse(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 = { + 'runners': 'list[ActionRunner]', + 'total_count': 'int' + } + + attribute_map = { + 'runners': 'runners', + 'total_count': 'total_count' + } + + def __init__(self, runners=None, total_count=None, _configuration=None): # noqa: E501 + """ActionRunnersResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._runners = None + self._total_count = None + self.discriminator = None + + if runners is not None: + self.runners = runners + if total_count is not None: + self.total_count = total_count + + @property + def runners(self): + """Gets the runners of this ActionRunnersResponse. # noqa: E501 + + + :return: The runners of this ActionRunnersResponse. # noqa: E501 + :rtype: list[ActionRunner] + """ + return self._runners + + @runners.setter + def runners(self, runners): + """Sets the runners of this ActionRunnersResponse. + + + :param runners: The runners of this ActionRunnersResponse. # noqa: E501 + :type: list[ActionRunner] + """ + + self._runners = runners + + @property + def total_count(self): + """Gets the total_count of this ActionRunnersResponse. # noqa: E501 + + + :return: The total_count of this ActionRunnersResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ActionRunnersResponse. + + + :param total_count: The total_count of this ActionRunnersResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + 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(ActionRunnersResponse, 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, ActionRunnersResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionRunnersResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_task.py b/swagger_client/models/action_task.py new file mode 100644 index 0000000..e14347e --- /dev/null +++ b/swagger_client/models/action_task.py @@ -0,0 +1,455 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionTask(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 = { + 'created_at': 'datetime', + 'display_title': 'str', + 'event': 'str', + 'head_branch': 'str', + 'head_sha': 'str', + 'id': 'int', + 'name': 'str', + 'run_number': 'int', + 'run_started_at': 'datetime', + 'status': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'workflow_id': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'display_title': 'display_title', + 'event': 'event', + 'head_branch': 'head_branch', + 'head_sha': 'head_sha', + 'id': 'id', + 'name': 'name', + 'run_number': 'run_number', + 'run_started_at': 'run_started_at', + 'status': 'status', + 'updated_at': 'updated_at', + 'url': 'url', + 'workflow_id': 'workflow_id' + } + + def __init__(self, created_at=None, display_title=None, event=None, head_branch=None, head_sha=None, id=None, name=None, run_number=None, run_started_at=None, status=None, updated_at=None, url=None, workflow_id=None, _configuration=None): # noqa: E501 + """ActionTask - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._display_title = None + self._event = None + self._head_branch = None + self._head_sha = None + self._id = None + self._name = None + self._run_number = None + self._run_started_at = None + self._status = None + self._updated_at = None + self._url = None + self._workflow_id = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if display_title is not None: + self.display_title = display_title + if event is not None: + self.event = event + if head_branch is not None: + self.head_branch = head_branch + if head_sha is not None: + self.head_sha = head_sha + if id is not None: + self.id = id + if name is not None: + self.name = name + if run_number is not None: + self.run_number = run_number + if run_started_at is not None: + self.run_started_at = run_started_at + if status is not None: + self.status = status + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if workflow_id is not None: + self.workflow_id = workflow_id + + @property + def created_at(self): + """Gets the created_at of this ActionTask. # noqa: E501 + + + :return: The created_at of this ActionTask. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ActionTask. + + + :param created_at: The created_at of this ActionTask. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def display_title(self): + """Gets the display_title of this ActionTask. # noqa: E501 + + DisplayTitle is the display title for the workflow run # noqa: E501 + + :return: The display_title of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._display_title + + @display_title.setter + def display_title(self, display_title): + """Sets the display_title of this ActionTask. + + DisplayTitle is the display title for the workflow run # noqa: E501 + + :param display_title: The display_title of this ActionTask. # noqa: E501 + :type: str + """ + + self._display_title = display_title + + @property + def event(self): + """Gets the event of this ActionTask. # noqa: E501 + + Event is the type of event that triggered the workflow # noqa: E501 + + :return: The event of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this ActionTask. + + Event is the type of event that triggered the workflow # noqa: E501 + + :param event: The event of this ActionTask. # noqa: E501 + :type: str + """ + + self._event = event + + @property + def head_branch(self): + """Gets the head_branch of this ActionTask. # noqa: E501 + + HeadBranch is the branch that triggered the workflow # noqa: E501 + + :return: The head_branch of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._head_branch + + @head_branch.setter + def head_branch(self, head_branch): + """Sets the head_branch of this ActionTask. + + HeadBranch is the branch that triggered the workflow # noqa: E501 + + :param head_branch: The head_branch of this ActionTask. # noqa: E501 + :type: str + """ + + self._head_branch = head_branch + + @property + def head_sha(self): + """Gets the head_sha of this ActionTask. # noqa: E501 + + HeadSHA is the commit SHA that triggered the workflow # noqa: E501 + + :return: The head_sha of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._head_sha + + @head_sha.setter + def head_sha(self, head_sha): + """Sets the head_sha of this ActionTask. + + HeadSHA is the commit SHA that triggered the workflow # noqa: E501 + + :param head_sha: The head_sha of this ActionTask. # noqa: E501 + :type: str + """ + + self._head_sha = head_sha + + @property + def id(self): + """Gets the id of this ActionTask. # noqa: E501 + + ID is the unique identifier for the action task # noqa: E501 + + :return: The id of this ActionTask. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ActionTask. + + ID is the unique identifier for the action task # noqa: E501 + + :param id: The id of this ActionTask. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ActionTask. # noqa: E501 + + Name is the name of the workflow # noqa: E501 + + :return: The name of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionTask. + + Name is the name of the workflow # noqa: E501 + + :param name: The name of this ActionTask. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def run_number(self): + """Gets the run_number of this ActionTask. # noqa: E501 + + RunNumber is the sequential number of the workflow run # noqa: E501 + + :return: The run_number of this ActionTask. # noqa: E501 + :rtype: int + """ + return self._run_number + + @run_number.setter + def run_number(self, run_number): + """Sets the run_number of this ActionTask. + + RunNumber is the sequential number of the workflow run # noqa: E501 + + :param run_number: The run_number of this ActionTask. # noqa: E501 + :type: int + """ + + self._run_number = run_number + + @property + def run_started_at(self): + """Gets the run_started_at of this ActionTask. # noqa: E501 + + + :return: The run_started_at of this ActionTask. # noqa: E501 + :rtype: datetime + """ + return self._run_started_at + + @run_started_at.setter + def run_started_at(self, run_started_at): + """Sets the run_started_at of this ActionTask. + + + :param run_started_at: The run_started_at of this ActionTask. # noqa: E501 + :type: datetime + """ + + self._run_started_at = run_started_at + + @property + def status(self): + """Gets the status of this ActionTask. # noqa: E501 + + Status indicates the current status of the workflow run # noqa: E501 + + :return: The status of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ActionTask. + + Status indicates the current status of the workflow run # noqa: E501 + + :param status: The status of this ActionTask. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def updated_at(self): + """Gets the updated_at of this ActionTask. # noqa: E501 + + + :return: The updated_at of this ActionTask. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this ActionTask. + + + :param updated_at: The updated_at of this ActionTask. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this ActionTask. # noqa: E501 + + URL is the API URL for this workflow run # noqa: E501 + + :return: The url of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ActionTask. + + URL is the API URL for this workflow run # noqa: E501 + + :param url: The url of this ActionTask. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def workflow_id(self): + """Gets the workflow_id of this ActionTask. # noqa: E501 + + WorkflowID is the identifier of the workflow # noqa: E501 + + :return: The workflow_id of this ActionTask. # noqa: E501 + :rtype: str + """ + return self._workflow_id + + @workflow_id.setter + def workflow_id(self, workflow_id): + """Sets the workflow_id of this ActionTask. + + WorkflowID is the identifier of the workflow # noqa: E501 + + :param workflow_id: The workflow_id of this ActionTask. # noqa: E501 + :type: str + """ + + self._workflow_id = workflow_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(ActionTask, 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, ActionTask): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionTask): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_task_response.py b/swagger_client/models/action_task_response.py new file mode 100644 index 0000000..4845f87 --- /dev/null +++ b/swagger_client/models/action_task_response.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionTaskResponse(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 = { + 'total_count': 'int', + 'workflow_runs': 'list[ActionTask]' + } + + attribute_map = { + 'total_count': 'total_count', + 'workflow_runs': 'workflow_runs' + } + + def __init__(self, total_count=None, workflow_runs=None, _configuration=None): # noqa: E501 + """ActionTaskResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._total_count = None + self._workflow_runs = None + self.discriminator = None + + if total_count is not None: + self.total_count = total_count + if workflow_runs is not None: + self.workflow_runs = workflow_runs + + @property + def total_count(self): + """Gets the total_count of this ActionTaskResponse. # noqa: E501 + + TotalCount is the total number of workflow runs # noqa: E501 + + :return: The total_count of this ActionTaskResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ActionTaskResponse. + + TotalCount is the total number of workflow runs # noqa: E501 + + :param total_count: The total_count of this ActionTaskResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + @property + def workflow_runs(self): + """Gets the workflow_runs of this ActionTaskResponse. # noqa: E501 + + Entries contains the list of workflow runs # noqa: E501 + + :return: The workflow_runs of this ActionTaskResponse. # noqa: E501 + :rtype: list[ActionTask] + """ + return self._workflow_runs + + @workflow_runs.setter + def workflow_runs(self, workflow_runs): + """Sets the workflow_runs of this ActionTaskResponse. + + Entries contains the list of workflow runs # noqa: E501 + + :param workflow_runs: The workflow_runs of this ActionTaskResponse. # noqa: E501 + :type: list[ActionTask] + """ + + self._workflow_runs = workflow_runs + + 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(ActionTaskResponse, 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, ActionTaskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionTaskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_variable.py b/swagger_client/models/action_variable.py new file mode 100644 index 0000000..a6c22ef --- /dev/null +++ b/swagger_client/models/action_variable.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionVariable(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 = { + 'data': 'str', + 'description': 'str', + 'name': 'str', + 'owner_id': 'int', + 'repo_id': 'int' + } + + attribute_map = { + 'data': 'data', + 'description': 'description', + 'name': 'name', + 'owner_id': 'owner_id', + 'repo_id': 'repo_id' + } + + def __init__(self, data=None, description=None, name=None, owner_id=None, repo_id=None, _configuration=None): # noqa: E501 + """ActionVariable - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data = None + self._description = None + self._name = None + self._owner_id = None + self._repo_id = None + self.discriminator = None + + if data is not None: + self.data = data + if description is not None: + self.description = description + if name is not None: + self.name = name + if owner_id is not None: + self.owner_id = owner_id + if repo_id is not None: + self.repo_id = repo_id + + @property + def data(self): + """Gets the data of this ActionVariable. # noqa: E501 + + the value of the variable # noqa: E501 + + :return: The data of this ActionVariable. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ActionVariable. + + the value of the variable # noqa: E501 + + :param data: The data of this ActionVariable. # noqa: E501 + :type: str + """ + + self._data = data + + @property + def description(self): + """Gets the description of this ActionVariable. # noqa: E501 + + the description of the variable # noqa: E501 + + :return: The description of this ActionVariable. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ActionVariable. + + the description of the variable # noqa: E501 + + :param description: The description of this ActionVariable. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this ActionVariable. # noqa: E501 + + the name of the variable # noqa: E501 + + :return: The name of this ActionVariable. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionVariable. + + the name of the variable # noqa: E501 + + :param name: The name of this ActionVariable. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def owner_id(self): + """Gets the owner_id of this ActionVariable. # noqa: E501 + + the owner to which the variable belongs # noqa: E501 + + :return: The owner_id of this ActionVariable. # noqa: E501 + :rtype: int + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this ActionVariable. + + the owner to which the variable belongs # noqa: E501 + + :param owner_id: The owner_id of this ActionVariable. # noqa: E501 + :type: int + """ + + self._owner_id = owner_id + + @property + def repo_id(self): + """Gets the repo_id of this ActionVariable. # noqa: E501 + + the repository to which the variable belongs # noqa: E501 + + :return: The repo_id of this ActionVariable. # noqa: E501 + :rtype: int + """ + return self._repo_id + + @repo_id.setter + def repo_id(self, repo_id): + """Sets the repo_id of this ActionVariable. + + the repository to which the variable belongs # noqa: E501 + + :param repo_id: The repo_id of this ActionVariable. # noqa: E501 + :type: int + """ + + self._repo_id = repo_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(ActionVariable, 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, ActionVariable): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionVariable): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_workflow.py b/swagger_client/models/action_workflow.py new file mode 100644 index 0000000..43439f6 --- /dev/null +++ b/swagger_client/models/action_workflow.py @@ -0,0 +1,371 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionWorkflow(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 = { + 'badge_url': 'str', + 'created_at': 'datetime', + 'deleted_at': 'datetime', + 'html_url': 'str', + 'id': 'str', + 'name': 'str', + 'path': 'str', + 'state': 'str', + 'updated_at': 'datetime', + 'url': 'str' + } + + attribute_map = { + 'badge_url': 'badge_url', + 'created_at': 'created_at', + 'deleted_at': 'deleted_at', + 'html_url': 'html_url', + 'id': 'id', + 'name': 'name', + 'path': 'path', + 'state': 'state', + 'updated_at': 'updated_at', + 'url': 'url' + } + + def __init__(self, badge_url=None, created_at=None, deleted_at=None, html_url=None, id=None, name=None, path=None, state=None, updated_at=None, url=None, _configuration=None): # noqa: E501 + """ActionWorkflow - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._badge_url = None + self._created_at = None + self._deleted_at = None + self._html_url = None + self._id = None + self._name = None + self._path = None + self._state = None + self._updated_at = None + self._url = None + self.discriminator = None + + if badge_url is not None: + self.badge_url = badge_url + if created_at is not None: + self.created_at = created_at + if deleted_at is not None: + self.deleted_at = deleted_at + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if name is not None: + self.name = name + if path is not None: + self.path = path + if state is not None: + self.state = state + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + + @property + def badge_url(self): + """Gets the badge_url of this ActionWorkflow. # noqa: E501 + + BadgeURL is the URL for the workflow badge # noqa: E501 + + :return: The badge_url of this ActionWorkflow. # noqa: E501 + :rtype: str + """ + return self._badge_url + + @badge_url.setter + def badge_url(self, badge_url): + """Sets the badge_url of this ActionWorkflow. + + BadgeURL is the URL for the workflow badge # noqa: E501 + + :param badge_url: The badge_url of this ActionWorkflow. # noqa: E501 + :type: str + """ + + self._badge_url = badge_url + + @property + def created_at(self): + """Gets the created_at of this ActionWorkflow. # noqa: E501 + + + :return: The created_at of this ActionWorkflow. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ActionWorkflow. + + + :param created_at: The created_at of this ActionWorkflow. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def deleted_at(self): + """Gets the deleted_at of this ActionWorkflow. # noqa: E501 + + + :return: The deleted_at of this ActionWorkflow. # noqa: E501 + :rtype: datetime + """ + return self._deleted_at + + @deleted_at.setter + def deleted_at(self, deleted_at): + """Sets the deleted_at of this ActionWorkflow. + + + :param deleted_at: The deleted_at of this ActionWorkflow. # noqa: E501 + :type: datetime + """ + + self._deleted_at = deleted_at + + @property + def html_url(self): + """Gets the html_url of this ActionWorkflow. # noqa: E501 + + HTMLURL is the web URL for viewing the workflow # noqa: E501 + + :return: The html_url of this ActionWorkflow. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this ActionWorkflow. + + HTMLURL is the web URL for viewing the workflow # noqa: E501 + + :param html_url: The html_url of this ActionWorkflow. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this ActionWorkflow. # noqa: E501 + + ID is the unique identifier for the workflow # noqa: E501 + + :return: The id of this ActionWorkflow. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ActionWorkflow. + + ID is the unique identifier for the workflow # noqa: E501 + + :param id: The id of this ActionWorkflow. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ActionWorkflow. # noqa: E501 + + Name is the name of the workflow # noqa: E501 + + :return: The name of this ActionWorkflow. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionWorkflow. + + Name is the name of the workflow # noqa: E501 + + :param name: The name of this ActionWorkflow. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def path(self): + """Gets the path of this ActionWorkflow. # noqa: E501 + + Path is the file path of the workflow # noqa: E501 + + :return: The path of this ActionWorkflow. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this ActionWorkflow. + + Path is the file path of the workflow # noqa: E501 + + :param path: The path of this ActionWorkflow. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def state(self): + """Gets the state of this ActionWorkflow. # noqa: E501 + + State indicates if the workflow is active or disabled # noqa: E501 + + :return: The state of this ActionWorkflow. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this ActionWorkflow. + + State indicates if the workflow is active or disabled # noqa: E501 + + :param state: The state of this ActionWorkflow. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def updated_at(self): + """Gets the updated_at of this ActionWorkflow. # noqa: E501 + + + :return: The updated_at of this ActionWorkflow. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this ActionWorkflow. + + + :param updated_at: The updated_at of this ActionWorkflow. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this ActionWorkflow. # noqa: E501 + + URL is the API URL for this workflow # noqa: E501 + + :return: The url of this ActionWorkflow. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ActionWorkflow. + + URL is the API URL for this workflow # noqa: E501 + + :param url: The url of this ActionWorkflow. # 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(ActionWorkflow, 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, ActionWorkflow): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionWorkflow): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_workflow_job.py b/swagger_client/models/action_workflow_job.py new file mode 100644 index 0000000..abda8c1 --- /dev/null +++ b/swagger_client/models/action_workflow_job.py @@ -0,0 +1,565 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionWorkflowJob(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 = { + 'completed_at': 'datetime', + 'conclusion': 'str', + 'created_at': 'datetime', + 'head_branch': 'str', + 'head_sha': 'str', + 'html_url': 'str', + 'id': 'int', + 'labels': 'list[str]', + 'name': 'str', + 'run_attempt': 'int', + 'run_id': 'int', + 'run_url': 'str', + 'runner_id': 'int', + 'runner_name': 'str', + 'started_at': 'datetime', + 'status': 'str', + 'steps': 'list[ActionWorkflowStep]', + 'url': 'str' + } + + attribute_map = { + 'completed_at': 'completed_at', + 'conclusion': 'conclusion', + 'created_at': 'created_at', + 'head_branch': 'head_branch', + 'head_sha': 'head_sha', + 'html_url': 'html_url', + 'id': 'id', + 'labels': 'labels', + 'name': 'name', + 'run_attempt': 'run_attempt', + 'run_id': 'run_id', + 'run_url': 'run_url', + 'runner_id': 'runner_id', + 'runner_name': 'runner_name', + 'started_at': 'started_at', + 'status': 'status', + 'steps': 'steps', + 'url': 'url' + } + + def __init__(self, completed_at=None, conclusion=None, created_at=None, head_branch=None, head_sha=None, html_url=None, id=None, labels=None, name=None, run_attempt=None, run_id=None, run_url=None, runner_id=None, runner_name=None, started_at=None, status=None, steps=None, url=None, _configuration=None): # noqa: E501 + """ActionWorkflowJob - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._completed_at = None + self._conclusion = None + self._created_at = None + self._head_branch = None + self._head_sha = None + self._html_url = None + self._id = None + self._labels = None + self._name = None + self._run_attempt = None + self._run_id = None + self._run_url = None + self._runner_id = None + self._runner_name = None + self._started_at = None + self._status = None + self._steps = None + self._url = None + self.discriminator = None + + if completed_at is not None: + self.completed_at = completed_at + if conclusion is not None: + self.conclusion = conclusion + if created_at is not None: + self.created_at = created_at + if head_branch is not None: + self.head_branch = head_branch + if head_sha is not None: + self.head_sha = head_sha + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if labels is not None: + self.labels = labels + if name is not None: + self.name = name + if run_attempt is not None: + self.run_attempt = run_attempt + if run_id is not None: + self.run_id = run_id + if run_url is not None: + self.run_url = run_url + if runner_id is not None: + self.runner_id = runner_id + if runner_name is not None: + self.runner_name = runner_name + if started_at is not None: + self.started_at = started_at + if status is not None: + self.status = status + if steps is not None: + self.steps = steps + if url is not None: + self.url = url + + @property + def completed_at(self): + """Gets the completed_at of this ActionWorkflowJob. # noqa: E501 + + + :return: The completed_at of this ActionWorkflowJob. # noqa: E501 + :rtype: datetime + """ + return self._completed_at + + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this ActionWorkflowJob. + + + :param completed_at: The completed_at of this ActionWorkflowJob. # noqa: E501 + :type: datetime + """ + + self._completed_at = completed_at + + @property + def conclusion(self): + """Gets the conclusion of this ActionWorkflowJob. # noqa: E501 + + + :return: The conclusion of this ActionWorkflowJob. # noqa: E501 + :rtype: str + """ + return self._conclusion + + @conclusion.setter + def conclusion(self, conclusion): + """Sets the conclusion of this ActionWorkflowJob. + + + :param conclusion: The conclusion of this ActionWorkflowJob. # noqa: E501 + :type: str + """ + + self._conclusion = conclusion + + @property + def created_at(self): + """Gets the created_at of this ActionWorkflowJob. # noqa: E501 + + + :return: The created_at of this ActionWorkflowJob. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ActionWorkflowJob. + + + :param created_at: The created_at of this ActionWorkflowJob. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def head_branch(self): + """Gets the head_branch of this ActionWorkflowJob. # noqa: E501 + + + :return: The head_branch of this ActionWorkflowJob. # noqa: E501 + :rtype: str + """ + return self._head_branch + + @head_branch.setter + def head_branch(self, head_branch): + """Sets the head_branch of this ActionWorkflowJob. + + + :param head_branch: The head_branch of this ActionWorkflowJob. # noqa: E501 + :type: str + """ + + self._head_branch = head_branch + + @property + def head_sha(self): + """Gets the head_sha of this ActionWorkflowJob. # noqa: E501 + + + :return: The head_sha of this ActionWorkflowJob. # noqa: E501 + :rtype: str + """ + return self._head_sha + + @head_sha.setter + def head_sha(self, head_sha): + """Sets the head_sha of this ActionWorkflowJob. + + + :param head_sha: The head_sha of this ActionWorkflowJob. # noqa: E501 + :type: str + """ + + self._head_sha = head_sha + + @property + def html_url(self): + """Gets the html_url of this ActionWorkflowJob. # noqa: E501 + + + :return: The html_url of this ActionWorkflowJob. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this ActionWorkflowJob. + + + :param html_url: The html_url of this ActionWorkflowJob. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this ActionWorkflowJob. # noqa: E501 + + + :return: The id of this ActionWorkflowJob. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ActionWorkflowJob. + + + :param id: The id of this ActionWorkflowJob. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def labels(self): + """Gets the labels of this ActionWorkflowJob. # noqa: E501 + + + :return: The labels of this ActionWorkflowJob. # noqa: E501 + :rtype: list[str] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this ActionWorkflowJob. + + + :param labels: The labels of this ActionWorkflowJob. # noqa: E501 + :type: list[str] + """ + + self._labels = labels + + @property + def name(self): + """Gets the name of this ActionWorkflowJob. # noqa: E501 + + + :return: The name of this ActionWorkflowJob. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionWorkflowJob. + + + :param name: The name of this ActionWorkflowJob. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def run_attempt(self): + """Gets the run_attempt of this ActionWorkflowJob. # noqa: E501 + + + :return: The run_attempt of this ActionWorkflowJob. # noqa: E501 + :rtype: int + """ + return self._run_attempt + + @run_attempt.setter + def run_attempt(self, run_attempt): + """Sets the run_attempt of this ActionWorkflowJob. + + + :param run_attempt: The run_attempt of this ActionWorkflowJob. # noqa: E501 + :type: int + """ + + self._run_attempt = run_attempt + + @property + def run_id(self): + """Gets the run_id of this ActionWorkflowJob. # noqa: E501 + + + :return: The run_id of this ActionWorkflowJob. # noqa: E501 + :rtype: int + """ + return self._run_id + + @run_id.setter + def run_id(self, run_id): + """Sets the run_id of this ActionWorkflowJob. + + + :param run_id: The run_id of this ActionWorkflowJob. # noqa: E501 + :type: int + """ + + self._run_id = run_id + + @property + def run_url(self): + """Gets the run_url of this ActionWorkflowJob. # noqa: E501 + + + :return: The run_url of this ActionWorkflowJob. # noqa: E501 + :rtype: str + """ + return self._run_url + + @run_url.setter + def run_url(self, run_url): + """Sets the run_url of this ActionWorkflowJob. + + + :param run_url: The run_url of this ActionWorkflowJob. # noqa: E501 + :type: str + """ + + self._run_url = run_url + + @property + def runner_id(self): + """Gets the runner_id of this ActionWorkflowJob. # noqa: E501 + + + :return: The runner_id of this ActionWorkflowJob. # noqa: E501 + :rtype: int + """ + return self._runner_id + + @runner_id.setter + def runner_id(self, runner_id): + """Sets the runner_id of this ActionWorkflowJob. + + + :param runner_id: The runner_id of this ActionWorkflowJob. # noqa: E501 + :type: int + """ + + self._runner_id = runner_id + + @property + def runner_name(self): + """Gets the runner_name of this ActionWorkflowJob. # noqa: E501 + + + :return: The runner_name of this ActionWorkflowJob. # noqa: E501 + :rtype: str + """ + return self._runner_name + + @runner_name.setter + def runner_name(self, runner_name): + """Sets the runner_name of this ActionWorkflowJob. + + + :param runner_name: The runner_name of this ActionWorkflowJob. # noqa: E501 + :type: str + """ + + self._runner_name = runner_name + + @property + def started_at(self): + """Gets the started_at of this ActionWorkflowJob. # noqa: E501 + + + :return: The started_at of this ActionWorkflowJob. # noqa: E501 + :rtype: datetime + """ + return self._started_at + + @started_at.setter + def started_at(self, started_at): + """Sets the started_at of this ActionWorkflowJob. + + + :param started_at: The started_at of this ActionWorkflowJob. # noqa: E501 + :type: datetime + """ + + self._started_at = started_at + + @property + def status(self): + """Gets the status of this ActionWorkflowJob. # noqa: E501 + + + :return: The status of this ActionWorkflowJob. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ActionWorkflowJob. + + + :param status: The status of this ActionWorkflowJob. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def steps(self): + """Gets the steps of this ActionWorkflowJob. # noqa: E501 + + + :return: The steps of this ActionWorkflowJob. # noqa: E501 + :rtype: list[ActionWorkflowStep] + """ + return self._steps + + @steps.setter + def steps(self, steps): + """Sets the steps of this ActionWorkflowJob. + + + :param steps: The steps of this ActionWorkflowJob. # noqa: E501 + :type: list[ActionWorkflowStep] + """ + + self._steps = steps + + @property + def url(self): + """Gets the url of this ActionWorkflowJob. # noqa: E501 + + + :return: The url of this ActionWorkflowJob. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ActionWorkflowJob. + + + :param url: The url of this ActionWorkflowJob. # 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(ActionWorkflowJob, 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, ActionWorkflowJob): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionWorkflowJob): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_workflow_jobs_response.py b/swagger_client/models/action_workflow_jobs_response.py new file mode 100644 index 0000000..3469bcc --- /dev/null +++ b/swagger_client/models/action_workflow_jobs_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionWorkflowJobsResponse(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 = { + 'jobs': 'list[ActionWorkflowJob]', + 'total_count': 'int' + } + + attribute_map = { + 'jobs': 'jobs', + 'total_count': 'total_count' + } + + def __init__(self, jobs=None, total_count=None, _configuration=None): # noqa: E501 + """ActionWorkflowJobsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._jobs = None + self._total_count = None + self.discriminator = None + + if jobs is not None: + self.jobs = jobs + if total_count is not None: + self.total_count = total_count + + @property + def jobs(self): + """Gets the jobs of this ActionWorkflowJobsResponse. # noqa: E501 + + + :return: The jobs of this ActionWorkflowJobsResponse. # noqa: E501 + :rtype: list[ActionWorkflowJob] + """ + return self._jobs + + @jobs.setter + def jobs(self, jobs): + """Sets the jobs of this ActionWorkflowJobsResponse. + + + :param jobs: The jobs of this ActionWorkflowJobsResponse. # noqa: E501 + :type: list[ActionWorkflowJob] + """ + + self._jobs = jobs + + @property + def total_count(self): + """Gets the total_count of this ActionWorkflowJobsResponse. # noqa: E501 + + + :return: The total_count of this ActionWorkflowJobsResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ActionWorkflowJobsResponse. + + + :param total_count: The total_count of this ActionWorkflowJobsResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + 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(ActionWorkflowJobsResponse, 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, ActionWorkflowJobsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionWorkflowJobsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_workflow_response.py b/swagger_client/models/action_workflow_response.py new file mode 100644 index 0000000..30d3416 --- /dev/null +++ b/swagger_client/models/action_workflow_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionWorkflowResponse(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 = { + 'total_count': 'int', + 'workflows': 'list[ActionWorkflow]' + } + + attribute_map = { + 'total_count': 'total_count', + 'workflows': 'workflows' + } + + def __init__(self, total_count=None, workflows=None, _configuration=None): # noqa: E501 + """ActionWorkflowResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._total_count = None + self._workflows = None + self.discriminator = None + + if total_count is not None: + self.total_count = total_count + if workflows is not None: + self.workflows = workflows + + @property + def total_count(self): + """Gets the total_count of this ActionWorkflowResponse. # noqa: E501 + + + :return: The total_count of this ActionWorkflowResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ActionWorkflowResponse. + + + :param total_count: The total_count of this ActionWorkflowResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + @property + def workflows(self): + """Gets the workflows of this ActionWorkflowResponse. # noqa: E501 + + + :return: The workflows of this ActionWorkflowResponse. # noqa: E501 + :rtype: list[ActionWorkflow] + """ + return self._workflows + + @workflows.setter + def workflows(self, workflows): + """Sets the workflows of this ActionWorkflowResponse. + + + :param workflows: The workflows of this ActionWorkflowResponse. # noqa: E501 + :type: list[ActionWorkflow] + """ + + self._workflows = workflows + + 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(ActionWorkflowResponse, 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, ActionWorkflowResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionWorkflowResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_workflow_run.py b/swagger_client/models/action_workflow_run.py new file mode 100644 index 0000000..847e93c --- /dev/null +++ b/swagger_client/models/action_workflow_run.py @@ -0,0 +1,591 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionWorkflowRun(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 = { + 'actor': 'User', + 'completed_at': 'datetime', + 'conclusion': 'str', + 'display_title': 'str', + 'event': 'str', + 'head_branch': 'str', + 'head_repository': 'Repository', + 'head_sha': 'str', + 'html_url': 'str', + 'id': 'int', + 'path': 'str', + 'repository': 'Repository', + 'repository_id': 'int', + 'run_attempt': 'int', + 'run_number': 'int', + 'started_at': 'datetime', + 'status': 'str', + 'trigger_actor': 'User', + 'url': 'str' + } + + attribute_map = { + 'actor': 'actor', + 'completed_at': 'completed_at', + 'conclusion': 'conclusion', + 'display_title': 'display_title', + 'event': 'event', + 'head_branch': 'head_branch', + 'head_repository': 'head_repository', + 'head_sha': 'head_sha', + 'html_url': 'html_url', + 'id': 'id', + 'path': 'path', + 'repository': 'repository', + 'repository_id': 'repository_id', + 'run_attempt': 'run_attempt', + 'run_number': 'run_number', + 'started_at': 'started_at', + 'status': 'status', + 'trigger_actor': 'trigger_actor', + 'url': 'url' + } + + def __init__(self, actor=None, completed_at=None, conclusion=None, display_title=None, event=None, head_branch=None, head_repository=None, head_sha=None, html_url=None, id=None, path=None, repository=None, repository_id=None, run_attempt=None, run_number=None, started_at=None, status=None, trigger_actor=None, url=None, _configuration=None): # noqa: E501 + """ActionWorkflowRun - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._actor = None + self._completed_at = None + self._conclusion = None + self._display_title = None + self._event = None + self._head_branch = None + self._head_repository = None + self._head_sha = None + self._html_url = None + self._id = None + self._path = None + self._repository = None + self._repository_id = None + self._run_attempt = None + self._run_number = None + self._started_at = None + self._status = None + self._trigger_actor = None + self._url = None + self.discriminator = None + + if actor is not None: + self.actor = actor + if completed_at is not None: + self.completed_at = completed_at + if conclusion is not None: + self.conclusion = conclusion + if display_title is not None: + self.display_title = display_title + if event is not None: + self.event = event + if head_branch is not None: + self.head_branch = head_branch + if head_repository is not None: + self.head_repository = head_repository + if head_sha is not None: + self.head_sha = head_sha + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if path is not None: + self.path = path + if repository is not None: + self.repository = repository + if repository_id is not None: + self.repository_id = repository_id + if run_attempt is not None: + self.run_attempt = run_attempt + if run_number is not None: + self.run_number = run_number + if started_at is not None: + self.started_at = started_at + if status is not None: + self.status = status + if trigger_actor is not None: + self.trigger_actor = trigger_actor + if url is not None: + self.url = url + + @property + def actor(self): + """Gets the actor of this ActionWorkflowRun. # noqa: E501 + + + :return: The actor of this ActionWorkflowRun. # noqa: E501 + :rtype: User + """ + return self._actor + + @actor.setter + def actor(self, actor): + """Sets the actor of this ActionWorkflowRun. + + + :param actor: The actor of this ActionWorkflowRun. # noqa: E501 + :type: User + """ + + self._actor = actor + + @property + def completed_at(self): + """Gets the completed_at of this ActionWorkflowRun. # noqa: E501 + + + :return: The completed_at of this ActionWorkflowRun. # noqa: E501 + :rtype: datetime + """ + return self._completed_at + + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this ActionWorkflowRun. + + + :param completed_at: The completed_at of this ActionWorkflowRun. # noqa: E501 + :type: datetime + """ + + self._completed_at = completed_at + + @property + def conclusion(self): + """Gets the conclusion of this ActionWorkflowRun. # noqa: E501 + + + :return: The conclusion of this ActionWorkflowRun. # noqa: E501 + :rtype: str + """ + return self._conclusion + + @conclusion.setter + def conclusion(self, conclusion): + """Sets the conclusion of this ActionWorkflowRun. + + + :param conclusion: The conclusion of this ActionWorkflowRun. # noqa: E501 + :type: str + """ + + self._conclusion = conclusion + + @property + def display_title(self): + """Gets the display_title of this ActionWorkflowRun. # noqa: E501 + + + :return: The display_title of this ActionWorkflowRun. # noqa: E501 + :rtype: str + """ + return self._display_title + + @display_title.setter + def display_title(self, display_title): + """Sets the display_title of this ActionWorkflowRun. + + + :param display_title: The display_title of this ActionWorkflowRun. # noqa: E501 + :type: str + """ + + self._display_title = display_title + + @property + def event(self): + """Gets the event of this ActionWorkflowRun. # noqa: E501 + + + :return: The event of this ActionWorkflowRun. # noqa: E501 + :rtype: str + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this ActionWorkflowRun. + + + :param event: The event of this ActionWorkflowRun. # noqa: E501 + :type: str + """ + + self._event = event + + @property + def head_branch(self): + """Gets the head_branch of this ActionWorkflowRun. # noqa: E501 + + + :return: The head_branch of this ActionWorkflowRun. # noqa: E501 + :rtype: str + """ + return self._head_branch + + @head_branch.setter + def head_branch(self, head_branch): + """Sets the head_branch of this ActionWorkflowRun. + + + :param head_branch: The head_branch of this ActionWorkflowRun. # noqa: E501 + :type: str + """ + + self._head_branch = head_branch + + @property + def head_repository(self): + """Gets the head_repository of this ActionWorkflowRun. # noqa: E501 + + + :return: The head_repository of this ActionWorkflowRun. # noqa: E501 + :rtype: Repository + """ + return self._head_repository + + @head_repository.setter + def head_repository(self, head_repository): + """Sets the head_repository of this ActionWorkflowRun. + + + :param head_repository: The head_repository of this ActionWorkflowRun. # noqa: E501 + :type: Repository + """ + + self._head_repository = head_repository + + @property + def head_sha(self): + """Gets the head_sha of this ActionWorkflowRun. # noqa: E501 + + + :return: The head_sha of this ActionWorkflowRun. # noqa: E501 + :rtype: str + """ + return self._head_sha + + @head_sha.setter + def head_sha(self, head_sha): + """Sets the head_sha of this ActionWorkflowRun. + + + :param head_sha: The head_sha of this ActionWorkflowRun. # noqa: E501 + :type: str + """ + + self._head_sha = head_sha + + @property + def html_url(self): + """Gets the html_url of this ActionWorkflowRun. # noqa: E501 + + + :return: The html_url of this ActionWorkflowRun. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this ActionWorkflowRun. + + + :param html_url: The html_url of this ActionWorkflowRun. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this ActionWorkflowRun. # noqa: E501 + + + :return: The id of this ActionWorkflowRun. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ActionWorkflowRun. + + + :param id: The id of this ActionWorkflowRun. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def path(self): + """Gets the path of this ActionWorkflowRun. # noqa: E501 + + + :return: The path of this ActionWorkflowRun. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this ActionWorkflowRun. + + + :param path: The path of this ActionWorkflowRun. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def repository(self): + """Gets the repository of this ActionWorkflowRun. # noqa: E501 + + + :return: The repository of this ActionWorkflowRun. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this ActionWorkflowRun. + + + :param repository: The repository of this ActionWorkflowRun. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def repository_id(self): + """Gets the repository_id of this ActionWorkflowRun. # noqa: E501 + + + :return: The repository_id of this ActionWorkflowRun. # noqa: E501 + :rtype: int + """ + return self._repository_id + + @repository_id.setter + def repository_id(self, repository_id): + """Sets the repository_id of this ActionWorkflowRun. + + + :param repository_id: The repository_id of this ActionWorkflowRun. # noqa: E501 + :type: int + """ + + self._repository_id = repository_id + + @property + def run_attempt(self): + """Gets the run_attempt of this ActionWorkflowRun. # noqa: E501 + + + :return: The run_attempt of this ActionWorkflowRun. # noqa: E501 + :rtype: int + """ + return self._run_attempt + + @run_attempt.setter + def run_attempt(self, run_attempt): + """Sets the run_attempt of this ActionWorkflowRun. + + + :param run_attempt: The run_attempt of this ActionWorkflowRun. # noqa: E501 + :type: int + """ + + self._run_attempt = run_attempt + + @property + def run_number(self): + """Gets the run_number of this ActionWorkflowRun. # noqa: E501 + + + :return: The run_number of this ActionWorkflowRun. # noqa: E501 + :rtype: int + """ + return self._run_number + + @run_number.setter + def run_number(self, run_number): + """Sets the run_number of this ActionWorkflowRun. + + + :param run_number: The run_number of this ActionWorkflowRun. # noqa: E501 + :type: int + """ + + self._run_number = run_number + + @property + def started_at(self): + """Gets the started_at of this ActionWorkflowRun. # noqa: E501 + + + :return: The started_at of this ActionWorkflowRun. # noqa: E501 + :rtype: datetime + """ + return self._started_at + + @started_at.setter + def started_at(self, started_at): + """Sets the started_at of this ActionWorkflowRun. + + + :param started_at: The started_at of this ActionWorkflowRun. # noqa: E501 + :type: datetime + """ + + self._started_at = started_at + + @property + def status(self): + """Gets the status of this ActionWorkflowRun. # noqa: E501 + + + :return: The status of this ActionWorkflowRun. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ActionWorkflowRun. + + + :param status: The status of this ActionWorkflowRun. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def trigger_actor(self): + """Gets the trigger_actor of this ActionWorkflowRun. # noqa: E501 + + + :return: The trigger_actor of this ActionWorkflowRun. # noqa: E501 + :rtype: User + """ + return self._trigger_actor + + @trigger_actor.setter + def trigger_actor(self, trigger_actor): + """Sets the trigger_actor of this ActionWorkflowRun. + + + :param trigger_actor: The trigger_actor of this ActionWorkflowRun. # noqa: E501 + :type: User + """ + + self._trigger_actor = trigger_actor + + @property + def url(self): + """Gets the url of this ActionWorkflowRun. # noqa: E501 + + + :return: The url of this ActionWorkflowRun. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ActionWorkflowRun. + + + :param url: The url of this ActionWorkflowRun. # 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(ActionWorkflowRun, 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, ActionWorkflowRun): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionWorkflowRun): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_workflow_runs_response.py b/swagger_client/models/action_workflow_runs_response.py new file mode 100644 index 0000000..ac6bce9 --- /dev/null +++ b/swagger_client/models/action_workflow_runs_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionWorkflowRunsResponse(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 = { + 'total_count': 'int', + 'workflow_runs': 'list[ActionWorkflowRun]' + } + + attribute_map = { + 'total_count': 'total_count', + 'workflow_runs': 'workflow_runs' + } + + def __init__(self, total_count=None, workflow_runs=None, _configuration=None): # noqa: E501 + """ActionWorkflowRunsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._total_count = None + self._workflow_runs = None + self.discriminator = None + + if total_count is not None: + self.total_count = total_count + if workflow_runs is not None: + self.workflow_runs = workflow_runs + + @property + def total_count(self): + """Gets the total_count of this ActionWorkflowRunsResponse. # noqa: E501 + + + :return: The total_count of this ActionWorkflowRunsResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ActionWorkflowRunsResponse. + + + :param total_count: The total_count of this ActionWorkflowRunsResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + @property + def workflow_runs(self): + """Gets the workflow_runs of this ActionWorkflowRunsResponse. # noqa: E501 + + + :return: The workflow_runs of this ActionWorkflowRunsResponse. # noqa: E501 + :rtype: list[ActionWorkflowRun] + """ + return self._workflow_runs + + @workflow_runs.setter + def workflow_runs(self, workflow_runs): + """Sets the workflow_runs of this ActionWorkflowRunsResponse. + + + :param workflow_runs: The workflow_runs of this ActionWorkflowRunsResponse. # noqa: E501 + :type: list[ActionWorkflowRun] + """ + + self._workflow_runs = workflow_runs + + 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(ActionWorkflowRunsResponse, 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, ActionWorkflowRunsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionWorkflowRunsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/action_workflow_step.py b/swagger_client/models/action_workflow_step.py new file mode 100644 index 0000000..28291de --- /dev/null +++ b/swagger_client/models/action_workflow_step.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActionWorkflowStep(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 = { + 'completed_at': 'datetime', + 'conclusion': 'str', + 'name': 'str', + 'number': 'int', + 'started_at': 'datetime', + 'status': 'str' + } + + attribute_map = { + 'completed_at': 'completed_at', + 'conclusion': 'conclusion', + 'name': 'name', + 'number': 'number', + 'started_at': 'started_at', + 'status': 'status' + } + + def __init__(self, completed_at=None, conclusion=None, name=None, number=None, started_at=None, status=None, _configuration=None): # noqa: E501 + """ActionWorkflowStep - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._completed_at = None + self._conclusion = None + self._name = None + self._number = None + self._started_at = None + self._status = None + self.discriminator = None + + if completed_at is not None: + self.completed_at = completed_at + if conclusion is not None: + self.conclusion = conclusion + if name is not None: + self.name = name + if number is not None: + self.number = number + if started_at is not None: + self.started_at = started_at + if status is not None: + self.status = status + + @property + def completed_at(self): + """Gets the completed_at of this ActionWorkflowStep. # noqa: E501 + + + :return: The completed_at of this ActionWorkflowStep. # noqa: E501 + :rtype: datetime + """ + return self._completed_at + + @completed_at.setter + def completed_at(self, completed_at): + """Sets the completed_at of this ActionWorkflowStep. + + + :param completed_at: The completed_at of this ActionWorkflowStep. # noqa: E501 + :type: datetime + """ + + self._completed_at = completed_at + + @property + def conclusion(self): + """Gets the conclusion of this ActionWorkflowStep. # noqa: E501 + + + :return: The conclusion of this ActionWorkflowStep. # noqa: E501 + :rtype: str + """ + return self._conclusion + + @conclusion.setter + def conclusion(self, conclusion): + """Sets the conclusion of this ActionWorkflowStep. + + + :param conclusion: The conclusion of this ActionWorkflowStep. # noqa: E501 + :type: str + """ + + self._conclusion = conclusion + + @property + def name(self): + """Gets the name of this ActionWorkflowStep. # noqa: E501 + + + :return: The name of this ActionWorkflowStep. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ActionWorkflowStep. + + + :param name: The name of this ActionWorkflowStep. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def number(self): + """Gets the number of this ActionWorkflowStep. # noqa: E501 + + + :return: The number of this ActionWorkflowStep. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this ActionWorkflowStep. + + + :param number: The number of this ActionWorkflowStep. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def started_at(self): + """Gets the started_at of this ActionWorkflowStep. # noqa: E501 + + + :return: The started_at of this ActionWorkflowStep. # noqa: E501 + :rtype: datetime + """ + return self._started_at + + @started_at.setter + def started_at(self, started_at): + """Sets the started_at of this ActionWorkflowStep. + + + :param started_at: The started_at of this ActionWorkflowStep. # noqa: E501 + :type: datetime + """ + + self._started_at = started_at + + @property + def status(self): + """Gets the status of this ActionWorkflowStep. # noqa: E501 + + + :return: The status of this ActionWorkflowStep. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ActionWorkflowStep. + + + :param status: The status of this ActionWorkflowStep. # noqa: E501 + :type: str + """ + + self._status = status + + 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(ActionWorkflowStep, 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, ActionWorkflowStep): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActionWorkflowStep): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/activity.py b/swagger_client/models/activity.py new file mode 100644 index 0000000..a0c0ddb --- /dev/null +++ b/swagger_client/models/activity.py @@ -0,0 +1,462 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Activity(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 = { + 'act_user': 'User', + 'act_user_id': 'int', + 'comment': 'Comment', + 'comment_id': 'int', + 'content': 'str', + 'created': 'datetime', + 'id': 'int', + 'is_private': 'bool', + 'op_type': 'str', + 'ref_name': 'str', + 'repo': 'Repository', + 'repo_id': 'int', + 'user_id': 'int' + } + + attribute_map = { + 'act_user': 'act_user', + 'act_user_id': 'act_user_id', + 'comment': 'comment', + 'comment_id': 'comment_id', + 'content': 'content', + 'created': 'created', + 'id': 'id', + 'is_private': 'is_private', + 'op_type': 'op_type', + 'ref_name': 'ref_name', + 'repo': 'repo', + 'repo_id': 'repo_id', + 'user_id': 'user_id' + } + + def __init__(self, act_user=None, act_user_id=None, comment=None, comment_id=None, content=None, created=None, id=None, is_private=None, op_type=None, ref_name=None, repo=None, repo_id=None, user_id=None, _configuration=None): # noqa: E501 + """Activity - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._act_user = None + self._act_user_id = None + self._comment = None + self._comment_id = None + self._content = None + self._created = None + self._id = None + self._is_private = None + self._op_type = None + self._ref_name = None + self._repo = None + self._repo_id = None + self._user_id = None + self.discriminator = None + + if act_user is not None: + self.act_user = act_user + if act_user_id is not None: + self.act_user_id = act_user_id + if comment is not None: + self.comment = comment + if comment_id is not None: + self.comment_id = comment_id + if content is not None: + self.content = content + if created is not None: + self.created = created + if id is not None: + self.id = id + if is_private is not None: + self.is_private = is_private + if op_type is not None: + self.op_type = op_type + if ref_name is not None: + self.ref_name = ref_name + if repo is not None: + self.repo = repo + if repo_id is not None: + self.repo_id = repo_id + if user_id is not None: + self.user_id = user_id + + @property + def act_user(self): + """Gets the act_user of this Activity. # noqa: E501 + + + :return: The act_user of this Activity. # noqa: E501 + :rtype: User + """ + return self._act_user + + @act_user.setter + def act_user(self, act_user): + """Sets the act_user of this Activity. + + + :param act_user: The act_user of this Activity. # noqa: E501 + :type: User + """ + + self._act_user = act_user + + @property + def act_user_id(self): + """Gets the act_user_id of this Activity. # noqa: E501 + + The ID of the user who performed the action # noqa: E501 + + :return: The act_user_id of this Activity. # noqa: E501 + :rtype: int + """ + return self._act_user_id + + @act_user_id.setter + def act_user_id(self, act_user_id): + """Sets the act_user_id of this Activity. + + The ID of the user who performed the action # noqa: E501 + + :param act_user_id: The act_user_id of this Activity. # noqa: E501 + :type: int + """ + + self._act_user_id = act_user_id + + @property + def comment(self): + """Gets the comment of this Activity. # noqa: E501 + + + :return: The comment of this Activity. # noqa: E501 + :rtype: Comment + """ + return self._comment + + @comment.setter + def comment(self, comment): + """Sets the comment of this Activity. + + + :param comment: The comment of this Activity. # noqa: E501 + :type: Comment + """ + + self._comment = comment + + @property + def comment_id(self): + """Gets the comment_id of this Activity. # noqa: E501 + + The ID of the comment associated with the activity (if applicable) # noqa: E501 + + :return: The comment_id of this Activity. # noqa: E501 + :rtype: int + """ + return self._comment_id + + @comment_id.setter + def comment_id(self, comment_id): + """Sets the comment_id of this Activity. + + The ID of the comment associated with the activity (if applicable) # noqa: E501 + + :param comment_id: The comment_id of this Activity. # noqa: E501 + :type: int + """ + + self._comment_id = comment_id + + @property + def content(self): + """Gets the content of this Activity. # noqa: E501 + + Additional content or details about the activity # noqa: E501 + + :return: The content of this Activity. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this Activity. + + Additional content or details about the activity # noqa: E501 + + :param content: The content of this Activity. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def created(self): + """Gets the created of this Activity. # noqa: E501 + + The date and time when the activity occurred # noqa: E501 + + :return: The created of this Activity. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Activity. + + The date and time when the activity occurred # noqa: E501 + + :param created: The created of this Activity. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this Activity. # noqa: E501 + + The unique identifier of the activity # noqa: E501 + + :return: The id of this Activity. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Activity. + + The unique identifier of the activity # noqa: E501 + + :param id: The id of this Activity. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def is_private(self): + """Gets the is_private of this Activity. # noqa: E501 + + Whether this activity is from a private repository # noqa: E501 + + :return: The is_private of this Activity. # noqa: E501 + :rtype: bool + """ + return self._is_private + + @is_private.setter + def is_private(self, is_private): + """Sets the is_private of this Activity. + + Whether this activity is from a private repository # noqa: E501 + + :param is_private: The is_private of this Activity. # noqa: E501 + :type: bool + """ + + self._is_private = is_private + + @property + def op_type(self): + """Gets the op_type of this Activity. # noqa: E501 + + the type of action # noqa: E501 + + :return: The op_type of this Activity. # noqa: E501 + :rtype: str + """ + return self._op_type + + @op_type.setter + def op_type(self, op_type): + """Sets the op_type of this Activity. + + the type of action # noqa: E501 + + :param op_type: The op_type of this Activity. # noqa: E501 + :type: str + """ + allowed_values = ["create_repo", "rename_repo", "star_repo", "watch_repo", "commit_repo", "create_issue", "create_pull_request", "transfer_repo", "push_tag", "comment_issue", "merge_pull_request", "close_issue", "reopen_issue", "close_pull_request", "reopen_pull_request", "delete_tag", "delete_branch", "mirror_sync_push", "mirror_sync_create", "mirror_sync_delete", "approve_pull_request", "reject_pull_request", "comment_pull", "publish_release", "pull_review_dismissed", "pull_request_ready_for_review", "auto_merge_pull_request"] # noqa: E501 + if (self._configuration.client_side_validation and + op_type not in allowed_values): + raise ValueError( + "Invalid value for `op_type` ({0}), must be one of {1}" # noqa: E501 + .format(op_type, allowed_values) + ) + + self._op_type = op_type + + @property + def ref_name(self): + """Gets the ref_name of this Activity. # noqa: E501 + + The name of the git reference (branch/tag) associated with the activity # noqa: E501 + + :return: The ref_name of this Activity. # noqa: E501 + :rtype: str + """ + return self._ref_name + + @ref_name.setter + def ref_name(self, ref_name): + """Sets the ref_name of this Activity. + + The name of the git reference (branch/tag) associated with the activity # noqa: E501 + + :param ref_name: The ref_name of this Activity. # noqa: E501 + :type: str + """ + + self._ref_name = ref_name + + @property + def repo(self): + """Gets the repo of this Activity. # noqa: E501 + + + :return: The repo of this Activity. # noqa: E501 + :rtype: Repository + """ + return self._repo + + @repo.setter + def repo(self, repo): + """Sets the repo of this Activity. + + + :param repo: The repo of this Activity. # noqa: E501 + :type: Repository + """ + + self._repo = repo + + @property + def repo_id(self): + """Gets the repo_id of this Activity. # noqa: E501 + + The ID of the repository associated with the activity # noqa: E501 + + :return: The repo_id of this Activity. # noqa: E501 + :rtype: int + """ + return self._repo_id + + @repo_id.setter + def repo_id(self, repo_id): + """Sets the repo_id of this Activity. + + The ID of the repository associated with the activity # noqa: E501 + + :param repo_id: The repo_id of this Activity. # noqa: E501 + :type: int + """ + + self._repo_id = repo_id + + @property + def user_id(self): + """Gets the user_id of this Activity. # noqa: E501 + + The ID of the user who receives/sees this activity # noqa: E501 + + :return: The user_id of this Activity. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Activity. + + The ID of the user who receives/sees this activity # noqa: E501 + + :param user_id: The user_id of this Activity. # noqa: E501 + :type: int + """ + + self._user_id = 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(Activity, 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, Activity): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Activity): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/activity_pub.py b/swagger_client/models/activity_pub.py new file mode 100644 index 0000000..4d52971 --- /dev/null +++ b/swagger_client/models/activity_pub.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ActivityPub(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 = { + 'context': 'str' + } + + attribute_map = { + 'context': '@context' + } + + def __init__(self, context=None, _configuration=None): # noqa: E501 + """ActivityPub - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._context = None + self.discriminator = None + + if context is not None: + self.context = context + + @property + def context(self): + """Gets the context of this ActivityPub. # noqa: E501 + + Context defines the JSON-LD context for ActivityPub # noqa: E501 + + :return: The context of this ActivityPub. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this ActivityPub. + + Context defines the JSON-LD context for ActivityPub # noqa: E501 + + :param context: The context of this ActivityPub. # noqa: E501 + :type: str + """ + + self._context = context + + 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(ActivityPub, 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, ActivityPub): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActivityPub): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/add_collaborator_option.py b/swagger_client/models/add_collaborator_option.py new file mode 100644 index 0000000..089fc9e --- /dev/null +++ b/swagger_client/models/add_collaborator_option.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class AddCollaboratorOption(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 = { + 'permission': 'str' + } + + attribute_map = { + 'permission': 'permission' + } + + def __init__(self, permission=None, _configuration=None): # noqa: E501 + """AddCollaboratorOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._permission = None + self.discriminator = None + + if permission is not None: + self.permission = permission + + @property + def permission(self): + """Gets the permission of this AddCollaboratorOption. # noqa: E501 + + + :return: The permission of this AddCollaboratorOption. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this AddCollaboratorOption. + + + :param permission: The permission of this AddCollaboratorOption. # noqa: E501 + :type: str + """ + allowed_values = ["read", "write", "admin"] # noqa: E501 + if (self._configuration.client_side_validation and + permission not in allowed_values): + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + 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(AddCollaboratorOption, 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, AddCollaboratorOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AddCollaboratorOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/add_time_option.py b/swagger_client/models/add_time_option.py new file mode 100644 index 0000000..f61481f --- /dev/null +++ b/swagger_client/models/add_time_option.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class AddTimeOption(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 = { + 'created': 'datetime', + 'time': 'int', + 'user_name': 'str' + } + + attribute_map = { + 'created': 'created', + 'time': 'time', + 'user_name': 'user_name' + } + + def __init__(self, created=None, time=None, user_name=None, _configuration=None): # noqa: E501 + """AddTimeOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._time = None + self._user_name = None + self.discriminator = None + + if created is not None: + self.created = created + self.time = time + if user_name is not None: + self.user_name = user_name + + @property + def created(self): + """Gets the created of this AddTimeOption. # noqa: E501 + + + :return: The created of this AddTimeOption. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this AddTimeOption. + + + :param created: The created of this AddTimeOption. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def time(self): + """Gets the time of this AddTimeOption. # noqa: E501 + + time in seconds # noqa: E501 + + :return: The time of this AddTimeOption. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this AddTimeOption. + + time in seconds # noqa: E501 + + :param time: The time of this AddTimeOption. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and time is None: + raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 + + self._time = time + + @property + def user_name(self): + """Gets the user_name of this AddTimeOption. # noqa: E501 + + username of the user who spent the time working on the issue (optional) # noqa: E501 + + :return: The user_name of this AddTimeOption. # noqa: E501 + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this AddTimeOption. + + username of the user who spent the time working on the issue (optional) # noqa: E501 + + :param user_name: The user_name of this AddTimeOption. # noqa: E501 + :type: str + """ + + self._user_name = user_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(AddTimeOption, 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, AddTimeOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AddTimeOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/annotated_tag.py b/swagger_client/models/annotated_tag.py new file mode 100644 index 0000000..7eace37 --- /dev/null +++ b/swagger_client/models/annotated_tag.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class AnnotatedTag(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 = { + 'message': 'str', + 'object': 'AnnotatedTagObject', + 'sha': 'str', + 'tag': 'str', + 'tagger': 'CommitUser', + 'url': 'str', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'message': 'message', + 'object': 'object', + 'sha': 'sha', + 'tag': 'tag', + 'tagger': 'tagger', + 'url': 'url', + 'verification': 'verification' + } + + def __init__(self, message=None, object=None, sha=None, tag=None, tagger=None, url=None, verification=None, _configuration=None): # noqa: E501 + """AnnotatedTag - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._object = None + self._sha = None + self._tag = None + self._tagger = None + self._url = None + self._verification = None + self.discriminator = None + + if message is not None: + self.message = message + if object is not None: + self.object = object + if sha is not None: + self.sha = sha + if tag is not None: + self.tag = tag + if tagger is not None: + self.tagger = tagger + if url is not None: + self.url = url + if verification is not None: + self.verification = verification + + @property + def message(self): + """Gets the message of this AnnotatedTag. # noqa: E501 + + The message associated with the annotated tag # noqa: E501 + + :return: The message of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this AnnotatedTag. + + The message associated with the annotated tag # noqa: E501 + + :param message: The message of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def object(self): + """Gets the object of this AnnotatedTag. # noqa: E501 + + + :return: The object of this AnnotatedTag. # noqa: E501 + :rtype: AnnotatedTagObject + """ + return self._object + + @object.setter + def object(self, object): + """Sets the object of this AnnotatedTag. + + + :param object: The object of this AnnotatedTag. # noqa: E501 + :type: AnnotatedTagObject + """ + + self._object = object + + @property + def sha(self): + """Gets the sha of this AnnotatedTag. # noqa: E501 + + The SHA hash of the annotated tag # noqa: E501 + + :return: The sha of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this AnnotatedTag. + + The SHA hash of the annotated tag # noqa: E501 + + :param sha: The sha of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def tag(self): + """Gets the tag of this AnnotatedTag. # noqa: E501 + + The name of the annotated tag # noqa: E501 + + :return: The tag of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this AnnotatedTag. + + The name of the annotated tag # noqa: E501 + + :param tag: The tag of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._tag = tag + + @property + def tagger(self): + """Gets the tagger of this AnnotatedTag. # noqa: E501 + + + :return: The tagger of this AnnotatedTag. # noqa: E501 + :rtype: CommitUser + """ + return self._tagger + + @tagger.setter + def tagger(self, tagger): + """Sets the tagger of this AnnotatedTag. + + + :param tagger: The tagger of this AnnotatedTag. # noqa: E501 + :type: CommitUser + """ + + self._tagger = tagger + + @property + def url(self): + """Gets the url of this AnnotatedTag. # noqa: E501 + + The URL to access the annotated tag # noqa: E501 + + :return: The url of this AnnotatedTag. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this AnnotatedTag. + + The URL to access the annotated tag # noqa: E501 + + :param url: The url of this AnnotatedTag. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def verification(self): + """Gets the verification of this AnnotatedTag. # noqa: E501 + + + :return: The verification of this AnnotatedTag. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this AnnotatedTag. + + + :param verification: The verification of this AnnotatedTag. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(AnnotatedTag, 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, AnnotatedTag): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AnnotatedTag): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/annotated_tag_object.py b/swagger_client/models/annotated_tag_object.py new file mode 100644 index 0000000..e59c3cf --- /dev/null +++ b/swagger_client/models/annotated_tag_object.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class AnnotatedTagObject(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 = { + 'sha': 'str', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'sha': 'sha', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, sha=None, type=None, url=None, _configuration=None): # noqa: E501 + """AnnotatedTagObject - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._sha = None + self._type = None + self._url = None + self.discriminator = None + + if sha is not None: + self.sha = sha + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def sha(self): + """Gets the sha of this AnnotatedTagObject. # noqa: E501 + + The SHA hash of the tagged object # noqa: E501 + + :return: The sha of this AnnotatedTagObject. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this AnnotatedTagObject. + + The SHA hash of the tagged object # noqa: E501 + + :param sha: The sha of this AnnotatedTagObject. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def type(self): + """Gets the type of this AnnotatedTagObject. # noqa: E501 + + The type of the tagged object (e.g., commit, tree) # noqa: E501 + + :return: The type of this AnnotatedTagObject. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AnnotatedTagObject. + + The type of the tagged object (e.g., commit, tree) # noqa: E501 + + :param type: The type of this AnnotatedTagObject. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this AnnotatedTagObject. # noqa: E501 + + The URL to access the tagged object # noqa: E501 + + :return: The url of this AnnotatedTagObject. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this AnnotatedTagObject. + + The URL to access the tagged object # noqa: E501 + + :param url: The url of this AnnotatedTagObject. # 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(AnnotatedTagObject, 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, AnnotatedTagObject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AnnotatedTagObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/api_error.py b/swagger_client/models/api_error.py new file mode 100644 index 0000000..d77aa8f --- /dev/null +++ b/swagger_client/models/api_error.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class APIError(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 = { + 'message': 'str', + 'url': 'str' + } + + attribute_map = { + 'message': 'message', + 'url': 'url' + } + + def __init__(self, message=None, url=None, _configuration=None): # noqa: E501 + """APIError - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._url = None + self.discriminator = None + + if message is not None: + self.message = message + if url is not None: + self.url = url + + @property + def message(self): + """Gets the message of this APIError. # noqa: E501 + + Message contains the error description # noqa: E501 + + :return: The message of this APIError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this APIError. + + Message contains the error description # noqa: E501 + + :param message: The message of this APIError. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def url(self): + """Gets the url of this APIError. # noqa: E501 + + URL contains the documentation URL for this error # noqa: E501 + + :return: The url of this APIError. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this APIError. + + URL contains the documentation URL for this error # noqa: E501 + + :param url: The url of this APIError. # 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(APIError, 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, APIError): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, APIError): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/apply_diff_patch_file_options.py b/swagger_client/models/apply_diff_patch_file_options.py new file mode 100644 index 0000000..acec977 --- /dev/null +++ b/swagger_client/models/apply_diff_patch_file_options.py @@ -0,0 +1,314 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ApplyDiffPatchFileOptions(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 = { + 'author': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'content': 'str', + 'dates': 'CommitDateOptions', + 'message': 'str', + 'new_branch': 'str', + 'signoff': 'bool' + } + + attribute_map = { + 'author': 'author', + 'branch': 'branch', + 'committer': 'committer', + 'content': 'content', + 'dates': 'dates', + 'message': 'message', + 'new_branch': 'new_branch', + 'signoff': 'signoff' + } + + def __init__(self, author=None, branch=None, committer=None, content=None, dates=None, message=None, new_branch=None, signoff=None, _configuration=None): # noqa: E501 + """ApplyDiffPatchFileOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._branch = None + self._committer = None + self._content = None + self._dates = None + self._message = None + self._new_branch = None + self._signoff = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + if committer is not None: + self.committer = committer + self.content = content + if dates is not None: + self.dates = dates + if message is not None: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + if signoff is not None: + self.signoff = signoff + + @property + def author(self): + """Gets the author of this ApplyDiffPatchFileOptions. # noqa: E501 + + + :return: The author of this ApplyDiffPatchFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this ApplyDiffPatchFileOptions. + + + :param author: The author of this ApplyDiffPatchFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this ApplyDiffPatchFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this ApplyDiffPatchFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this ApplyDiffPatchFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this ApplyDiffPatchFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this ApplyDiffPatchFileOptions. # noqa: E501 + + + :return: The committer of this ApplyDiffPatchFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this ApplyDiffPatchFileOptions. + + + :param committer: The committer of this ApplyDiffPatchFileOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def content(self): + """Gets the content of this ApplyDiffPatchFileOptions. # noqa: E501 + + + :return: The content of this ApplyDiffPatchFileOptions. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this ApplyDiffPatchFileOptions. + + + :param content: The content of this ApplyDiffPatchFileOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and content is None: + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def dates(self): + """Gets the dates of this ApplyDiffPatchFileOptions. # noqa: E501 + + + :return: The dates of this ApplyDiffPatchFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this ApplyDiffPatchFileOptions. + + + :param dates: The dates of this ApplyDiffPatchFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + + @property + def message(self): + """Gets the message of this ApplyDiffPatchFileOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this ApplyDiffPatchFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApplyDiffPatchFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this ApplyDiffPatchFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this ApplyDiffPatchFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this ApplyDiffPatchFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this ApplyDiffPatchFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this ApplyDiffPatchFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def signoff(self): + """Gets the signoff of this ApplyDiffPatchFileOptions. # noqa: E501 + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :return: The signoff of this ApplyDiffPatchFileOptions. # noqa: E501 + :rtype: bool + """ + return self._signoff + + @signoff.setter + def signoff(self, signoff): + """Sets the signoff of this ApplyDiffPatchFileOptions. + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :param signoff: The signoff of this ApplyDiffPatchFileOptions. # noqa: E501 + :type: bool + """ + + self._signoff = signoff + + 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(ApplyDiffPatchFileOptions, 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, ApplyDiffPatchFileOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApplyDiffPatchFileOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/attachment.py b/swagger_client/models/attachment.py new file mode 100644 index 0000000..c68fa3e --- /dev/null +++ b/swagger_client/models/attachment.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Attachment(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 = { + 'browser_download_url': 'str', + 'created_at': 'datetime', + 'download_count': 'int', + 'id': 'int', + 'name': 'str', + 'size': 'int', + 'uuid': 'str' + } + + attribute_map = { + 'browser_download_url': 'browser_download_url', + 'created_at': 'created_at', + 'download_count': 'download_count', + 'id': 'id', + 'name': 'name', + 'size': 'size', + 'uuid': 'uuid' + } + + def __init__(self, browser_download_url=None, created_at=None, download_count=None, id=None, name=None, size=None, uuid=None, _configuration=None): # noqa: E501 + """Attachment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._browser_download_url = None + self._created_at = None + self._download_count = None + self._id = None + self._name = None + self._size = None + self._uuid = None + self.discriminator = None + + if browser_download_url is not None: + self.browser_download_url = browser_download_url + if created_at is not None: + self.created_at = created_at + if download_count is not None: + self.download_count = download_count + if id is not None: + self.id = id + if name is not None: + self.name = name + if size is not None: + self.size = size + if uuid is not None: + self.uuid = uuid + + @property + def browser_download_url(self): + """Gets the browser_download_url of this Attachment. # noqa: E501 + + DownloadURL is the URL to download the attachment # noqa: E501 + + :return: The browser_download_url of this Attachment. # noqa: E501 + :rtype: str + """ + return self._browser_download_url + + @browser_download_url.setter + def browser_download_url(self, browser_download_url): + """Sets the browser_download_url of this Attachment. + + DownloadURL is the URL to download the attachment # noqa: E501 + + :param browser_download_url: The browser_download_url of this Attachment. # noqa: E501 + :type: str + """ + + self._browser_download_url = browser_download_url + + @property + def created_at(self): + """Gets the created_at of this Attachment. # noqa: E501 + + + :return: The created_at of this Attachment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Attachment. + + + :param created_at: The created_at of this Attachment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def download_count(self): + """Gets the download_count of this Attachment. # noqa: E501 + + DownloadCount is the number of times the attachment has been downloaded # noqa: E501 + + :return: The download_count of this Attachment. # noqa: E501 + :rtype: int + """ + return self._download_count + + @download_count.setter + def download_count(self, download_count): + """Sets the download_count of this Attachment. + + DownloadCount is the number of times the attachment has been downloaded # noqa: E501 + + :param download_count: The download_count of this Attachment. # noqa: E501 + :type: int + """ + + self._download_count = download_count + + @property + def id(self): + """Gets the id of this Attachment. # noqa: E501 + + ID is the unique identifier for the attachment # noqa: E501 + + :return: The id of this Attachment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Attachment. + + ID is the unique identifier for the attachment # noqa: E501 + + :param id: The id of this Attachment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Attachment. # noqa: E501 + + Name is the filename of the attachment # noqa: E501 + + :return: The name of this Attachment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Attachment. + + Name is the filename of the attachment # noqa: E501 + + :param name: The name of this Attachment. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def size(self): + """Gets the size of this Attachment. # noqa: E501 + + Size is the file size in bytes # noqa: E501 + + :return: The size of this Attachment. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this Attachment. + + Size is the file size in bytes # noqa: E501 + + :param size: The size of this Attachment. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def uuid(self): + """Gets the uuid of this Attachment. # noqa: E501 + + UUID is the unique identifier for the attachment file # noqa: E501 + + :return: The uuid of this Attachment. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this Attachment. + + UUID is the unique identifier for the attachment file # noqa: E501 + + :param uuid: The uuid of this Attachment. # noqa: E501 + :type: str + """ + + self._uuid = uuid + + 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(Attachment, 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, Attachment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Attachment): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/badge.py b/swagger_client/models/badge.py new file mode 100644 index 0000000..d634a84 --- /dev/null +++ b/swagger_client/models/badge.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Badge(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', + 'id': 'int', + 'image_url': 'str', + 'slug': 'str' + } + + attribute_map = { + 'description': 'description', + 'id': 'id', + 'image_url': 'image_url', + 'slug': 'slug' + } + + def __init__(self, description=None, id=None, image_url=None, slug=None, _configuration=None): # noqa: E501 + """Badge - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._id = None + self._image_url = None + self._slug = None + self.discriminator = None + + if description is not None: + self.description = description + if id is not None: + self.id = id + if image_url is not None: + self.image_url = image_url + if slug is not None: + self.slug = slug + + @property + def description(self): + """Gets the description of this Badge. # noqa: E501 + + + :return: The description of this Badge. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Badge. + + + :param description: The description of this Badge. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this Badge. # noqa: E501 + + + :return: The id of this Badge. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Badge. + + + :param id: The id of this Badge. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def image_url(self): + """Gets the image_url of this Badge. # noqa: E501 + + + :return: The image_url of this Badge. # noqa: E501 + :rtype: str + """ + return self._image_url + + @image_url.setter + def image_url(self, image_url): + """Sets the image_url of this Badge. + + + :param image_url: The image_url of this Badge. # noqa: E501 + :type: str + """ + + self._image_url = image_url + + @property + def slug(self): + """Gets the slug of this Badge. # noqa: E501 + + + :return: The slug of this Badge. # noqa: E501 + :rtype: str + """ + return self._slug + + @slug.setter + def slug(self, slug): + """Sets the slug of this Badge. + + + :param slug: The slug of this Badge. # noqa: E501 + :type: str + """ + + self._slug = slug + + 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(Badge, 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, Badge): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Badge): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/branch.py b/swagger_client/models/branch.py new file mode 100644 index 0000000..1694e6f --- /dev/null +++ b/swagger_client/models/branch.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Branch(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 = { + 'commit': 'PayloadCommit', + 'effective_branch_protection_name': 'str', + 'enable_status_check': 'bool', + 'name': 'str', + 'protected': 'bool', + 'required_approvals': 'int', + 'status_check_contexts': 'list[str]', + 'user_can_merge': 'bool', + 'user_can_push': 'bool' + } + + attribute_map = { + 'commit': 'commit', + 'effective_branch_protection_name': 'effective_branch_protection_name', + 'enable_status_check': 'enable_status_check', + 'name': 'name', + 'protected': 'protected', + 'required_approvals': 'required_approvals', + 'status_check_contexts': 'status_check_contexts', + 'user_can_merge': 'user_can_merge', + 'user_can_push': 'user_can_push' + } + + def __init__(self, commit=None, effective_branch_protection_name=None, enable_status_check=None, name=None, protected=None, required_approvals=None, status_check_contexts=None, user_can_merge=None, user_can_push=None, _configuration=None): # noqa: E501 + """Branch - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._effective_branch_protection_name = None + self._enable_status_check = None + self._name = None + self._protected = None + self._required_approvals = None + self._status_check_contexts = None + self._user_can_merge = None + self._user_can_push = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if effective_branch_protection_name is not None: + self.effective_branch_protection_name = effective_branch_protection_name + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if name is not None: + self.name = name + if protected is not None: + self.protected = protected + if required_approvals is not None: + self.required_approvals = required_approvals + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if user_can_merge is not None: + self.user_can_merge = user_can_merge + if user_can_push is not None: + self.user_can_push = user_can_push + + @property + def commit(self): + """Gets the commit of this Branch. # noqa: E501 + + + :return: The commit of this Branch. # noqa: E501 + :rtype: PayloadCommit + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Branch. + + + :param commit: The commit of this Branch. # noqa: E501 + :type: PayloadCommit + """ + + self._commit = commit + + @property + def effective_branch_protection_name(self): + """Gets the effective_branch_protection_name of this Branch. # noqa: E501 + + EffectiveBranchProtectionName is the name of the effective branch protection rule # noqa: E501 + + :return: The effective_branch_protection_name of this Branch. # noqa: E501 + :rtype: str + """ + return self._effective_branch_protection_name + + @effective_branch_protection_name.setter + def effective_branch_protection_name(self, effective_branch_protection_name): + """Sets the effective_branch_protection_name of this Branch. + + EffectiveBranchProtectionName is the name of the effective branch protection rule # noqa: E501 + + :param effective_branch_protection_name: The effective_branch_protection_name of this Branch. # noqa: E501 + :type: str + """ + + self._effective_branch_protection_name = effective_branch_protection_name + + @property + def enable_status_check(self): + """Gets the enable_status_check of this Branch. # noqa: E501 + + EnableStatusCheck indicates if status checks are enabled # noqa: E501 + + :return: The enable_status_check of this Branch. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this Branch. + + EnableStatusCheck indicates if status checks are enabled # noqa: E501 + + :param enable_status_check: The enable_status_check of this Branch. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def name(self): + """Gets the name of this Branch. # noqa: E501 + + Name is the branch name # noqa: E501 + + :return: The name of this Branch. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Branch. + + Name is the branch name # noqa: E501 + + :param name: The name of this Branch. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def protected(self): + """Gets the protected of this Branch. # noqa: E501 + + Protected indicates if the branch is protected # noqa: E501 + + :return: The protected of this Branch. # noqa: E501 + :rtype: bool + """ + return self._protected + + @protected.setter + def protected(self, protected): + """Sets the protected of this Branch. + + Protected indicates if the branch is protected # noqa: E501 + + :param protected: The protected of this Branch. # noqa: E501 + :type: bool + """ + + self._protected = protected + + @property + def required_approvals(self): + """Gets the required_approvals of this Branch. # noqa: E501 + + RequiredApprovals is the number of required approvals for pull requests # noqa: E501 + + :return: The required_approvals of this Branch. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this Branch. + + RequiredApprovals is the number of required approvals for pull requests # noqa: E501 + + :param required_approvals: The required_approvals of this Branch. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this Branch. # noqa: E501 + + StatusCheckContexts contains the list of required status check contexts # noqa: E501 + + :return: The status_check_contexts of this Branch. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this Branch. + + StatusCheckContexts contains the list of required status check contexts # noqa: E501 + + :param status_check_contexts: The status_check_contexts of this Branch. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def user_can_merge(self): + """Gets the user_can_merge of this Branch. # noqa: E501 + + UserCanMerge indicates if the current user can merge to this branch # noqa: E501 + + :return: The user_can_merge of this Branch. # noqa: E501 + :rtype: bool + """ + return self._user_can_merge + + @user_can_merge.setter + def user_can_merge(self, user_can_merge): + """Sets the user_can_merge of this Branch. + + UserCanMerge indicates if the current user can merge to this branch # noqa: E501 + + :param user_can_merge: The user_can_merge of this Branch. # noqa: E501 + :type: bool + """ + + self._user_can_merge = user_can_merge + + @property + def user_can_push(self): + """Gets the user_can_push of this Branch. # noqa: E501 + + UserCanPush indicates if the current user can push to this branch # noqa: E501 + + :return: The user_can_push of this Branch. # noqa: E501 + :rtype: bool + """ + return self._user_can_push + + @user_can_push.setter + def user_can_push(self, user_can_push): + """Sets the user_can_push of this Branch. + + UserCanPush indicates if the current user can push to this branch # noqa: E501 + + :param user_can_push: The user_can_push of this Branch. # noqa: E501 + :type: bool + """ + + self._user_can_push = user_can_push + + 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(Branch, 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, Branch): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Branch): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/branch_protection.py b/swagger_client/models/branch_protection.py new file mode 100644 index 0000000..c489fac --- /dev/null +++ b/swagger_client/models/branch_protection.py @@ -0,0 +1,961 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class BranchProtection(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 = { + 'approvals_whitelist_teams': 'list[str]', + 'approvals_whitelist_username': 'list[str]', + 'block_admin_merge_override': 'bool', + 'block_on_official_review_requests': 'bool', + 'block_on_outdated_branch': 'bool', + 'block_on_rejected_reviews': 'bool', + 'branch_name': 'str', + 'created_at': 'datetime', + 'dismiss_stale_approvals': 'bool', + 'enable_approvals_whitelist': 'bool', + 'enable_force_push': 'bool', + 'enable_force_push_allowlist': 'bool', + 'enable_merge_whitelist': 'bool', + 'enable_push': 'bool', + 'enable_push_whitelist': 'bool', + 'enable_status_check': 'bool', + 'force_push_allowlist_deploy_keys': 'bool', + 'force_push_allowlist_teams': 'list[str]', + 'force_push_allowlist_usernames': 'list[str]', + 'ignore_stale_approvals': 'bool', + 'merge_whitelist_teams': 'list[str]', + 'merge_whitelist_usernames': 'list[str]', + 'priority': 'int', + 'protected_file_patterns': 'str', + 'push_whitelist_deploy_keys': 'bool', + 'push_whitelist_teams': 'list[str]', + 'push_whitelist_usernames': 'list[str]', + 'require_signed_commits': 'bool', + 'required_approvals': 'int', + 'rule_name': 'str', + 'status_check_contexts': 'list[str]', + 'unprotected_file_patterns': 'str', + 'updated_at': 'datetime' + } + + attribute_map = { + 'approvals_whitelist_teams': 'approvals_whitelist_teams', + 'approvals_whitelist_username': 'approvals_whitelist_username', + 'block_admin_merge_override': 'block_admin_merge_override', + 'block_on_official_review_requests': 'block_on_official_review_requests', + 'block_on_outdated_branch': 'block_on_outdated_branch', + 'block_on_rejected_reviews': 'block_on_rejected_reviews', + 'branch_name': 'branch_name', + 'created_at': 'created_at', + 'dismiss_stale_approvals': 'dismiss_stale_approvals', + 'enable_approvals_whitelist': 'enable_approvals_whitelist', + 'enable_force_push': 'enable_force_push', + 'enable_force_push_allowlist': 'enable_force_push_allowlist', + 'enable_merge_whitelist': 'enable_merge_whitelist', + 'enable_push': 'enable_push', + 'enable_push_whitelist': 'enable_push_whitelist', + 'enable_status_check': 'enable_status_check', + 'force_push_allowlist_deploy_keys': 'force_push_allowlist_deploy_keys', + 'force_push_allowlist_teams': 'force_push_allowlist_teams', + 'force_push_allowlist_usernames': 'force_push_allowlist_usernames', + 'ignore_stale_approvals': 'ignore_stale_approvals', + 'merge_whitelist_teams': 'merge_whitelist_teams', + 'merge_whitelist_usernames': 'merge_whitelist_usernames', + 'priority': 'priority', + 'protected_file_patterns': 'protected_file_patterns', + 'push_whitelist_deploy_keys': 'push_whitelist_deploy_keys', + 'push_whitelist_teams': 'push_whitelist_teams', + 'push_whitelist_usernames': 'push_whitelist_usernames', + 'require_signed_commits': 'require_signed_commits', + 'required_approvals': 'required_approvals', + 'rule_name': 'rule_name', + 'status_check_contexts': 'status_check_contexts', + 'unprotected_file_patterns': 'unprotected_file_patterns', + 'updated_at': 'updated_at' + } + + def __init__(self, approvals_whitelist_teams=None, approvals_whitelist_username=None, block_admin_merge_override=None, block_on_official_review_requests=None, block_on_outdated_branch=None, block_on_rejected_reviews=None, branch_name=None, created_at=None, dismiss_stale_approvals=None, enable_approvals_whitelist=None, enable_force_push=None, enable_force_push_allowlist=None, enable_merge_whitelist=None, enable_push=None, enable_push_whitelist=None, enable_status_check=None, force_push_allowlist_deploy_keys=None, force_push_allowlist_teams=None, force_push_allowlist_usernames=None, ignore_stale_approvals=None, merge_whitelist_teams=None, merge_whitelist_usernames=None, priority=None, protected_file_patterns=None, push_whitelist_deploy_keys=None, push_whitelist_teams=None, push_whitelist_usernames=None, require_signed_commits=None, required_approvals=None, rule_name=None, status_check_contexts=None, unprotected_file_patterns=None, updated_at=None, _configuration=None): # noqa: E501 + """BranchProtection - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._approvals_whitelist_teams = None + self._approvals_whitelist_username = None + self._block_admin_merge_override = None + self._block_on_official_review_requests = None + self._block_on_outdated_branch = None + self._block_on_rejected_reviews = None + self._branch_name = None + self._created_at = None + self._dismiss_stale_approvals = None + self._enable_approvals_whitelist = None + self._enable_force_push = None + self._enable_force_push_allowlist = None + self._enable_merge_whitelist = None + self._enable_push = None + self._enable_push_whitelist = None + self._enable_status_check = None + self._force_push_allowlist_deploy_keys = None + self._force_push_allowlist_teams = None + self._force_push_allowlist_usernames = None + self._ignore_stale_approvals = None + self._merge_whitelist_teams = None + self._merge_whitelist_usernames = None + self._priority = None + self._protected_file_patterns = None + self._push_whitelist_deploy_keys = None + self._push_whitelist_teams = None + self._push_whitelist_usernames = None + self._require_signed_commits = None + self._required_approvals = None + self._rule_name = None + self._status_check_contexts = None + self._unprotected_file_patterns = None + self._updated_at = None + self.discriminator = None + + if approvals_whitelist_teams is not None: + self.approvals_whitelist_teams = approvals_whitelist_teams + if approvals_whitelist_username is not None: + self.approvals_whitelist_username = approvals_whitelist_username + if block_admin_merge_override is not None: + self.block_admin_merge_override = block_admin_merge_override + if block_on_official_review_requests is not None: + self.block_on_official_review_requests = block_on_official_review_requests + if block_on_outdated_branch is not None: + self.block_on_outdated_branch = block_on_outdated_branch + if block_on_rejected_reviews is not None: + self.block_on_rejected_reviews = block_on_rejected_reviews + if branch_name is not None: + self.branch_name = branch_name + if created_at is not None: + self.created_at = created_at + if dismiss_stale_approvals is not None: + self.dismiss_stale_approvals = dismiss_stale_approvals + if enable_approvals_whitelist is not None: + self.enable_approvals_whitelist = enable_approvals_whitelist + if enable_force_push is not None: + self.enable_force_push = enable_force_push + if enable_force_push_allowlist is not None: + self.enable_force_push_allowlist = enable_force_push_allowlist + if enable_merge_whitelist is not None: + self.enable_merge_whitelist = enable_merge_whitelist + if enable_push is not None: + self.enable_push = enable_push + if enable_push_whitelist is not None: + self.enable_push_whitelist = enable_push_whitelist + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if force_push_allowlist_deploy_keys is not None: + self.force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + if force_push_allowlist_teams is not None: + self.force_push_allowlist_teams = force_push_allowlist_teams + if force_push_allowlist_usernames is not None: + self.force_push_allowlist_usernames = force_push_allowlist_usernames + if ignore_stale_approvals is not None: + self.ignore_stale_approvals = ignore_stale_approvals + if merge_whitelist_teams is not None: + self.merge_whitelist_teams = merge_whitelist_teams + if merge_whitelist_usernames is not None: + self.merge_whitelist_usernames = merge_whitelist_usernames + if priority is not None: + self.priority = priority + if protected_file_patterns is not None: + self.protected_file_patterns = protected_file_patterns + if push_whitelist_deploy_keys is not None: + self.push_whitelist_deploy_keys = push_whitelist_deploy_keys + if push_whitelist_teams is not None: + self.push_whitelist_teams = push_whitelist_teams + if push_whitelist_usernames is not None: + self.push_whitelist_usernames = push_whitelist_usernames + if require_signed_commits is not None: + self.require_signed_commits = require_signed_commits + if required_approvals is not None: + self.required_approvals = required_approvals + if rule_name is not None: + self.rule_name = rule_name + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if unprotected_file_patterns is not None: + self.unprotected_file_patterns = unprotected_file_patterns + if updated_at is not None: + self.updated_at = updated_at + + @property + def approvals_whitelist_teams(self): + """Gets the approvals_whitelist_teams of this BranchProtection. # noqa: E501 + + + :return: The approvals_whitelist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_teams + + @approvals_whitelist_teams.setter + def approvals_whitelist_teams(self, approvals_whitelist_teams): + """Sets the approvals_whitelist_teams of this BranchProtection. + + + :param approvals_whitelist_teams: The approvals_whitelist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_teams = approvals_whitelist_teams + + @property + def approvals_whitelist_username(self): + """Gets the approvals_whitelist_username of this BranchProtection. # noqa: E501 + + + :return: The approvals_whitelist_username of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_username + + @approvals_whitelist_username.setter + def approvals_whitelist_username(self, approvals_whitelist_username): + """Sets the approvals_whitelist_username of this BranchProtection. + + + :param approvals_whitelist_username: The approvals_whitelist_username of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_username = approvals_whitelist_username + + @property + def block_admin_merge_override(self): + """Gets the block_admin_merge_override of this BranchProtection. # noqa: E501 + + + :return: The block_admin_merge_override of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_admin_merge_override + + @block_admin_merge_override.setter + def block_admin_merge_override(self, block_admin_merge_override): + """Sets the block_admin_merge_override of this BranchProtection. + + + :param block_admin_merge_override: The block_admin_merge_override of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_admin_merge_override = block_admin_merge_override + + @property + def block_on_official_review_requests(self): + """Gets the block_on_official_review_requests of this BranchProtection. # noqa: E501 + + + :return: The block_on_official_review_requests of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_on_official_review_requests + + @block_on_official_review_requests.setter + def block_on_official_review_requests(self, block_on_official_review_requests): + """Sets the block_on_official_review_requests of this BranchProtection. + + + :param block_on_official_review_requests: The block_on_official_review_requests of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_on_official_review_requests = block_on_official_review_requests + + @property + def block_on_outdated_branch(self): + """Gets the block_on_outdated_branch of this BranchProtection. # noqa: E501 + + + :return: The block_on_outdated_branch of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_on_outdated_branch + + @block_on_outdated_branch.setter + def block_on_outdated_branch(self, block_on_outdated_branch): + """Sets the block_on_outdated_branch of this BranchProtection. + + + :param block_on_outdated_branch: The block_on_outdated_branch of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_on_outdated_branch = block_on_outdated_branch + + @property + def block_on_rejected_reviews(self): + """Gets the block_on_rejected_reviews of this BranchProtection. # noqa: E501 + + + :return: The block_on_rejected_reviews of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_on_rejected_reviews + + @block_on_rejected_reviews.setter + def block_on_rejected_reviews(self, block_on_rejected_reviews): + """Sets the block_on_rejected_reviews of this BranchProtection. + + + :param block_on_rejected_reviews: The block_on_rejected_reviews of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_on_rejected_reviews = block_on_rejected_reviews + + @property + def branch_name(self): + """Gets the branch_name of this BranchProtection. # noqa: E501 + + Deprecated: true # noqa: E501 + + :return: The branch_name of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._branch_name + + @branch_name.setter + def branch_name(self, branch_name): + """Sets the branch_name of this BranchProtection. + + Deprecated: true # noqa: E501 + + :param branch_name: The branch_name of this BranchProtection. # noqa: E501 + :type: str + """ + + self._branch_name = branch_name + + @property + def created_at(self): + """Gets the created_at of this BranchProtection. # noqa: E501 + + + :return: The created_at of this BranchProtection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this BranchProtection. + + + :param created_at: The created_at of this BranchProtection. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def dismiss_stale_approvals(self): + """Gets the dismiss_stale_approvals of this BranchProtection. # noqa: E501 + + + :return: The dismiss_stale_approvals of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._dismiss_stale_approvals + + @dismiss_stale_approvals.setter + def dismiss_stale_approvals(self, dismiss_stale_approvals): + """Sets the dismiss_stale_approvals of this BranchProtection. + + + :param dismiss_stale_approvals: The dismiss_stale_approvals of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._dismiss_stale_approvals = dismiss_stale_approvals + + @property + def enable_approvals_whitelist(self): + """Gets the enable_approvals_whitelist of this BranchProtection. # noqa: E501 + + + :return: The enable_approvals_whitelist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_approvals_whitelist + + @enable_approvals_whitelist.setter + def enable_approvals_whitelist(self, enable_approvals_whitelist): + """Sets the enable_approvals_whitelist of this BranchProtection. + + + :param enable_approvals_whitelist: The enable_approvals_whitelist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_approvals_whitelist = enable_approvals_whitelist + + @property + def enable_force_push(self): + """Gets the enable_force_push of this BranchProtection. # noqa: E501 + + + :return: The enable_force_push of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push + + @enable_force_push.setter + def enable_force_push(self, enable_force_push): + """Sets the enable_force_push of this BranchProtection. + + + :param enable_force_push: The enable_force_push of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_force_push = enable_force_push + + @property + def enable_force_push_allowlist(self): + """Gets the enable_force_push_allowlist of this BranchProtection. # noqa: E501 + + + :return: The enable_force_push_allowlist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push_allowlist + + @enable_force_push_allowlist.setter + def enable_force_push_allowlist(self, enable_force_push_allowlist): + """Sets the enable_force_push_allowlist of this BranchProtection. + + + :param enable_force_push_allowlist: The enable_force_push_allowlist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_force_push_allowlist = enable_force_push_allowlist + + @property + def enable_merge_whitelist(self): + """Gets the enable_merge_whitelist of this BranchProtection. # noqa: E501 + + + :return: The enable_merge_whitelist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_merge_whitelist + + @enable_merge_whitelist.setter + def enable_merge_whitelist(self, enable_merge_whitelist): + """Sets the enable_merge_whitelist of this BranchProtection. + + + :param enable_merge_whitelist: The enable_merge_whitelist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_merge_whitelist = enable_merge_whitelist + + @property + def enable_push(self): + """Gets the enable_push of this BranchProtection. # noqa: E501 + + + :return: The enable_push of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_push + + @enable_push.setter + def enable_push(self, enable_push): + """Sets the enable_push of this BranchProtection. + + + :param enable_push: The enable_push of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_push = enable_push + + @property + def enable_push_whitelist(self): + """Gets the enable_push_whitelist of this BranchProtection. # noqa: E501 + + + :return: The enable_push_whitelist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_push_whitelist + + @enable_push_whitelist.setter + def enable_push_whitelist(self, enable_push_whitelist): + """Sets the enable_push_whitelist of this BranchProtection. + + + :param enable_push_whitelist: The enable_push_whitelist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_push_whitelist = enable_push_whitelist + + @property + def enable_status_check(self): + """Gets the enable_status_check of this BranchProtection. # noqa: E501 + + + :return: The enable_status_check of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this BranchProtection. + + + :param enable_status_check: The enable_status_check of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def force_push_allowlist_deploy_keys(self): + """Gets the force_push_allowlist_deploy_keys of this BranchProtection. # noqa: E501 + + + :return: The force_push_allowlist_deploy_keys of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._force_push_allowlist_deploy_keys + + @force_push_allowlist_deploy_keys.setter + def force_push_allowlist_deploy_keys(self, force_push_allowlist_deploy_keys): + """Sets the force_push_allowlist_deploy_keys of this BranchProtection. + + + :param force_push_allowlist_deploy_keys: The force_push_allowlist_deploy_keys of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + + @property + def force_push_allowlist_teams(self): + """Gets the force_push_allowlist_teams of this BranchProtection. # noqa: E501 + + + :return: The force_push_allowlist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_teams + + @force_push_allowlist_teams.setter + def force_push_allowlist_teams(self, force_push_allowlist_teams): + """Sets the force_push_allowlist_teams of this BranchProtection. + + + :param force_push_allowlist_teams: The force_push_allowlist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_teams = force_push_allowlist_teams + + @property + def force_push_allowlist_usernames(self): + """Gets the force_push_allowlist_usernames of this BranchProtection. # noqa: E501 + + + :return: The force_push_allowlist_usernames of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_usernames + + @force_push_allowlist_usernames.setter + def force_push_allowlist_usernames(self, force_push_allowlist_usernames): + """Sets the force_push_allowlist_usernames of this BranchProtection. + + + :param force_push_allowlist_usernames: The force_push_allowlist_usernames of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_usernames = force_push_allowlist_usernames + + @property + def ignore_stale_approvals(self): + """Gets the ignore_stale_approvals of this BranchProtection. # noqa: E501 + + + :return: The ignore_stale_approvals of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._ignore_stale_approvals + + @ignore_stale_approvals.setter + def ignore_stale_approvals(self, ignore_stale_approvals): + """Sets the ignore_stale_approvals of this BranchProtection. + + + :param ignore_stale_approvals: The ignore_stale_approvals of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._ignore_stale_approvals = ignore_stale_approvals + + @property + def merge_whitelist_teams(self): + """Gets the merge_whitelist_teams of this BranchProtection. # noqa: E501 + + + :return: The merge_whitelist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_teams + + @merge_whitelist_teams.setter + def merge_whitelist_teams(self, merge_whitelist_teams): + """Sets the merge_whitelist_teams of this BranchProtection. + + + :param merge_whitelist_teams: The merge_whitelist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_teams = merge_whitelist_teams + + @property + def merge_whitelist_usernames(self): + """Gets the merge_whitelist_usernames of this BranchProtection. # noqa: E501 + + + :return: The merge_whitelist_usernames of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_usernames + + @merge_whitelist_usernames.setter + def merge_whitelist_usernames(self, merge_whitelist_usernames): + """Sets the merge_whitelist_usernames of this BranchProtection. + + + :param merge_whitelist_usernames: The merge_whitelist_usernames of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_usernames = merge_whitelist_usernames + + @property + def priority(self): + """Gets the priority of this BranchProtection. # noqa: E501 + + Priority is the priority of this branch protection rule # noqa: E501 + + :return: The priority of this BranchProtection. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this BranchProtection. + + Priority is the priority of this branch protection rule # noqa: E501 + + :param priority: The priority of this BranchProtection. # noqa: E501 + :type: int + """ + + self._priority = priority + + @property + def protected_file_patterns(self): + """Gets the protected_file_patterns of this BranchProtection. # noqa: E501 + + + :return: The protected_file_patterns of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._protected_file_patterns + + @protected_file_patterns.setter + def protected_file_patterns(self, protected_file_patterns): + """Sets the protected_file_patterns of this BranchProtection. + + + :param protected_file_patterns: The protected_file_patterns of this BranchProtection. # noqa: E501 + :type: str + """ + + self._protected_file_patterns = protected_file_patterns + + @property + def push_whitelist_deploy_keys(self): + """Gets the push_whitelist_deploy_keys of this BranchProtection. # noqa: E501 + + + :return: The push_whitelist_deploy_keys of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._push_whitelist_deploy_keys + + @push_whitelist_deploy_keys.setter + def push_whitelist_deploy_keys(self, push_whitelist_deploy_keys): + """Sets the push_whitelist_deploy_keys of this BranchProtection. + + + :param push_whitelist_deploy_keys: The push_whitelist_deploy_keys of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._push_whitelist_deploy_keys = push_whitelist_deploy_keys + + @property + def push_whitelist_teams(self): + """Gets the push_whitelist_teams of this BranchProtection. # noqa: E501 + + + :return: The push_whitelist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_teams + + @push_whitelist_teams.setter + def push_whitelist_teams(self, push_whitelist_teams): + """Sets the push_whitelist_teams of this BranchProtection. + + + :param push_whitelist_teams: The push_whitelist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_teams = push_whitelist_teams + + @property + def push_whitelist_usernames(self): + """Gets the push_whitelist_usernames of this BranchProtection. # noqa: E501 + + + :return: The push_whitelist_usernames of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_usernames + + @push_whitelist_usernames.setter + def push_whitelist_usernames(self, push_whitelist_usernames): + """Sets the push_whitelist_usernames of this BranchProtection. + + + :param push_whitelist_usernames: The push_whitelist_usernames of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_usernames = push_whitelist_usernames + + @property + def require_signed_commits(self): + """Gets the require_signed_commits of this BranchProtection. # noqa: E501 + + + :return: The require_signed_commits of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._require_signed_commits + + @require_signed_commits.setter + def require_signed_commits(self, require_signed_commits): + """Sets the require_signed_commits of this BranchProtection. + + + :param require_signed_commits: The require_signed_commits of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._require_signed_commits = require_signed_commits + + @property + def required_approvals(self): + """Gets the required_approvals of this BranchProtection. # noqa: E501 + + + :return: The required_approvals of this BranchProtection. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this BranchProtection. + + + :param required_approvals: The required_approvals of this BranchProtection. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def rule_name(self): + """Gets the rule_name of this BranchProtection. # noqa: E501 + + RuleName is the name of the branch protection rule # noqa: E501 + + :return: The rule_name of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._rule_name + + @rule_name.setter + def rule_name(self, rule_name): + """Sets the rule_name of this BranchProtection. + + RuleName is the name of the branch protection rule # noqa: E501 + + :param rule_name: The rule_name of this BranchProtection. # noqa: E501 + :type: str + """ + + self._rule_name = rule_name + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this BranchProtection. # noqa: E501 + + + :return: The status_check_contexts of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this BranchProtection. + + + :param status_check_contexts: The status_check_contexts of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def unprotected_file_patterns(self): + """Gets the unprotected_file_patterns of this BranchProtection. # noqa: E501 + + + :return: The unprotected_file_patterns of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._unprotected_file_patterns + + @unprotected_file_patterns.setter + def unprotected_file_patterns(self, unprotected_file_patterns): + """Sets the unprotected_file_patterns of this BranchProtection. + + + :param unprotected_file_patterns: The unprotected_file_patterns of this BranchProtection. # noqa: E501 + :type: str + """ + + self._unprotected_file_patterns = unprotected_file_patterns + + @property + def updated_at(self): + """Gets the updated_at of this BranchProtection. # noqa: E501 + + + :return: The updated_at of this BranchProtection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this BranchProtection. + + + :param updated_at: The updated_at of this BranchProtection. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_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(BranchProtection, 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, BranchProtection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BranchProtection): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/change_file_operation.py b/swagger_client/models/change_file_operation.py new file mode 100644 index 0000000..5690ea0 --- /dev/null +++ b/swagger_client/models/change_file_operation.py @@ -0,0 +1,246 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ChangeFileOperation(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', + 'from_path': 'str', + 'operation': 'str', + 'path': 'str', + 'sha': 'str' + } + + attribute_map = { + 'content': 'content', + 'from_path': 'from_path', + 'operation': 'operation', + 'path': 'path', + 'sha': 'sha' + } + + def __init__(self, content=None, from_path=None, operation=None, path=None, sha=None, _configuration=None): # noqa: E501 + """ChangeFileOperation - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self._from_path = None + self._operation = None + self._path = None + self._sha = None + self.discriminator = None + + if content is not None: + self.content = content + if from_path is not None: + self.from_path = from_path + self.operation = operation + self.path = path + if sha is not None: + self.sha = sha + + @property + def content(self): + """Gets the content of this ChangeFileOperation. # noqa: E501 + + new or updated file content, it must be base64 encoded # noqa: E501 + + :return: The content of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this ChangeFileOperation. + + new or updated file content, it must be base64 encoded # noqa: E501 + + :param content: The content of this ChangeFileOperation. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def from_path(self): + """Gets the from_path of this ChangeFileOperation. # noqa: E501 + + old path of the file to move # noqa: E501 + + :return: The from_path of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._from_path + + @from_path.setter + def from_path(self, from_path): + """Sets the from_path of this ChangeFileOperation. + + old path of the file to move # noqa: E501 + + :param from_path: The from_path of this ChangeFileOperation. # noqa: E501 + :type: str + """ + + self._from_path = from_path + + @property + def operation(self): + """Gets the operation of this ChangeFileOperation. # noqa: E501 + + indicates what to do with the file: \"create\" for creating a new file, \"update\" for updating an existing file, \"upload\" for creating or updating a file, \"rename\" for renaming a file, and \"delete\" for deleting an existing file. # noqa: E501 + + :return: The operation of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._operation + + @operation.setter + def operation(self, operation): + """Sets the operation of this ChangeFileOperation. + + indicates what to do with the file: \"create\" for creating a new file, \"update\" for updating an existing file, \"upload\" for creating or updating a file, \"rename\" for renaming a file, and \"delete\" for deleting an existing file. # noqa: E501 + + :param operation: The operation of this ChangeFileOperation. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and operation is None: + raise ValueError("Invalid value for `operation`, must not be `None`") # noqa: E501 + allowed_values = ["create", "update", "upload", "rename", "delete"] # noqa: E501 + if (self._configuration.client_side_validation and + operation not in allowed_values): + raise ValueError( + "Invalid value for `operation` ({0}), must be one of {1}" # noqa: E501 + .format(operation, allowed_values) + ) + + self._operation = operation + + @property + def path(self): + """Gets the path of this ChangeFileOperation. # noqa: E501 + + path to the existing or new file # noqa: E501 + + :return: The path of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this ChangeFileOperation. + + path to the existing or new file # noqa: E501 + + :param path: The path of this ChangeFileOperation. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and path is None: + raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501 + + self._path = path + + @property + def sha(self): + """Gets the sha of this ChangeFileOperation. # noqa: E501 + + the blob ID (SHA) for the file that already exists, required for changing existing files # noqa: E501 + + :return: The sha of this ChangeFileOperation. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this ChangeFileOperation. + + the blob ID (SHA) for the file that already exists, required for changing existing files # noqa: E501 + + :param sha: The sha of this ChangeFileOperation. # noqa: E501 + :type: str + """ + + self._sha = sha + + 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(ChangeFileOperation, 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, ChangeFileOperation): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ChangeFileOperation): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/change_files_options.py b/swagger_client/models/change_files_options.py new file mode 100644 index 0000000..c2749ad --- /dev/null +++ b/swagger_client/models/change_files_options.py @@ -0,0 +1,316 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ChangeFilesOptions(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 = { + 'author': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'dates': 'CommitDateOptions', + 'files': 'list[ChangeFileOperation]', + 'message': 'str', + 'new_branch': 'str', + 'signoff': 'bool' + } + + attribute_map = { + 'author': 'author', + 'branch': 'branch', + 'committer': 'committer', + 'dates': 'dates', + 'files': 'files', + 'message': 'message', + 'new_branch': 'new_branch', + 'signoff': 'signoff' + } + + def __init__(self, author=None, branch=None, committer=None, dates=None, files=None, message=None, new_branch=None, signoff=None, _configuration=None): # noqa: E501 + """ChangeFilesOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._branch = None + self._committer = None + self._dates = None + self._files = None + self._message = None + self._new_branch = None + self._signoff = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + if committer is not None: + self.committer = committer + if dates is not None: + self.dates = dates + self.files = files + if message is not None: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + if signoff is not None: + self.signoff = signoff + + @property + def author(self): + """Gets the author of this ChangeFilesOptions. # noqa: E501 + + + :return: The author of this ChangeFilesOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this ChangeFilesOptions. + + + :param author: The author of this ChangeFilesOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this ChangeFilesOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this ChangeFilesOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this ChangeFilesOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this ChangeFilesOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this ChangeFilesOptions. # noqa: E501 + + + :return: The committer of this ChangeFilesOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this ChangeFilesOptions. + + + :param committer: The committer of this ChangeFilesOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def dates(self): + """Gets the dates of this ChangeFilesOptions. # noqa: E501 + + + :return: The dates of this ChangeFilesOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this ChangeFilesOptions. + + + :param dates: The dates of this ChangeFilesOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + + @property + def files(self): + """Gets the files of this ChangeFilesOptions. # noqa: E501 + + list of file operations # noqa: E501 + + :return: The files of this ChangeFilesOptions. # noqa: E501 + :rtype: list[ChangeFileOperation] + """ + return self._files + + @files.setter + def files(self, files): + """Sets the files of this ChangeFilesOptions. + + list of file operations # noqa: E501 + + :param files: The files of this ChangeFilesOptions. # noqa: E501 + :type: list[ChangeFileOperation] + """ + if self._configuration.client_side_validation and files is None: + raise ValueError("Invalid value for `files`, must not be `None`") # noqa: E501 + + self._files = files + + @property + def message(self): + """Gets the message of this ChangeFilesOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this ChangeFilesOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ChangeFilesOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this ChangeFilesOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this ChangeFilesOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this ChangeFilesOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this ChangeFilesOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this ChangeFilesOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def signoff(self): + """Gets the signoff of this ChangeFilesOptions. # noqa: E501 + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :return: The signoff of this ChangeFilesOptions. # noqa: E501 + :rtype: bool + """ + return self._signoff + + @signoff.setter + def signoff(self, signoff): + """Sets the signoff of this ChangeFilesOptions. + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :param signoff: The signoff of this ChangeFilesOptions. # noqa: E501 + :type: bool + """ + + self._signoff = signoff + + 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(ChangeFilesOptions, 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, ChangeFilesOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ChangeFilesOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/changed_file.py b/swagger_client/models/changed_file.py new file mode 100644 index 0000000..6936eee --- /dev/null +++ b/swagger_client/models/changed_file.py @@ -0,0 +1,349 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ChangedFile(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 = { + 'additions': 'int', + 'changes': 'int', + 'contents_url': 'str', + 'deletions': 'int', + 'filename': 'str', + 'html_url': 'str', + 'previous_filename': 'str', + 'raw_url': 'str', + 'status': 'str' + } + + attribute_map = { + 'additions': 'additions', + 'changes': 'changes', + 'contents_url': 'contents_url', + 'deletions': 'deletions', + 'filename': 'filename', + 'html_url': 'html_url', + 'previous_filename': 'previous_filename', + 'raw_url': 'raw_url', + 'status': 'status' + } + + def __init__(self, additions=None, changes=None, contents_url=None, deletions=None, filename=None, html_url=None, previous_filename=None, raw_url=None, status=None, _configuration=None): # noqa: E501 + """ChangedFile - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._additions = None + self._changes = None + self._contents_url = None + self._deletions = None + self._filename = None + self._html_url = None + self._previous_filename = None + self._raw_url = None + self._status = None + self.discriminator = None + + if additions is not None: + self.additions = additions + if changes is not None: + self.changes = changes + if contents_url is not None: + self.contents_url = contents_url + if deletions is not None: + self.deletions = deletions + if filename is not None: + self.filename = filename + if html_url is not None: + self.html_url = html_url + if previous_filename is not None: + self.previous_filename = previous_filename + if raw_url is not None: + self.raw_url = raw_url + if status is not None: + self.status = status + + @property + def additions(self): + """Gets the additions of this ChangedFile. # noqa: E501 + + The number of lines added to the file # noqa: E501 + + :return: The additions of this ChangedFile. # noqa: E501 + :rtype: int + """ + return self._additions + + @additions.setter + def additions(self, additions): + """Sets the additions of this ChangedFile. + + The number of lines added to the file # noqa: E501 + + :param additions: The additions of this ChangedFile. # noqa: E501 + :type: int + """ + + self._additions = additions + + @property + def changes(self): + """Gets the changes of this ChangedFile. # noqa: E501 + + The total number of changes to the file # noqa: E501 + + :return: The changes of this ChangedFile. # noqa: E501 + :rtype: int + """ + return self._changes + + @changes.setter + def changes(self, changes): + """Sets the changes of this ChangedFile. + + The total number of changes to the file # noqa: E501 + + :param changes: The changes of this ChangedFile. # noqa: E501 + :type: int + """ + + self._changes = changes + + @property + def contents_url(self): + """Gets the contents_url of this ChangedFile. # noqa: E501 + + The API URL to get the file contents # noqa: E501 + + :return: The contents_url of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._contents_url + + @contents_url.setter + def contents_url(self, contents_url): + """Sets the contents_url of this ChangedFile. + + The API URL to get the file contents # noqa: E501 + + :param contents_url: The contents_url of this ChangedFile. # noqa: E501 + :type: str + """ + + self._contents_url = contents_url + + @property + def deletions(self): + """Gets the deletions of this ChangedFile. # noqa: E501 + + The number of lines deleted from the file # noqa: E501 + + :return: The deletions of this ChangedFile. # noqa: E501 + :rtype: int + """ + return self._deletions + + @deletions.setter + def deletions(self, deletions): + """Sets the deletions of this ChangedFile. + + The number of lines deleted from the file # noqa: E501 + + :param deletions: The deletions of this ChangedFile. # noqa: E501 + :type: int + """ + + self._deletions = deletions + + @property + def filename(self): + """Gets the filename of this ChangedFile. # noqa: E501 + + The name of the changed file # noqa: E501 + + :return: The filename of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._filename + + @filename.setter + def filename(self, filename): + """Sets the filename of this ChangedFile. + + The name of the changed file # noqa: E501 + + :param filename: The filename of this ChangedFile. # noqa: E501 + :type: str + """ + + self._filename = filename + + @property + def html_url(self): + """Gets the html_url of this ChangedFile. # noqa: E501 + + The HTML URL to view the file changes # noqa: E501 + + :return: The html_url of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this ChangedFile. + + The HTML URL to view the file changes # noqa: E501 + + :param html_url: The html_url of this ChangedFile. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def previous_filename(self): + """Gets the previous_filename of this ChangedFile. # noqa: E501 + + The previous filename if the file was renamed # noqa: E501 + + :return: The previous_filename of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._previous_filename + + @previous_filename.setter + def previous_filename(self, previous_filename): + """Sets the previous_filename of this ChangedFile. + + The previous filename if the file was renamed # noqa: E501 + + :param previous_filename: The previous_filename of this ChangedFile. # noqa: E501 + :type: str + """ + + self._previous_filename = previous_filename + + @property + def raw_url(self): + """Gets the raw_url of this ChangedFile. # noqa: E501 + + The raw URL to download the file # noqa: E501 + + :return: The raw_url of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._raw_url + + @raw_url.setter + def raw_url(self, raw_url): + """Sets the raw_url of this ChangedFile. + + The raw URL to download the file # noqa: E501 + + :param raw_url: The raw_url of this ChangedFile. # noqa: E501 + :type: str + """ + + self._raw_url = raw_url + + @property + def status(self): + """Gets the status of this ChangedFile. # noqa: E501 + + The status of the file change (added, modified, deleted, etc.) # noqa: E501 + + :return: The status of this ChangedFile. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ChangedFile. + + The status of the file change (added, modified, deleted, etc.) # noqa: E501 + + :param status: The status of this ChangedFile. # noqa: E501 + :type: str + """ + + self._status = status + + 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(ChangedFile, 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, ChangedFile): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ChangedFile): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/combined_status.py b/swagger_client/models/combined_status.py new file mode 100644 index 0000000..c543053 --- /dev/null +++ b/swagger_client/models/combined_status.py @@ -0,0 +1,298 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CombinedStatus(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 = { + 'commit_url': 'str', + 'repository': 'Repository', + 'sha': 'str', + 'state': 'str', + 'statuses': 'list[CommitStatus]', + 'total_count': 'int', + 'url': 'str' + } + + attribute_map = { + 'commit_url': 'commit_url', + 'repository': 'repository', + 'sha': 'sha', + 'state': 'state', + 'statuses': 'statuses', + 'total_count': 'total_count', + 'url': 'url' + } + + def __init__(self, commit_url=None, repository=None, sha=None, state=None, statuses=None, total_count=None, url=None, _configuration=None): # noqa: E501 + """CombinedStatus - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit_url = None + self._repository = None + self._sha = None + self._state = None + self._statuses = None + self._total_count = None + self._url = None + self.discriminator = None + + if commit_url is not None: + self.commit_url = commit_url + if repository is not None: + self.repository = repository + if sha is not None: + self.sha = sha + if state is not None: + self.state = state + if statuses is not None: + self.statuses = statuses + if total_count is not None: + self.total_count = total_count + if url is not None: + self.url = url + + @property + def commit_url(self): + """Gets the commit_url of this CombinedStatus. # noqa: E501 + + CommitURL is the API URL for the commit # noqa: E501 + + :return: The commit_url of this CombinedStatus. # noqa: E501 + :rtype: str + """ + return self._commit_url + + @commit_url.setter + def commit_url(self, commit_url): + """Sets the commit_url of this CombinedStatus. + + CommitURL is the API URL for the commit # noqa: E501 + + :param commit_url: The commit_url of this CombinedStatus. # noqa: E501 + :type: str + """ + + self._commit_url = commit_url + + @property + def repository(self): + """Gets the repository of this CombinedStatus. # noqa: E501 + + + :return: The repository of this CombinedStatus. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this CombinedStatus. + + + :param repository: The repository of this CombinedStatus. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def sha(self): + """Gets the sha of this CombinedStatus. # noqa: E501 + + SHA is the commit SHA this status applies to # noqa: E501 + + :return: The sha of this CombinedStatus. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this CombinedStatus. + + SHA is the commit SHA this status applies to # noqa: E501 + + :param sha: The sha of this CombinedStatus. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def state(self): + """Gets the state of this CombinedStatus. # noqa: E501 + + State is the overall combined status state pending CommitStatusPending CommitStatusPending is for when the CommitStatus is Pending success CommitStatusSuccess CommitStatusSuccess is for when the CommitStatus is Success error CommitStatusError CommitStatusError is for when the CommitStatus is Error failure CommitStatusFailure CommitStatusFailure is for when the CommitStatus is Failure warning CommitStatusWarning CommitStatusWarning is for when the CommitStatus is Warning skipped CommitStatusSkipped CommitStatusSkipped is for when CommitStatus is Skipped # noqa: E501 + + :return: The state of this CombinedStatus. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this CombinedStatus. + + State is the overall combined status state pending CommitStatusPending CommitStatusPending is for when the CommitStatus is Pending success CommitStatusSuccess CommitStatusSuccess is for when the CommitStatus is Success error CommitStatusError CommitStatusError is for when the CommitStatus is Error failure CommitStatusFailure CommitStatusFailure is for when the CommitStatus is Failure warning CommitStatusWarning CommitStatusWarning is for when the CommitStatus is Warning skipped CommitStatusSkipped CommitStatusSkipped is for when CommitStatus is Skipped # noqa: E501 + + :param state: The state of this CombinedStatus. # noqa: E501 + :type: str + """ + allowed_values = ["pending", "success", "error", "failure", "warning", "skipped"] # noqa: E501 + if (self._configuration.client_side_validation and + state not in allowed_values): + raise ValueError( + "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 + .format(state, allowed_values) + ) + + self._state = state + + @property + def statuses(self): + """Gets the statuses of this CombinedStatus. # noqa: E501 + + Statuses contains all individual commit statuses # noqa: E501 + + :return: The statuses of this CombinedStatus. # noqa: E501 + :rtype: list[CommitStatus] + """ + return self._statuses + + @statuses.setter + def statuses(self, statuses): + """Sets the statuses of this CombinedStatus. + + Statuses contains all individual commit statuses # noqa: E501 + + :param statuses: The statuses of this CombinedStatus. # noqa: E501 + :type: list[CommitStatus] + """ + + self._statuses = statuses + + @property + def total_count(self): + """Gets the total_count of this CombinedStatus. # noqa: E501 + + TotalCount is the total number of statuses # noqa: E501 + + :return: The total_count of this CombinedStatus. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this CombinedStatus. + + TotalCount is the total number of statuses # noqa: E501 + + :param total_count: The total_count of this CombinedStatus. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + @property + def url(self): + """Gets the url of this CombinedStatus. # noqa: E501 + + URL is the API URL for this combined status # noqa: E501 + + :return: The url of this CombinedStatus. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this CombinedStatus. + + URL is the API URL for this combined status # noqa: E501 + + :param url: The url of this CombinedStatus. # 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(CombinedStatus, 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, CombinedStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CombinedStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/comment.py b/swagger_client/models/comment.py new file mode 100644 index 0000000..e80466a --- /dev/null +++ b/swagger_client/models/comment.py @@ -0,0 +1,399 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Comment(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 = { + 'assets': 'list[Attachment]', + 'body': 'str', + 'created_at': 'datetime', + 'html_url': 'str', + 'id': 'int', + 'issue_url': 'str', + 'original_author': 'str', + 'original_author_id': 'int', + 'pull_request_url': 'str', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'assets': 'assets', + 'body': 'body', + 'created_at': 'created_at', + 'html_url': 'html_url', + 'id': 'id', + 'issue_url': 'issue_url', + 'original_author': 'original_author', + 'original_author_id': 'original_author_id', + 'pull_request_url': 'pull_request_url', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, assets=None, body=None, created_at=None, html_url=None, id=None, issue_url=None, original_author=None, original_author_id=None, pull_request_url=None, updated_at=None, user=None, _configuration=None): # noqa: E501 + """Comment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assets = None + self._body = None + self._created_at = None + self._html_url = None + self._id = None + self._issue_url = None + self._original_author = None + self._original_author_id = None + self._pull_request_url = None + self._updated_at = None + self._user = None + self.discriminator = None + + if assets is not None: + self.assets = assets + if body is not None: + self.body = body + if created_at is not None: + self.created_at = created_at + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if issue_url is not None: + self.issue_url = issue_url + if original_author is not None: + self.original_author = original_author + if original_author_id is not None: + self.original_author_id = original_author_id + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if updated_at is not None: + self.updated_at = updated_at + if user is not None: + self.user = user + + @property + def assets(self): + """Gets the assets of this Comment. # noqa: E501 + + Attachments contains files attached to the comment # noqa: E501 + + :return: The assets of this Comment. # noqa: E501 + :rtype: list[Attachment] + """ + return self._assets + + @assets.setter + def assets(self, assets): + """Sets the assets of this Comment. + + Attachments contains files attached to the comment # noqa: E501 + + :param assets: The assets of this Comment. # noqa: E501 + :type: list[Attachment] + """ + + self._assets = assets + + @property + def body(self): + """Gets the body of this Comment. # noqa: E501 + + Body contains the comment text content # noqa: E501 + + :return: The body of this Comment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Comment. + + Body contains the comment text content # noqa: E501 + + :param body: The body of this Comment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def created_at(self): + """Gets the created_at of this Comment. # noqa: E501 + + + :return: The created_at of this Comment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Comment. + + + :param created_at: The created_at of this Comment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def html_url(self): + """Gets the html_url of this Comment. # noqa: E501 + + HTMLURL is the web URL for viewing the comment # noqa: E501 + + :return: The html_url of this Comment. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Comment. + + HTMLURL is the web URL for viewing the comment # noqa: E501 + + :param html_url: The html_url of this Comment. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Comment. # noqa: E501 + + ID is the unique identifier for the comment # noqa: E501 + + :return: The id of this Comment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Comment. + + ID is the unique identifier for the comment # noqa: E501 + + :param id: The id of this Comment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def issue_url(self): + """Gets the issue_url of this Comment. # noqa: E501 + + IssueURL is the API URL for the issue # noqa: E501 + + :return: The issue_url of this Comment. # noqa: E501 + :rtype: str + """ + return self._issue_url + + @issue_url.setter + def issue_url(self, issue_url): + """Sets the issue_url of this Comment. + + IssueURL is the API URL for the issue # noqa: E501 + + :param issue_url: The issue_url of this Comment. # noqa: E501 + :type: str + """ + + self._issue_url = issue_url + + @property + def original_author(self): + """Gets the original_author of this Comment. # noqa: E501 + + OriginalAuthor is the original author name (for imported comments) # noqa: E501 + + :return: The original_author of this Comment. # noqa: E501 + :rtype: str + """ + return self._original_author + + @original_author.setter + def original_author(self, original_author): + """Sets the original_author of this Comment. + + OriginalAuthor is the original author name (for imported comments) # noqa: E501 + + :param original_author: The original_author of this Comment. # noqa: E501 + :type: str + """ + + self._original_author = original_author + + @property + def original_author_id(self): + """Gets the original_author_id of this Comment. # noqa: E501 + + OriginalAuthorID is the original author ID (for imported comments) # noqa: E501 + + :return: The original_author_id of this Comment. # noqa: E501 + :rtype: int + """ + return self._original_author_id + + @original_author_id.setter + def original_author_id(self, original_author_id): + """Sets the original_author_id of this Comment. + + OriginalAuthorID is the original author ID (for imported comments) # noqa: E501 + + :param original_author_id: The original_author_id of this Comment. # noqa: E501 + :type: int + """ + + self._original_author_id = original_author_id + + @property + def pull_request_url(self): + """Gets the pull_request_url of this Comment. # noqa: E501 + + PRURL is the API URL for the pull request (if applicable) # noqa: E501 + + :return: The pull_request_url of this Comment. # noqa: E501 + :rtype: str + """ + return self._pull_request_url + + @pull_request_url.setter + def pull_request_url(self, pull_request_url): + """Sets the pull_request_url of this Comment. + + PRURL is the API URL for the pull request (if applicable) # noqa: E501 + + :param pull_request_url: The pull_request_url of this Comment. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def updated_at(self): + """Gets the updated_at of this Comment. # noqa: E501 + + + :return: The updated_at of this Comment. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Comment. + + + :param updated_at: The updated_at of this Comment. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this Comment. # noqa: E501 + + + :return: The user of this Comment. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Comment. + + + :param user: The user of this Comment. # noqa: E501 + :type: User + """ + + 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(Comment, 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, Comment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Comment): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/commit.py b/swagger_client/models/commit.py new file mode 100644 index 0000000..3f076af --- /dev/null +++ b/swagger_client/models/commit.py @@ -0,0 +1,367 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Commit(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 = { + 'author': 'User', + 'commit': 'RepoCommit', + 'committer': 'User', + 'created': 'datetime', + 'files': 'list[CommitAffectedFiles]', + 'html_url': 'str', + 'parents': 'list[CommitMeta]', + 'sha': 'str', + 'stats': 'CommitStats', + 'url': 'str' + } + + attribute_map = { + 'author': 'author', + 'commit': 'commit', + 'committer': 'committer', + 'created': 'created', + 'files': 'files', + 'html_url': 'html_url', + 'parents': 'parents', + 'sha': 'sha', + 'stats': 'stats', + 'url': 'url' + } + + def __init__(self, author=None, commit=None, committer=None, created=None, files=None, html_url=None, parents=None, sha=None, stats=None, url=None, _configuration=None): # noqa: E501 + """Commit - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._commit = None + self._committer = None + self._created = None + self._files = None + self._html_url = None + self._parents = None + self._sha = None + self._stats = None + self._url = None + self.discriminator = None + + if author is not None: + self.author = author + if commit is not None: + self.commit = commit + if committer is not None: + self.committer = committer + if created is not None: + self.created = created + if files is not None: + self.files = files + if html_url is not None: + self.html_url = html_url + if parents is not None: + self.parents = parents + if sha is not None: + self.sha = sha + if stats is not None: + self.stats = stats + if url is not None: + self.url = url + + @property + def author(self): + """Gets the author of this Commit. # noqa: E501 + + + :return: The author of this Commit. # noqa: E501 + :rtype: User + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this Commit. + + + :param author: The author of this Commit. # noqa: E501 + :type: User + """ + + self._author = author + + @property + def commit(self): + """Gets the commit of this Commit. # noqa: E501 + + + :return: The commit of this Commit. # noqa: E501 + :rtype: RepoCommit + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Commit. + + + :param commit: The commit of this Commit. # noqa: E501 + :type: RepoCommit + """ + + self._commit = commit + + @property + def committer(self): + """Gets the committer of this Commit. # noqa: E501 + + + :return: The committer of this Commit. # noqa: E501 + :rtype: User + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this Commit. + + + :param committer: The committer of this Commit. # noqa: E501 + :type: User + """ + + self._committer = committer + + @property + def created(self): + """Gets the created of this Commit. # noqa: E501 + + + :return: The created of this Commit. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Commit. + + + :param created: The created of this Commit. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def files(self): + """Gets the files of this Commit. # noqa: E501 + + Files contains information about files affected by the commit # noqa: E501 + + :return: The files of this Commit. # noqa: E501 + :rtype: list[CommitAffectedFiles] + """ + return self._files + + @files.setter + def files(self, files): + """Sets the files of this Commit. + + Files contains information about files affected by the commit # noqa: E501 + + :param files: The files of this Commit. # noqa: E501 + :type: list[CommitAffectedFiles] + """ + + self._files = files + + @property + def html_url(self): + """Gets the html_url of this Commit. # noqa: E501 + + HTMLURL is the web URL for viewing the commit # noqa: E501 + + :return: The html_url of this Commit. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Commit. + + HTMLURL is the web URL for viewing the commit # noqa: E501 + + :param html_url: The html_url of this Commit. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def parents(self): + """Gets the parents of this Commit. # noqa: E501 + + Parents contains the parent commit information # noqa: E501 + + :return: The parents of this Commit. # noqa: E501 + :rtype: list[CommitMeta] + """ + return self._parents + + @parents.setter + def parents(self, parents): + """Sets the parents of this Commit. + + Parents contains the parent commit information # noqa: E501 + + :param parents: The parents of this Commit. # noqa: E501 + :type: list[CommitMeta] + """ + + self._parents = parents + + @property + def sha(self): + """Gets the sha of this Commit. # noqa: E501 + + SHA is the commit SHA hash # noqa: E501 + + :return: The sha of this Commit. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this Commit. + + SHA is the commit SHA hash # noqa: E501 + + :param sha: The sha of this Commit. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def stats(self): + """Gets the stats of this Commit. # noqa: E501 + + + :return: The stats of this Commit. # noqa: E501 + :rtype: CommitStats + """ + return self._stats + + @stats.setter + def stats(self, stats): + """Sets the stats of this Commit. + + + :param stats: The stats of this Commit. # noqa: E501 + :type: CommitStats + """ + + self._stats = stats + + @property + def url(self): + """Gets the url of this Commit. # noqa: E501 + + URL is the API URL for the commit # noqa: E501 + + :return: The url of this Commit. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Commit. + + URL is the API URL for the commit # noqa: E501 + + :param url: The url of this Commit. # 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(Commit, 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, Commit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Commit): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/commit_affected_files.py b/swagger_client/models/commit_affected_files.py new file mode 100644 index 0000000..e712ad2 --- /dev/null +++ b/swagger_client/models/commit_affected_files.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CommitAffectedFiles(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 = { + 'filename': 'str', + 'status': 'str' + } + + attribute_map = { + 'filename': 'filename', + 'status': 'status' + } + + def __init__(self, filename=None, status=None, _configuration=None): # noqa: E501 + """CommitAffectedFiles - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._filename = None + self._status = None + self.discriminator = None + + if filename is not None: + self.filename = filename + if status is not None: + self.status = status + + @property + def filename(self): + """Gets the filename of this CommitAffectedFiles. # noqa: E501 + + Filename is the path of the affected file # noqa: E501 + + :return: The filename of this CommitAffectedFiles. # noqa: E501 + :rtype: str + """ + return self._filename + + @filename.setter + def filename(self, filename): + """Sets the filename of this CommitAffectedFiles. + + Filename is the path of the affected file # noqa: E501 + + :param filename: The filename of this CommitAffectedFiles. # noqa: E501 + :type: str + """ + + self._filename = filename + + @property + def status(self): + """Gets the status of this CommitAffectedFiles. # noqa: E501 + + Status indicates how the file was affected (added, modified, deleted) # noqa: E501 + + :return: The status of this CommitAffectedFiles. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CommitAffectedFiles. + + Status indicates how the file was affected (added, modified, deleted) # noqa: E501 + + :param status: The status of this CommitAffectedFiles. # noqa: E501 + :type: str + """ + + self._status = status + + 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(CommitAffectedFiles, 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, CommitAffectedFiles): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitAffectedFiles): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/commit_date_options.py b/swagger_client/models/commit_date_options.py new file mode 100644 index 0000000..d8af0a1 --- /dev/null +++ b/swagger_client/models/commit_date_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CommitDateOptions(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 = { + 'author': 'datetime', + 'committer': 'datetime' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer' + } + + def __init__(self, author=None, committer=None, _configuration=None): # noqa: E501 + """CommitDateOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._committer = None + self.discriminator = None + + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + + @property + def author(self): + """Gets the author of this CommitDateOptions. # noqa: E501 + + + :return: The author of this CommitDateOptions. # noqa: E501 + :rtype: datetime + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this CommitDateOptions. + + + :param author: The author of this CommitDateOptions. # noqa: E501 + :type: datetime + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this CommitDateOptions. # noqa: E501 + + + :return: The committer of this CommitDateOptions. # noqa: E501 + :rtype: datetime + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this CommitDateOptions. + + + :param committer: The committer of this CommitDateOptions. # noqa: E501 + :type: datetime + """ + + self._committer = committer + + 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(CommitDateOptions, 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, CommitDateOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitDateOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/commit_meta.py b/swagger_client/models/commit_meta.py new file mode 100644 index 0000000..08a5d6c --- /dev/null +++ b/swagger_client/models/commit_meta.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CommitMeta(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 = { + 'created': 'datetime', + 'sha': 'str', + 'url': 'str' + } + + attribute_map = { + 'created': 'created', + 'sha': 'sha', + 'url': 'url' + } + + def __init__(self, created=None, sha=None, url=None, _configuration=None): # noqa: E501 + """CommitMeta - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._sha = None + self._url = None + self.discriminator = None + + if created is not None: + self.created = created + if sha is not None: + self.sha = sha + if url is not None: + self.url = url + + @property + def created(self): + """Gets the created of this CommitMeta. # noqa: E501 + + + :return: The created of this CommitMeta. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this CommitMeta. + + + :param created: The created of this CommitMeta. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def sha(self): + """Gets the sha of this CommitMeta. # noqa: E501 + + SHA is the commit SHA hash # noqa: E501 + + :return: The sha of this CommitMeta. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this CommitMeta. + + SHA is the commit SHA hash # noqa: E501 + + :param sha: The sha of this CommitMeta. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def url(self): + """Gets the url of this CommitMeta. # noqa: E501 + + URL is the API URL for the commit # noqa: E501 + + :return: The url of this CommitMeta. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this CommitMeta. + + URL is the API URL for the commit # noqa: E501 + + :param url: The url of this CommitMeta. # 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(CommitMeta, 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, CommitMeta): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitMeta): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/commit_stats.py b/swagger_client/models/commit_stats.py new file mode 100644 index 0000000..340a5ca --- /dev/null +++ b/swagger_client/models/commit_stats.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CommitStats(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 = { + 'additions': 'int', + 'deletions': 'int', + 'total': 'int' + } + + attribute_map = { + 'additions': 'additions', + 'deletions': 'deletions', + 'total': 'total' + } + + def __init__(self, additions=None, deletions=None, total=None, _configuration=None): # noqa: E501 + """CommitStats - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._additions = None + self._deletions = None + self._total = None + self.discriminator = None + + if additions is not None: + self.additions = additions + if deletions is not None: + self.deletions = deletions + if total is not None: + self.total = total + + @property + def additions(self): + """Gets the additions of this CommitStats. # noqa: E501 + + Additions is the number of lines added # noqa: E501 + + :return: The additions of this CommitStats. # noqa: E501 + :rtype: int + """ + return self._additions + + @additions.setter + def additions(self, additions): + """Sets the additions of this CommitStats. + + Additions is the number of lines added # noqa: E501 + + :param additions: The additions of this CommitStats. # noqa: E501 + :type: int + """ + + self._additions = additions + + @property + def deletions(self): + """Gets the deletions of this CommitStats. # noqa: E501 + + Deletions is the number of lines deleted # noqa: E501 + + :return: The deletions of this CommitStats. # noqa: E501 + :rtype: int + """ + return self._deletions + + @deletions.setter + def deletions(self, deletions): + """Sets the deletions of this CommitStats. + + Deletions is the number of lines deleted # noqa: E501 + + :param deletions: The deletions of this CommitStats. # noqa: E501 + :type: int + """ + + self._deletions = deletions + + @property + def total(self): + """Gets the total of this CommitStats. # noqa: E501 + + Total is the total number of lines changed # noqa: E501 + + :return: The total of this CommitStats. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this CommitStats. + + Total is the total number of lines changed # noqa: E501 + + :param total: The total of this CommitStats. # noqa: E501 + :type: int + """ + + self._total = total + + 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(CommitStats, 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, CommitStats): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitStats): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/commit_status.py b/swagger_client/models/commit_status.py new file mode 100644 index 0000000..88e5819 --- /dev/null +++ b/swagger_client/models/commit_status.py @@ -0,0 +1,350 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CommitStatus(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 = { + 'context': 'str', + 'created_at': 'datetime', + 'creator': 'User', + 'description': 'str', + 'id': 'int', + 'status': 'str', + 'target_url': 'str', + 'updated_at': 'datetime', + 'url': 'str' + } + + attribute_map = { + 'context': 'context', + 'created_at': 'created_at', + 'creator': 'creator', + 'description': 'description', + 'id': 'id', + 'status': 'status', + 'target_url': 'target_url', + 'updated_at': 'updated_at', + 'url': 'url' + } + + def __init__(self, context=None, created_at=None, creator=None, description=None, id=None, status=None, target_url=None, updated_at=None, url=None, _configuration=None): # noqa: E501 + """CommitStatus - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._context = None + self._created_at = None + self._creator = None + self._description = None + self._id = None + self._status = None + self._target_url = None + self._updated_at = None + self._url = None + self.discriminator = None + + if context is not None: + self.context = context + if created_at is not None: + self.created_at = created_at + if creator is not None: + self.creator = creator + if description is not None: + self.description = description + if id is not None: + self.id = id + if status is not None: + self.status = status + if target_url is not None: + self.target_url = target_url + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + + @property + def context(self): + """Gets the context of this CommitStatus. # noqa: E501 + + Context is the unique context identifier for the status # noqa: E501 + + :return: The context of this CommitStatus. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this CommitStatus. + + Context is the unique context identifier for the status # noqa: E501 + + :param context: The context of this CommitStatus. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def created_at(self): + """Gets the created_at of this CommitStatus. # noqa: E501 + + + :return: The created_at of this CommitStatus. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this CommitStatus. + + + :param created_at: The created_at of this CommitStatus. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def creator(self): + """Gets the creator of this CommitStatus. # noqa: E501 + + + :return: The creator of this CommitStatus. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this CommitStatus. + + + :param creator: The creator of this CommitStatus. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def description(self): + """Gets the description of this CommitStatus. # noqa: E501 + + Description provides a brief description of the status # noqa: E501 + + :return: The description of this CommitStatus. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CommitStatus. + + Description provides a brief description of the status # noqa: E501 + + :param description: The description of this CommitStatus. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this CommitStatus. # noqa: E501 + + ID is the unique identifier for the commit status # noqa: E501 + + :return: The id of this CommitStatus. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CommitStatus. + + ID is the unique identifier for the commit status # noqa: E501 + + :param id: The id of this CommitStatus. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def status(self): + """Gets the status of this CommitStatus. # noqa: E501 + + State represents the status state (pending, success, error, failure) pending CommitStatusPending CommitStatusPending is for when the CommitStatus is Pending success CommitStatusSuccess CommitStatusSuccess is for when the CommitStatus is Success error CommitStatusError CommitStatusError is for when the CommitStatus is Error failure CommitStatusFailure CommitStatusFailure is for when the CommitStatus is Failure warning CommitStatusWarning CommitStatusWarning is for when the CommitStatus is Warning skipped CommitStatusSkipped CommitStatusSkipped is for when CommitStatus is Skipped # noqa: E501 + + :return: The status of this CommitStatus. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CommitStatus. + + State represents the status state (pending, success, error, failure) pending CommitStatusPending CommitStatusPending is for when the CommitStatus is Pending success CommitStatusSuccess CommitStatusSuccess is for when the CommitStatus is Success error CommitStatusError CommitStatusError is for when the CommitStatus is Error failure CommitStatusFailure CommitStatusFailure is for when the CommitStatus is Failure warning CommitStatusWarning CommitStatusWarning is for when the CommitStatus is Warning skipped CommitStatusSkipped CommitStatusSkipped is for when CommitStatus is Skipped # noqa: E501 + + :param status: The status of this CommitStatus. # noqa: E501 + :type: str + """ + allowed_values = ["pending", "success", "error", "failure", "warning", "skipped"] # noqa: E501 + if (self._configuration.client_side_validation and + status not in allowed_values): + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def target_url(self): + """Gets the target_url of this CommitStatus. # noqa: E501 + + TargetURL is the URL to link to for more details # noqa: E501 + + :return: The target_url of this CommitStatus. # noqa: E501 + :rtype: str + """ + return self._target_url + + @target_url.setter + def target_url(self, target_url): + """Sets the target_url of this CommitStatus. + + TargetURL is the URL to link to for more details # noqa: E501 + + :param target_url: The target_url of this CommitStatus. # noqa: E501 + :type: str + """ + + self._target_url = target_url + + @property + def updated_at(self): + """Gets the updated_at of this CommitStatus. # noqa: E501 + + + :return: The updated_at of this CommitStatus. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this CommitStatus. + + + :param updated_at: The updated_at of this CommitStatus. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this CommitStatus. # noqa: E501 + + URL is the API URL for this status # noqa: E501 + + :return: The url of this CommitStatus. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this CommitStatus. + + URL is the API URL for this status # noqa: E501 + + :param url: The url of this CommitStatus. # 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(CommitStatus, 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, CommitStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/commit_user.py b/swagger_client/models/commit_user.py new file mode 100644 index 0000000..a4284a0 --- /dev/null +++ b/swagger_client/models/commit_user.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CommitUser(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 = { + '_date': 'str', + 'email': 'str', + 'name': 'str' + } + + attribute_map = { + '_date': 'date', + 'email': 'email', + 'name': 'name' + } + + def __init__(self, _date=None, email=None, name=None, _configuration=None): # noqa: E501 + """CommitUser - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self.__date = None + self._email = None + self._name = None + self.discriminator = None + + if _date is not None: + self._date = _date + if email is not None: + self.email = email + if name is not None: + self.name = name + + @property + def _date(self): + """Gets the _date of this CommitUser. # noqa: E501 + + Date is the commit date in string format # noqa: E501 + + :return: The _date of this CommitUser. # noqa: E501 + :rtype: str + """ + return self.__date + + @_date.setter + def _date(self, _date): + """Sets the _date of this CommitUser. + + Date is the commit date in string format # noqa: E501 + + :param _date: The _date of this CommitUser. # noqa: E501 + :type: str + """ + + self.__date = _date + + @property + def email(self): + """Gets the email of this CommitUser. # noqa: E501 + + + :return: The email of this CommitUser. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CommitUser. + + + :param email: The email of this CommitUser. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this CommitUser. # noqa: E501 + + Name is the person's name # noqa: E501 + + :return: The name of this CommitUser. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CommitUser. + + Name is the person's name # noqa: E501 + + :param name: The name of this CommitUser. # 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(CommitUser, 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, CommitUser): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitUser): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/compare.py b/swagger_client/models/compare.py new file mode 100644 index 0000000..797a705 --- /dev/null +++ b/swagger_client/models/compare.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Compare(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 = { + 'commits': 'list[Commit]', + 'total_commits': 'int' + } + + attribute_map = { + 'commits': 'commits', + 'total_commits': 'total_commits' + } + + def __init__(self, commits=None, total_commits=None, _configuration=None): # noqa: E501 + """Compare - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commits = None + self._total_commits = None + self.discriminator = None + + if commits is not None: + self.commits = commits + if total_commits is not None: + self.total_commits = total_commits + + @property + def commits(self): + """Gets the commits of this Compare. # noqa: E501 + + + :return: The commits of this Compare. # noqa: E501 + :rtype: list[Commit] + """ + return self._commits + + @commits.setter + def commits(self, commits): + """Sets the commits of this Compare. + + + :param commits: The commits of this Compare. # noqa: E501 + :type: list[Commit] + """ + + self._commits = commits + + @property + def total_commits(self): + """Gets the total_commits of this Compare. # noqa: E501 + + + :return: The total_commits of this Compare. # noqa: E501 + :rtype: int + """ + return self._total_commits + + @total_commits.setter + def total_commits(self, total_commits): + """Sets the total_commits of this Compare. + + + :param total_commits: The total_commits of this Compare. # noqa: E501 + :type: int + """ + + self._total_commits = total_commits + + 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(Compare, 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, Compare): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Compare): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/contents_ext_response.py b/swagger_client/models/contents_ext_response.py new file mode 100644 index 0000000..ac370d7 --- /dev/null +++ b/swagger_client/models/contents_ext_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ContentsExtResponse(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 = { + 'dir_contents': 'list[ContentsResponse]', + 'file_contents': 'ContentsResponse' + } + + attribute_map = { + 'dir_contents': 'dir_contents', + 'file_contents': 'file_contents' + } + + def __init__(self, dir_contents=None, file_contents=None, _configuration=None): # noqa: E501 + """ContentsExtResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._dir_contents = None + self._file_contents = None + self.discriminator = None + + if dir_contents is not None: + self.dir_contents = dir_contents + if file_contents is not None: + self.file_contents = file_contents + + @property + def dir_contents(self): + """Gets the dir_contents of this ContentsExtResponse. # noqa: E501 + + DirContents contains directory listing when the path represents a directory # noqa: E501 + + :return: The dir_contents of this ContentsExtResponse. # noqa: E501 + :rtype: list[ContentsResponse] + """ + return self._dir_contents + + @dir_contents.setter + def dir_contents(self, dir_contents): + """Sets the dir_contents of this ContentsExtResponse. + + DirContents contains directory listing when the path represents a directory # noqa: E501 + + :param dir_contents: The dir_contents of this ContentsExtResponse. # noqa: E501 + :type: list[ContentsResponse] + """ + + self._dir_contents = dir_contents + + @property + def file_contents(self): + """Gets the file_contents of this ContentsExtResponse. # noqa: E501 + + + :return: The file_contents of this ContentsExtResponse. # noqa: E501 + :rtype: ContentsResponse + """ + return self._file_contents + + @file_contents.setter + def file_contents(self, file_contents): + """Sets the file_contents of this ContentsExtResponse. + + + :param file_contents: The file_contents of this ContentsExtResponse. # noqa: E501 + :type: ContentsResponse + """ + + self._file_contents = file_contents + + 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(ContentsExtResponse, 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, ContentsExtResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ContentsExtResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/contents_response.py b/swagger_client/models/contents_response.py new file mode 100644 index 0000000..2b978c4 --- /dev/null +++ b/swagger_client/models/contents_response.py @@ -0,0 +1,651 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ContentsResponse(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 = { + 'links': 'FileLinksResponse', + 'content': 'str', + 'download_url': 'str', + 'encoding': 'str', + 'git_url': 'str', + 'html_url': 'str', + 'last_author_date': 'datetime', + 'last_commit_message': 'str', + 'last_commit_sha': 'str', + 'last_committer_date': 'datetime', + 'lfs_oid': 'str', + 'lfs_size': 'int', + 'name': 'str', + 'path': 'str', + 'sha': 'str', + 'size': 'int', + 'submodule_git_url': 'str', + 'target': 'str', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'links': '_links', + 'content': 'content', + 'download_url': 'download_url', + 'encoding': 'encoding', + 'git_url': 'git_url', + 'html_url': 'html_url', + 'last_author_date': 'last_author_date', + 'last_commit_message': 'last_commit_message', + 'last_commit_sha': 'last_commit_sha', + 'last_committer_date': 'last_committer_date', + 'lfs_oid': 'lfs_oid', + 'lfs_size': 'lfs_size', + 'name': 'name', + 'path': 'path', + 'sha': 'sha', + 'size': 'size', + 'submodule_git_url': 'submodule_git_url', + 'target': 'target', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, links=None, content=None, download_url=None, encoding=None, git_url=None, html_url=None, last_author_date=None, last_commit_message=None, last_commit_sha=None, last_committer_date=None, lfs_oid=None, lfs_size=None, name=None, path=None, sha=None, size=None, submodule_git_url=None, target=None, type=None, url=None, _configuration=None): # noqa: E501 + """ContentsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._links = None + self._content = None + self._download_url = None + self._encoding = None + self._git_url = None + self._html_url = None + self._last_author_date = None + self._last_commit_message = None + self._last_commit_sha = None + self._last_committer_date = None + self._lfs_oid = None + self._lfs_size = None + self._name = None + self._path = None + self._sha = None + self._size = None + self._submodule_git_url = None + self._target = None + self._type = None + self._url = None + self.discriminator = None + + if links is not None: + self.links = links + if content is not None: + self.content = content + if download_url is not None: + self.download_url = download_url + if encoding is not None: + self.encoding = encoding + if git_url is not None: + self.git_url = git_url + if html_url is not None: + self.html_url = html_url + if last_author_date is not None: + self.last_author_date = last_author_date + if last_commit_message is not None: + self.last_commit_message = last_commit_message + if last_commit_sha is not None: + self.last_commit_sha = last_commit_sha + if last_committer_date is not None: + self.last_committer_date = last_committer_date + if lfs_oid is not None: + self.lfs_oid = lfs_oid + if lfs_size is not None: + self.lfs_size = lfs_size + if name is not None: + self.name = name + if path is not None: + self.path = path + if sha is not None: + self.sha = sha + if size is not None: + self.size = size + if submodule_git_url is not None: + self.submodule_git_url = submodule_git_url + if target is not None: + self.target = target + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def links(self): + """Gets the links of this ContentsResponse. # noqa: E501 + + + :return: The links of this ContentsResponse. # noqa: E501 + :rtype: FileLinksResponse + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this ContentsResponse. + + + :param links: The links of this ContentsResponse. # noqa: E501 + :type: FileLinksResponse + """ + + self._links = links + + @property + def content(self): + """Gets the content of this ContentsResponse. # noqa: E501 + + `content` is populated when `type` is `file`, otherwise null # noqa: E501 + + :return: The content of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this ContentsResponse. + + `content` is populated when `type` is `file`, otherwise null # noqa: E501 + + :param content: The content of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def download_url(self): + """Gets the download_url of this ContentsResponse. # noqa: E501 + + DownloadURL is the direct download URL for this file # noqa: E501 + + :return: The download_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._download_url + + @download_url.setter + def download_url(self, download_url): + """Sets the download_url of this ContentsResponse. + + DownloadURL is the direct download URL for this file # noqa: E501 + + :param download_url: The download_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._download_url = download_url + + @property + def encoding(self): + """Gets the encoding of this ContentsResponse. # noqa: E501 + + `encoding` is populated when `type` is `file`, otherwise null # noqa: E501 + + :return: The encoding of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._encoding + + @encoding.setter + def encoding(self, encoding): + """Sets the encoding of this ContentsResponse. + + `encoding` is populated when `type` is `file`, otherwise null # noqa: E501 + + :param encoding: The encoding of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._encoding = encoding + + @property + def git_url(self): + """Gets the git_url of this ContentsResponse. # noqa: E501 + + GitURL is the Git API URL for this blob or tree # noqa: E501 + + :return: The git_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._git_url + + @git_url.setter + def git_url(self, git_url): + """Sets the git_url of this ContentsResponse. + + GitURL is the Git API URL for this blob or tree # noqa: E501 + + :param git_url: The git_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._git_url = git_url + + @property + def html_url(self): + """Gets the html_url of this ContentsResponse. # noqa: E501 + + HTMLURL is the web URL for this file or directory # noqa: E501 + + :return: The html_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this ContentsResponse. + + HTMLURL is the web URL for this file or directory # noqa: E501 + + :param html_url: The html_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def last_author_date(self): + """Gets the last_author_date of this ContentsResponse. # noqa: E501 + + + :return: The last_author_date of this ContentsResponse. # noqa: E501 + :rtype: datetime + """ + return self._last_author_date + + @last_author_date.setter + def last_author_date(self, last_author_date): + """Sets the last_author_date of this ContentsResponse. + + + :param last_author_date: The last_author_date of this ContentsResponse. # noqa: E501 + :type: datetime + """ + + self._last_author_date = last_author_date + + @property + def last_commit_message(self): + """Gets the last_commit_message of this ContentsResponse. # noqa: E501 + + LastCommitMessage is the message of the last commit that affected this file # noqa: E501 + + :return: The last_commit_message of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._last_commit_message + + @last_commit_message.setter + def last_commit_message(self, last_commit_message): + """Sets the last_commit_message of this ContentsResponse. + + LastCommitMessage is the message of the last commit that affected this file # noqa: E501 + + :param last_commit_message: The last_commit_message of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._last_commit_message = last_commit_message + + @property + def last_commit_sha(self): + """Gets the last_commit_sha of this ContentsResponse. # noqa: E501 + + LastCommitSHA is the SHA of the last commit that affected this file # noqa: E501 + + :return: The last_commit_sha of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._last_commit_sha + + @last_commit_sha.setter + def last_commit_sha(self, last_commit_sha): + """Sets the last_commit_sha of this ContentsResponse. + + LastCommitSHA is the SHA of the last commit that affected this file # noqa: E501 + + :param last_commit_sha: The last_commit_sha of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._last_commit_sha = last_commit_sha + + @property + def last_committer_date(self): + """Gets the last_committer_date of this ContentsResponse. # noqa: E501 + + + :return: The last_committer_date of this ContentsResponse. # noqa: E501 + :rtype: datetime + """ + return self._last_committer_date + + @last_committer_date.setter + def last_committer_date(self, last_committer_date): + """Sets the last_committer_date of this ContentsResponse. + + + :param last_committer_date: The last_committer_date of this ContentsResponse. # noqa: E501 + :type: datetime + """ + + self._last_committer_date = last_committer_date + + @property + def lfs_oid(self): + """Gets the lfs_oid of this ContentsResponse. # noqa: E501 + + LfsOid is the Git LFS object ID if this file is stored in LFS # noqa: E501 + + :return: The lfs_oid of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._lfs_oid + + @lfs_oid.setter + def lfs_oid(self, lfs_oid): + """Sets the lfs_oid of this ContentsResponse. + + LfsOid is the Git LFS object ID if this file is stored in LFS # noqa: E501 + + :param lfs_oid: The lfs_oid of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._lfs_oid = lfs_oid + + @property + def lfs_size(self): + """Gets the lfs_size of this ContentsResponse. # noqa: E501 + + LfsSize is the file size if this file is stored in LFS # noqa: E501 + + :return: The lfs_size of this ContentsResponse. # noqa: E501 + :rtype: int + """ + return self._lfs_size + + @lfs_size.setter + def lfs_size(self, lfs_size): + """Sets the lfs_size of this ContentsResponse. + + LfsSize is the file size if this file is stored in LFS # noqa: E501 + + :param lfs_size: The lfs_size of this ContentsResponse. # noqa: E501 + :type: int + """ + + self._lfs_size = lfs_size + + @property + def name(self): + """Gets the name of this ContentsResponse. # noqa: E501 + + Name is the file or directory name # noqa: E501 + + :return: The name of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ContentsResponse. + + Name is the file or directory name # noqa: E501 + + :param name: The name of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def path(self): + """Gets the path of this ContentsResponse. # noqa: E501 + + Path is the full path to the file or directory # noqa: E501 + + :return: The path of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this ContentsResponse. + + Path is the full path to the file or directory # noqa: E501 + + :param path: The path of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def sha(self): + """Gets the sha of this ContentsResponse. # noqa: E501 + + SHA is the Git blob or tree SHA # noqa: E501 + + :return: The sha of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this ContentsResponse. + + SHA is the Git blob or tree SHA # noqa: E501 + + :param sha: The sha of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def size(self): + """Gets the size of this ContentsResponse. # noqa: E501 + + Size is the file size in bytes # noqa: E501 + + :return: The size of this ContentsResponse. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this ContentsResponse. + + Size is the file size in bytes # noqa: E501 + + :param size: The size of this ContentsResponse. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def submodule_git_url(self): + """Gets the submodule_git_url of this ContentsResponse. # noqa: E501 + + `submodule_git_url` is populated when `type` is `submodule`, otherwise null # noqa: E501 + + :return: The submodule_git_url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._submodule_git_url + + @submodule_git_url.setter + def submodule_git_url(self, submodule_git_url): + """Sets the submodule_git_url of this ContentsResponse. + + `submodule_git_url` is populated when `type` is `submodule`, otherwise null # noqa: E501 + + :param submodule_git_url: The submodule_git_url of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._submodule_git_url = submodule_git_url + + @property + def target(self): + """Gets the target of this ContentsResponse. # noqa: E501 + + `target` is populated when `type` is `symlink`, otherwise null # noqa: E501 + + :return: The target of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this ContentsResponse. + + `target` is populated when `type` is `symlink`, otherwise null # noqa: E501 + + :param target: The target of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._target = target + + @property + def type(self): + """Gets the type of this ContentsResponse. # noqa: E501 + + `type` will be `file`, `dir`, `symlink`, or `submodule` # noqa: E501 + + :return: The type of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ContentsResponse. + + `type` will be `file`, `dir`, `symlink`, or `submodule` # noqa: E501 + + :param type: The type of this ContentsResponse. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this ContentsResponse. # noqa: E501 + + URL is the API URL for this file or directory # noqa: E501 + + :return: The url of this ContentsResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ContentsResponse. + + URL is the API URL for this file or directory # noqa: E501 + + :param url: The url of this ContentsResponse. # 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(ContentsResponse, 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, ContentsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ContentsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_access_token_option.py b/swagger_client/models/create_access_token_option.py new file mode 100644 index 0000000..accc6d2 --- /dev/null +++ b/swagger_client/models/create_access_token_option.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateAccessTokenOption(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', + 'scopes': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'scopes': 'scopes' + } + + def __init__(self, name=None, scopes=None, _configuration=None): # noqa: E501 + """CreateAccessTokenOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._scopes = None + self.discriminator = None + + self.name = name + if scopes is not None: + self.scopes = scopes + + @property + def name(self): + """Gets the name of this CreateAccessTokenOption. # noqa: E501 + + + :return: The name of this CreateAccessTokenOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateAccessTokenOption. + + + :param name: The name of this CreateAccessTokenOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def scopes(self): + """Gets the scopes of this CreateAccessTokenOption. # noqa: E501 + + + :return: The scopes of this CreateAccessTokenOption. # noqa: E501 + :rtype: list[str] + """ + return self._scopes + + @scopes.setter + def scopes(self, scopes): + """Sets the scopes of this CreateAccessTokenOption. + + + :param scopes: The scopes of this CreateAccessTokenOption. # noqa: E501 + :type: list[str] + """ + + self._scopes = scopes + + 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(CreateAccessTokenOption, 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, CreateAccessTokenOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateAccessTokenOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_action_workflow_dispatch.py b/swagger_client/models/create_action_workflow_dispatch.py new file mode 100644 index 0000000..7b82990 --- /dev/null +++ b/swagger_client/models/create_action_workflow_dispatch.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateActionWorkflowDispatch(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 = { + 'inputs': 'dict(str, str)', + 'ref': 'str' + } + + attribute_map = { + 'inputs': 'inputs', + 'ref': 'ref' + } + + def __init__(self, inputs=None, ref=None, _configuration=None): # noqa: E501 + """CreateActionWorkflowDispatch - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._inputs = None + self._ref = None + self.discriminator = None + + if inputs is not None: + self.inputs = inputs + self.ref = ref + + @property + def inputs(self): + """Gets the inputs of this CreateActionWorkflowDispatch. # noqa: E501 + + + :return: The inputs of this CreateActionWorkflowDispatch. # noqa: E501 + :rtype: dict(str, str) + """ + return self._inputs + + @inputs.setter + def inputs(self, inputs): + """Sets the inputs of this CreateActionWorkflowDispatch. + + + :param inputs: The inputs of this CreateActionWorkflowDispatch. # noqa: E501 + :type: dict(str, str) + """ + + self._inputs = inputs + + @property + def ref(self): + """Gets the ref of this CreateActionWorkflowDispatch. # noqa: E501 + + + :return: The ref of this CreateActionWorkflowDispatch. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this CreateActionWorkflowDispatch. + + + :param ref: The ref of this CreateActionWorkflowDispatch. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and ref is None: + raise ValueError("Invalid value for `ref`, must not be `None`") # noqa: E501 + + self._ref = ref + + 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(CreateActionWorkflowDispatch, 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, CreateActionWorkflowDispatch): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateActionWorkflowDispatch): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_branch_protection_option.py b/swagger_client/models/create_branch_protection_option.py new file mode 100644 index 0000000..d1752ce --- /dev/null +++ b/swagger_client/models/create_branch_protection_option.py @@ -0,0 +1,905 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateBranchProtectionOption(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 = { + 'approvals_whitelist_teams': 'list[str]', + 'approvals_whitelist_username': 'list[str]', + 'block_admin_merge_override': 'bool', + 'block_on_official_review_requests': 'bool', + 'block_on_outdated_branch': 'bool', + 'block_on_rejected_reviews': 'bool', + 'branch_name': 'str', + 'dismiss_stale_approvals': 'bool', + 'enable_approvals_whitelist': 'bool', + 'enable_force_push': 'bool', + 'enable_force_push_allowlist': 'bool', + 'enable_merge_whitelist': 'bool', + 'enable_push': 'bool', + 'enable_push_whitelist': 'bool', + 'enable_status_check': 'bool', + 'force_push_allowlist_deploy_keys': 'bool', + 'force_push_allowlist_teams': 'list[str]', + 'force_push_allowlist_usernames': 'list[str]', + 'ignore_stale_approvals': 'bool', + 'merge_whitelist_teams': 'list[str]', + 'merge_whitelist_usernames': 'list[str]', + 'priority': 'int', + 'protected_file_patterns': 'str', + 'push_whitelist_deploy_keys': 'bool', + 'push_whitelist_teams': 'list[str]', + 'push_whitelist_usernames': 'list[str]', + 'require_signed_commits': 'bool', + 'required_approvals': 'int', + 'rule_name': 'str', + 'status_check_contexts': 'list[str]', + 'unprotected_file_patterns': 'str' + } + + attribute_map = { + 'approvals_whitelist_teams': 'approvals_whitelist_teams', + 'approvals_whitelist_username': 'approvals_whitelist_username', + 'block_admin_merge_override': 'block_admin_merge_override', + 'block_on_official_review_requests': 'block_on_official_review_requests', + 'block_on_outdated_branch': 'block_on_outdated_branch', + 'block_on_rejected_reviews': 'block_on_rejected_reviews', + 'branch_name': 'branch_name', + 'dismiss_stale_approvals': 'dismiss_stale_approvals', + 'enable_approvals_whitelist': 'enable_approvals_whitelist', + 'enable_force_push': 'enable_force_push', + 'enable_force_push_allowlist': 'enable_force_push_allowlist', + 'enable_merge_whitelist': 'enable_merge_whitelist', + 'enable_push': 'enable_push', + 'enable_push_whitelist': 'enable_push_whitelist', + 'enable_status_check': 'enable_status_check', + 'force_push_allowlist_deploy_keys': 'force_push_allowlist_deploy_keys', + 'force_push_allowlist_teams': 'force_push_allowlist_teams', + 'force_push_allowlist_usernames': 'force_push_allowlist_usernames', + 'ignore_stale_approvals': 'ignore_stale_approvals', + 'merge_whitelist_teams': 'merge_whitelist_teams', + 'merge_whitelist_usernames': 'merge_whitelist_usernames', + 'priority': 'priority', + 'protected_file_patterns': 'protected_file_patterns', + 'push_whitelist_deploy_keys': 'push_whitelist_deploy_keys', + 'push_whitelist_teams': 'push_whitelist_teams', + 'push_whitelist_usernames': 'push_whitelist_usernames', + 'require_signed_commits': 'require_signed_commits', + 'required_approvals': 'required_approvals', + 'rule_name': 'rule_name', + 'status_check_contexts': 'status_check_contexts', + 'unprotected_file_patterns': 'unprotected_file_patterns' + } + + def __init__(self, approvals_whitelist_teams=None, approvals_whitelist_username=None, block_admin_merge_override=None, block_on_official_review_requests=None, block_on_outdated_branch=None, block_on_rejected_reviews=None, branch_name=None, dismiss_stale_approvals=None, enable_approvals_whitelist=None, enable_force_push=None, enable_force_push_allowlist=None, enable_merge_whitelist=None, enable_push=None, enable_push_whitelist=None, enable_status_check=None, force_push_allowlist_deploy_keys=None, force_push_allowlist_teams=None, force_push_allowlist_usernames=None, ignore_stale_approvals=None, merge_whitelist_teams=None, merge_whitelist_usernames=None, priority=None, protected_file_patterns=None, push_whitelist_deploy_keys=None, push_whitelist_teams=None, push_whitelist_usernames=None, require_signed_commits=None, required_approvals=None, rule_name=None, status_check_contexts=None, unprotected_file_patterns=None, _configuration=None): # noqa: E501 + """CreateBranchProtectionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._approvals_whitelist_teams = None + self._approvals_whitelist_username = None + self._block_admin_merge_override = None + self._block_on_official_review_requests = None + self._block_on_outdated_branch = None + self._block_on_rejected_reviews = None + self._branch_name = None + self._dismiss_stale_approvals = None + self._enable_approvals_whitelist = None + self._enable_force_push = None + self._enable_force_push_allowlist = None + self._enable_merge_whitelist = None + self._enable_push = None + self._enable_push_whitelist = None + self._enable_status_check = None + self._force_push_allowlist_deploy_keys = None + self._force_push_allowlist_teams = None + self._force_push_allowlist_usernames = None + self._ignore_stale_approvals = None + self._merge_whitelist_teams = None + self._merge_whitelist_usernames = None + self._priority = None + self._protected_file_patterns = None + self._push_whitelist_deploy_keys = None + self._push_whitelist_teams = None + self._push_whitelist_usernames = None + self._require_signed_commits = None + self._required_approvals = None + self._rule_name = None + self._status_check_contexts = None + self._unprotected_file_patterns = None + self.discriminator = None + + if approvals_whitelist_teams is not None: + self.approvals_whitelist_teams = approvals_whitelist_teams + if approvals_whitelist_username is not None: + self.approvals_whitelist_username = approvals_whitelist_username + if block_admin_merge_override is not None: + self.block_admin_merge_override = block_admin_merge_override + if block_on_official_review_requests is not None: + self.block_on_official_review_requests = block_on_official_review_requests + if block_on_outdated_branch is not None: + self.block_on_outdated_branch = block_on_outdated_branch + if block_on_rejected_reviews is not None: + self.block_on_rejected_reviews = block_on_rejected_reviews + if branch_name is not None: + self.branch_name = branch_name + if dismiss_stale_approvals is not None: + self.dismiss_stale_approvals = dismiss_stale_approvals + if enable_approvals_whitelist is not None: + self.enable_approvals_whitelist = enable_approvals_whitelist + if enable_force_push is not None: + self.enable_force_push = enable_force_push + if enable_force_push_allowlist is not None: + self.enable_force_push_allowlist = enable_force_push_allowlist + if enable_merge_whitelist is not None: + self.enable_merge_whitelist = enable_merge_whitelist + if enable_push is not None: + self.enable_push = enable_push + if enable_push_whitelist is not None: + self.enable_push_whitelist = enable_push_whitelist + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if force_push_allowlist_deploy_keys is not None: + self.force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + if force_push_allowlist_teams is not None: + self.force_push_allowlist_teams = force_push_allowlist_teams + if force_push_allowlist_usernames is not None: + self.force_push_allowlist_usernames = force_push_allowlist_usernames + if ignore_stale_approvals is not None: + self.ignore_stale_approvals = ignore_stale_approvals + if merge_whitelist_teams is not None: + self.merge_whitelist_teams = merge_whitelist_teams + if merge_whitelist_usernames is not None: + self.merge_whitelist_usernames = merge_whitelist_usernames + if priority is not None: + self.priority = priority + if protected_file_patterns is not None: + self.protected_file_patterns = protected_file_patterns + if push_whitelist_deploy_keys is not None: + self.push_whitelist_deploy_keys = push_whitelist_deploy_keys + if push_whitelist_teams is not None: + self.push_whitelist_teams = push_whitelist_teams + if push_whitelist_usernames is not None: + self.push_whitelist_usernames = push_whitelist_usernames + if require_signed_commits is not None: + self.require_signed_commits = require_signed_commits + if required_approvals is not None: + self.required_approvals = required_approvals + if rule_name is not None: + self.rule_name = rule_name + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if unprotected_file_patterns is not None: + self.unprotected_file_patterns = unprotected_file_patterns + + @property + def approvals_whitelist_teams(self): + """Gets the approvals_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_teams + + @approvals_whitelist_teams.setter + def approvals_whitelist_teams(self, approvals_whitelist_teams): + """Sets the approvals_whitelist_teams of this CreateBranchProtectionOption. + + + :param approvals_whitelist_teams: The approvals_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_teams = approvals_whitelist_teams + + @property + def approvals_whitelist_username(self): + """Gets the approvals_whitelist_username of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_username of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_username + + @approvals_whitelist_username.setter + def approvals_whitelist_username(self, approvals_whitelist_username): + """Sets the approvals_whitelist_username of this CreateBranchProtectionOption. + + + :param approvals_whitelist_username: The approvals_whitelist_username of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_username = approvals_whitelist_username + + @property + def block_admin_merge_override(self): + """Gets the block_admin_merge_override of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_admin_merge_override of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_admin_merge_override + + @block_admin_merge_override.setter + def block_admin_merge_override(self, block_admin_merge_override): + """Sets the block_admin_merge_override of this CreateBranchProtectionOption. + + + :param block_admin_merge_override: The block_admin_merge_override of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_admin_merge_override = block_admin_merge_override + + @property + def block_on_official_review_requests(self): + """Gets the block_on_official_review_requests of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_on_official_review_requests of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_official_review_requests + + @block_on_official_review_requests.setter + def block_on_official_review_requests(self, block_on_official_review_requests): + """Sets the block_on_official_review_requests of this CreateBranchProtectionOption. + + + :param block_on_official_review_requests: The block_on_official_review_requests of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_official_review_requests = block_on_official_review_requests + + @property + def block_on_outdated_branch(self): + """Gets the block_on_outdated_branch of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_on_outdated_branch of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_outdated_branch + + @block_on_outdated_branch.setter + def block_on_outdated_branch(self, block_on_outdated_branch): + """Sets the block_on_outdated_branch of this CreateBranchProtectionOption. + + + :param block_on_outdated_branch: The block_on_outdated_branch of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_outdated_branch = block_on_outdated_branch + + @property + def block_on_rejected_reviews(self): + """Gets the block_on_rejected_reviews of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_on_rejected_reviews of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_rejected_reviews + + @block_on_rejected_reviews.setter + def block_on_rejected_reviews(self, block_on_rejected_reviews): + """Sets the block_on_rejected_reviews of this CreateBranchProtectionOption. + + + :param block_on_rejected_reviews: The block_on_rejected_reviews of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_rejected_reviews = block_on_rejected_reviews + + @property + def branch_name(self): + """Gets the branch_name of this CreateBranchProtectionOption. # noqa: E501 + + Deprecated: true # noqa: E501 + + :return: The branch_name of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._branch_name + + @branch_name.setter + def branch_name(self, branch_name): + """Sets the branch_name of this CreateBranchProtectionOption. + + Deprecated: true # noqa: E501 + + :param branch_name: The branch_name of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._branch_name = branch_name + + @property + def dismiss_stale_approvals(self): + """Gets the dismiss_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The dismiss_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._dismiss_stale_approvals + + @dismiss_stale_approvals.setter + def dismiss_stale_approvals(self, dismiss_stale_approvals): + """Sets the dismiss_stale_approvals of this CreateBranchProtectionOption. + + + :param dismiss_stale_approvals: The dismiss_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._dismiss_stale_approvals = dismiss_stale_approvals + + @property + def enable_approvals_whitelist(self): + """Gets the enable_approvals_whitelist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_approvals_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_approvals_whitelist + + @enable_approvals_whitelist.setter + def enable_approvals_whitelist(self, enable_approvals_whitelist): + """Sets the enable_approvals_whitelist of this CreateBranchProtectionOption. + + + :param enable_approvals_whitelist: The enable_approvals_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_approvals_whitelist = enable_approvals_whitelist + + @property + def enable_force_push(self): + """Gets the enable_force_push of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_force_push of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push + + @enable_force_push.setter + def enable_force_push(self, enable_force_push): + """Sets the enable_force_push of this CreateBranchProtectionOption. + + + :param enable_force_push: The enable_force_push of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_force_push = enable_force_push + + @property + def enable_force_push_allowlist(self): + """Gets the enable_force_push_allowlist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_force_push_allowlist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push_allowlist + + @enable_force_push_allowlist.setter + def enable_force_push_allowlist(self, enable_force_push_allowlist): + """Sets the enable_force_push_allowlist of this CreateBranchProtectionOption. + + + :param enable_force_push_allowlist: The enable_force_push_allowlist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_force_push_allowlist = enable_force_push_allowlist + + @property + def enable_merge_whitelist(self): + """Gets the enable_merge_whitelist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_merge_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_merge_whitelist + + @enable_merge_whitelist.setter + def enable_merge_whitelist(self, enable_merge_whitelist): + """Sets the enable_merge_whitelist of this CreateBranchProtectionOption. + + + :param enable_merge_whitelist: The enable_merge_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_merge_whitelist = enable_merge_whitelist + + @property + def enable_push(self): + """Gets the enable_push of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_push of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push + + @enable_push.setter + def enable_push(self, enable_push): + """Sets the enable_push of this CreateBranchProtectionOption. + + + :param enable_push: The enable_push of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push = enable_push + + @property + def enable_push_whitelist(self): + """Gets the enable_push_whitelist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_push_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push_whitelist + + @enable_push_whitelist.setter + def enable_push_whitelist(self, enable_push_whitelist): + """Sets the enable_push_whitelist of this CreateBranchProtectionOption. + + + :param enable_push_whitelist: The enable_push_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push_whitelist = enable_push_whitelist + + @property + def enable_status_check(self): + """Gets the enable_status_check of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_status_check of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this CreateBranchProtectionOption. + + + :param enable_status_check: The enable_status_check of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def force_push_allowlist_deploy_keys(self): + """Gets the force_push_allowlist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._force_push_allowlist_deploy_keys + + @force_push_allowlist_deploy_keys.setter + def force_push_allowlist_deploy_keys(self, force_push_allowlist_deploy_keys): + """Sets the force_push_allowlist_deploy_keys of this CreateBranchProtectionOption. + + + :param force_push_allowlist_deploy_keys: The force_push_allowlist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + + @property + def force_push_allowlist_teams(self): + """Gets the force_push_allowlist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_teams + + @force_push_allowlist_teams.setter + def force_push_allowlist_teams(self, force_push_allowlist_teams): + """Sets the force_push_allowlist_teams of this CreateBranchProtectionOption. + + + :param force_push_allowlist_teams: The force_push_allowlist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_teams = force_push_allowlist_teams + + @property + def force_push_allowlist_usernames(self): + """Gets the force_push_allowlist_usernames of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_usernames + + @force_push_allowlist_usernames.setter + def force_push_allowlist_usernames(self, force_push_allowlist_usernames): + """Sets the force_push_allowlist_usernames of this CreateBranchProtectionOption. + + + :param force_push_allowlist_usernames: The force_push_allowlist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_usernames = force_push_allowlist_usernames + + @property + def ignore_stale_approvals(self): + """Gets the ignore_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The ignore_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._ignore_stale_approvals + + @ignore_stale_approvals.setter + def ignore_stale_approvals(self, ignore_stale_approvals): + """Sets the ignore_stale_approvals of this CreateBranchProtectionOption. + + + :param ignore_stale_approvals: The ignore_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._ignore_stale_approvals = ignore_stale_approvals + + @property + def merge_whitelist_teams(self): + """Gets the merge_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_teams + + @merge_whitelist_teams.setter + def merge_whitelist_teams(self, merge_whitelist_teams): + """Sets the merge_whitelist_teams of this CreateBranchProtectionOption. + + + :param merge_whitelist_teams: The merge_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_teams = merge_whitelist_teams + + @property + def merge_whitelist_usernames(self): + """Gets the merge_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_usernames + + @merge_whitelist_usernames.setter + def merge_whitelist_usernames(self, merge_whitelist_usernames): + """Sets the merge_whitelist_usernames of this CreateBranchProtectionOption. + + + :param merge_whitelist_usernames: The merge_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_usernames = merge_whitelist_usernames + + @property + def priority(self): + """Gets the priority of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The priority of this CreateBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this CreateBranchProtectionOption. + + + :param priority: The priority of this CreateBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._priority = priority + + @property + def protected_file_patterns(self): + """Gets the protected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The protected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._protected_file_patterns + + @protected_file_patterns.setter + def protected_file_patterns(self, protected_file_patterns): + """Sets the protected_file_patterns of this CreateBranchProtectionOption. + + + :param protected_file_patterns: The protected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._protected_file_patterns = protected_file_patterns + + @property + def push_whitelist_deploy_keys(self): + """Gets the push_whitelist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._push_whitelist_deploy_keys + + @push_whitelist_deploy_keys.setter + def push_whitelist_deploy_keys(self, push_whitelist_deploy_keys): + """Sets the push_whitelist_deploy_keys of this CreateBranchProtectionOption. + + + :param push_whitelist_deploy_keys: The push_whitelist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._push_whitelist_deploy_keys = push_whitelist_deploy_keys + + @property + def push_whitelist_teams(self): + """Gets the push_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_teams + + @push_whitelist_teams.setter + def push_whitelist_teams(self, push_whitelist_teams): + """Sets the push_whitelist_teams of this CreateBranchProtectionOption. + + + :param push_whitelist_teams: The push_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_teams = push_whitelist_teams + + @property + def push_whitelist_usernames(self): + """Gets the push_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_usernames + + @push_whitelist_usernames.setter + def push_whitelist_usernames(self, push_whitelist_usernames): + """Sets the push_whitelist_usernames of this CreateBranchProtectionOption. + + + :param push_whitelist_usernames: The push_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_usernames = push_whitelist_usernames + + @property + def require_signed_commits(self): + """Gets the require_signed_commits of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The require_signed_commits of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._require_signed_commits + + @require_signed_commits.setter + def require_signed_commits(self, require_signed_commits): + """Sets the require_signed_commits of this CreateBranchProtectionOption. + + + :param require_signed_commits: The require_signed_commits of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._require_signed_commits = require_signed_commits + + @property + def required_approvals(self): + """Gets the required_approvals of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The required_approvals of this CreateBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this CreateBranchProtectionOption. + + + :param required_approvals: The required_approvals of this CreateBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def rule_name(self): + """Gets the rule_name of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The rule_name of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._rule_name + + @rule_name.setter + def rule_name(self, rule_name): + """Sets the rule_name of this CreateBranchProtectionOption. + + + :param rule_name: The rule_name of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._rule_name = rule_name + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The status_check_contexts of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this CreateBranchProtectionOption. + + + :param status_check_contexts: The status_check_contexts of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def unprotected_file_patterns(self): + """Gets the unprotected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The unprotected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._unprotected_file_patterns + + @unprotected_file_patterns.setter + def unprotected_file_patterns(self, unprotected_file_patterns): + """Sets the unprotected_file_patterns of this CreateBranchProtectionOption. + + + :param unprotected_file_patterns: The unprotected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._unprotected_file_patterns = unprotected_file_patterns + + 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(CreateBranchProtectionOption, 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, CreateBranchProtectionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateBranchProtectionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_branch_repo_option.py b/swagger_client/models/create_branch_repo_option.py new file mode 100644 index 0000000..d6c4e75 --- /dev/null +++ b/swagger_client/models/create_branch_repo_option.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateBranchRepoOption(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 = { + 'new_branch_name': 'str', + 'old_branch_name': 'str', + 'old_ref_name': 'str' + } + + attribute_map = { + 'new_branch_name': 'new_branch_name', + 'old_branch_name': 'old_branch_name', + 'old_ref_name': 'old_ref_name' + } + + def __init__(self, new_branch_name=None, old_branch_name=None, old_ref_name=None, _configuration=None): # noqa: E501 + """CreateBranchRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._new_branch_name = None + self._old_branch_name = None + self._old_ref_name = None + self.discriminator = None + + self.new_branch_name = new_branch_name + if old_branch_name is not None: + self.old_branch_name = old_branch_name + if old_ref_name is not None: + self.old_ref_name = old_ref_name + + @property + def new_branch_name(self): + """Gets the new_branch_name of this CreateBranchRepoOption. # noqa: E501 + + Name of the branch to create # noqa: E501 + + :return: The new_branch_name of this CreateBranchRepoOption. # noqa: E501 + :rtype: str + """ + return self._new_branch_name + + @new_branch_name.setter + def new_branch_name(self, new_branch_name): + """Sets the new_branch_name of this CreateBranchRepoOption. + + Name of the branch to create # noqa: E501 + + :param new_branch_name: The new_branch_name of this CreateBranchRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and new_branch_name is None: + raise ValueError("Invalid value for `new_branch_name`, must not be `None`") # noqa: E501 + + self._new_branch_name = new_branch_name + + @property + def old_branch_name(self): + """Gets the old_branch_name of this CreateBranchRepoOption. # noqa: E501 + + Deprecated: true Name of the old branch to create from # noqa: E501 + + :return: The old_branch_name of this CreateBranchRepoOption. # noqa: E501 + :rtype: str + """ + return self._old_branch_name + + @old_branch_name.setter + def old_branch_name(self, old_branch_name): + """Sets the old_branch_name of this CreateBranchRepoOption. + + Deprecated: true Name of the old branch to create from # noqa: E501 + + :param old_branch_name: The old_branch_name of this CreateBranchRepoOption. # noqa: E501 + :type: str + """ + + self._old_branch_name = old_branch_name + + @property + def old_ref_name(self): + """Gets the old_ref_name of this CreateBranchRepoOption. # noqa: E501 + + Name of the old branch/tag/commit to create from # noqa: E501 + + :return: The old_ref_name of this CreateBranchRepoOption. # noqa: E501 + :rtype: str + """ + return self._old_ref_name + + @old_ref_name.setter + def old_ref_name(self, old_ref_name): + """Sets the old_ref_name of this CreateBranchRepoOption. + + Name of the old branch/tag/commit to create from # noqa: E501 + + :param old_ref_name: The old_ref_name of this CreateBranchRepoOption. # noqa: E501 + :type: str + """ + + self._old_ref_name = old_ref_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(CreateBranchRepoOption, 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, CreateBranchRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateBranchRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_email_option.py b/swagger_client/models/create_email_option.py new file mode 100644 index 0000000..f7b1256 --- /dev/null +++ b/swagger_client/models/create_email_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateEmailOption(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 = { + 'emails': 'list[str]' + } + + attribute_map = { + 'emails': 'emails' + } + + def __init__(self, emails=None, _configuration=None): # noqa: E501 + """CreateEmailOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._emails = None + self.discriminator = None + + if emails is not None: + self.emails = emails + + @property + def emails(self): + """Gets the emails of this CreateEmailOption. # noqa: E501 + + email addresses to add # noqa: E501 + + :return: The emails of this CreateEmailOption. # noqa: E501 + :rtype: list[str] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this CreateEmailOption. + + email addresses to add # noqa: E501 + + :param emails: The emails of this CreateEmailOption. # noqa: E501 + :type: list[str] + """ + + self._emails = emails + + 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(CreateEmailOption, 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, CreateEmailOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateEmailOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_file_options.py b/swagger_client/models/create_file_options.py new file mode 100644 index 0000000..be332c4 --- /dev/null +++ b/swagger_client/models/create_file_options.py @@ -0,0 +1,316 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateFileOptions(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 = { + 'author': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'content': 'str', + 'dates': 'CommitDateOptions', + 'message': 'str', + 'new_branch': 'str', + 'signoff': 'bool' + } + + attribute_map = { + 'author': 'author', + 'branch': 'branch', + 'committer': 'committer', + 'content': 'content', + 'dates': 'dates', + 'message': 'message', + 'new_branch': 'new_branch', + 'signoff': 'signoff' + } + + def __init__(self, author=None, branch=None, committer=None, content=None, dates=None, message=None, new_branch=None, signoff=None, _configuration=None): # noqa: E501 + """CreateFileOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._branch = None + self._committer = None + self._content = None + self._dates = None + self._message = None + self._new_branch = None + self._signoff = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + if committer is not None: + self.committer = committer + self.content = content + if dates is not None: + self.dates = dates + if message is not None: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + if signoff is not None: + self.signoff = signoff + + @property + def author(self): + """Gets the author of this CreateFileOptions. # noqa: E501 + + + :return: The author of this CreateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this CreateFileOptions. + + + :param author: The author of this CreateFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this CreateFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this CreateFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this CreateFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this CreateFileOptions. # noqa: E501 + + + :return: The committer of this CreateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this CreateFileOptions. + + + :param committer: The committer of this CreateFileOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def content(self): + """Gets the content of this CreateFileOptions. # noqa: E501 + + content must be base64 encoded # noqa: E501 + + :return: The content of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this CreateFileOptions. + + content must be base64 encoded # noqa: E501 + + :param content: The content of this CreateFileOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and content is None: + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def dates(self): + """Gets the dates of this CreateFileOptions. # noqa: E501 + + + :return: The dates of this CreateFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this CreateFileOptions. + + + :param dates: The dates of this CreateFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + + @property + def message(self): + """Gets the message of this CreateFileOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CreateFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this CreateFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this CreateFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this CreateFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this CreateFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this CreateFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def signoff(self): + """Gets the signoff of this CreateFileOptions. # noqa: E501 + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :return: The signoff of this CreateFileOptions. # noqa: E501 + :rtype: bool + """ + return self._signoff + + @signoff.setter + def signoff(self, signoff): + """Sets the signoff of this CreateFileOptions. + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :param signoff: The signoff of this CreateFileOptions. # noqa: E501 + :type: bool + """ + + self._signoff = signoff + + 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(CreateFileOptions, 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, CreateFileOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateFileOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_fork_option.py b/swagger_client/models/create_fork_option.py new file mode 100644 index 0000000..71b893a --- /dev/null +++ b/swagger_client/models/create_fork_option.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateForkOption(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', + 'organization': 'str' + } + + attribute_map = { + 'name': 'name', + 'organization': 'organization' + } + + def __init__(self, name=None, organization=None, _configuration=None): # noqa: E501 + """CreateForkOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._organization = None + self.discriminator = None + + if name is not None: + self.name = name + if organization is not None: + self.organization = organization + + @property + def name(self): + """Gets the name of this CreateForkOption. # noqa: E501 + + name of the forked repository # noqa: E501 + + :return: The name of this CreateForkOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateForkOption. + + name of the forked repository # noqa: E501 + + :param name: The name of this CreateForkOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def organization(self): + """Gets the organization of this CreateForkOption. # noqa: E501 + + organization name, if forking into an organization # noqa: E501 + + :return: The organization of this CreateForkOption. # noqa: E501 + :rtype: str + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this CreateForkOption. + + organization name, if forking into an organization # noqa: E501 + + :param organization: The organization of this CreateForkOption. # noqa: E501 + :type: str + """ + + self._organization = organization + + 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(CreateForkOption, 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, CreateForkOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateForkOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_gpg_key_option.py b/swagger_client/models/create_gpg_key_option.py new file mode 100644 index 0000000..15d0317 --- /dev/null +++ b/swagger_client/models/create_gpg_key_option.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateGPGKeyOption(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 = { + 'armored_public_key': 'str', + 'armored_signature': 'str' + } + + attribute_map = { + 'armored_public_key': 'armored_public_key', + 'armored_signature': 'armored_signature' + } + + def __init__(self, armored_public_key=None, armored_signature=None, _configuration=None): # noqa: E501 + """CreateGPGKeyOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._armored_public_key = None + self._armored_signature = None + self.discriminator = None + + self.armored_public_key = armored_public_key + if armored_signature is not None: + self.armored_signature = armored_signature + + @property + def armored_public_key(self): + """Gets the armored_public_key of this CreateGPGKeyOption. # noqa: E501 + + An armored GPG key to add # noqa: E501 + + :return: The armored_public_key of this CreateGPGKeyOption. # noqa: E501 + :rtype: str + """ + return self._armored_public_key + + @armored_public_key.setter + def armored_public_key(self, armored_public_key): + """Sets the armored_public_key of this CreateGPGKeyOption. + + An armored GPG key to add # noqa: E501 + + :param armored_public_key: The armored_public_key of this CreateGPGKeyOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and armored_public_key is None: + raise ValueError("Invalid value for `armored_public_key`, must not be `None`") # noqa: E501 + + self._armored_public_key = armored_public_key + + @property + def armored_signature(self): + """Gets the armored_signature of this CreateGPGKeyOption. # noqa: E501 + + An optional armored signature for the GPG key # noqa: E501 + + :return: The armored_signature of this CreateGPGKeyOption. # noqa: E501 + :rtype: str + """ + return self._armored_signature + + @armored_signature.setter + def armored_signature(self, armored_signature): + """Sets the armored_signature of this CreateGPGKeyOption. + + An optional armored signature for the GPG key # noqa: E501 + + :param armored_signature: The armored_signature of this CreateGPGKeyOption. # noqa: E501 + :type: str + """ + + self._armored_signature = armored_signature + + 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(CreateGPGKeyOption, 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, CreateGPGKeyOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateGPGKeyOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_hook_option.py b/swagger_client/models/create_hook_option.py new file mode 100644 index 0000000..392fc00 --- /dev/null +++ b/swagger_client/models/create_hook_option.py @@ -0,0 +1,268 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateHookOption(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 = { + 'active': 'bool', + 'authorization_header': 'str', + 'branch_filter': 'str', + 'config': 'CreateHookOptionConfig', + 'events': 'list[str]', + 'type': 'str' + } + + attribute_map = { + 'active': 'active', + 'authorization_header': 'authorization_header', + 'branch_filter': 'branch_filter', + 'config': 'config', + 'events': 'events', + 'type': 'type' + } + + def __init__(self, active=False, authorization_header=None, branch_filter=None, config=None, events=None, type=None, _configuration=None): # noqa: E501 + """CreateHookOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._authorization_header = None + self._branch_filter = None + self._config = None + self._events = None + self._type = None + self.discriminator = None + + if active is not None: + self.active = active + if authorization_header is not None: + self.authorization_header = authorization_header + if branch_filter is not None: + self.branch_filter = branch_filter + self.config = config + if events is not None: + self.events = events + self.type = type + + @property + def active(self): + """Gets the active of this CreateHookOption. # noqa: E501 + + + :return: The active of this CreateHookOption. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this CreateHookOption. + + + :param active: The active of this CreateHookOption. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def authorization_header(self): + """Gets the authorization_header of this CreateHookOption. # noqa: E501 + + Authorization header to include in webhook requests # noqa: E501 + + :return: The authorization_header of this CreateHookOption. # noqa: E501 + :rtype: str + """ + return self._authorization_header + + @authorization_header.setter + def authorization_header(self, authorization_header): + """Sets the authorization_header of this CreateHookOption. + + Authorization header to include in webhook requests # noqa: E501 + + :param authorization_header: The authorization_header of this CreateHookOption. # noqa: E501 + :type: str + """ + + self._authorization_header = authorization_header + + @property + def branch_filter(self): + """Gets the branch_filter of this CreateHookOption. # noqa: E501 + + Branch filter pattern to determine which branches trigger the webhook # noqa: E501 + + :return: The branch_filter of this CreateHookOption. # noqa: E501 + :rtype: str + """ + return self._branch_filter + + @branch_filter.setter + def branch_filter(self, branch_filter): + """Sets the branch_filter of this CreateHookOption. + + Branch filter pattern to determine which branches trigger the webhook # noqa: E501 + + :param branch_filter: The branch_filter of this CreateHookOption. # noqa: E501 + :type: str + """ + + self._branch_filter = branch_filter + + @property + def config(self): + """Gets the config of this CreateHookOption. # noqa: E501 + + + :return: The config of this CreateHookOption. # noqa: E501 + :rtype: CreateHookOptionConfig + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this CreateHookOption. + + + :param config: The config of this CreateHookOption. # noqa: E501 + :type: CreateHookOptionConfig + """ + if self._configuration.client_side_validation and config is None: + raise ValueError("Invalid value for `config`, must not be `None`") # noqa: E501 + + self._config = config + + @property + def events(self): + """Gets the events of this CreateHookOption. # noqa: E501 + + List of events that will trigger this webhook # noqa: E501 + + :return: The events of this CreateHookOption. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this CreateHookOption. + + List of events that will trigger this webhook # noqa: E501 + + :param events: The events of this CreateHookOption. # noqa: E501 + :type: list[str] + """ + + self._events = events + + @property + def type(self): + """Gets the type of this CreateHookOption. # noqa: E501 + + + :return: The type of this CreateHookOption. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CreateHookOption. + + + :param type: The type of this CreateHookOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["dingtalk", "discord", "gitea", "gogs", "msteams", "slack", "telegram", "feishu", "wechatwork", "packagist"] # noqa: E501 + if (self._configuration.client_side_validation and + type not in allowed_values): + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + 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(CreateHookOption, 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, CreateHookOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateHookOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_hook_option_config.py b/swagger_client/models/create_hook_option_config.py new file mode 100644 index 0000000..1675d0e --- /dev/null +++ b/swagger_client/models/create_hook_option_config.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateHookOptionConfig(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, _configuration=None): # noqa: E501 + """CreateHookOptionConfig - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(CreateHookOptionConfig, 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, CreateHookOptionConfig): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateHookOptionConfig): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_issue_comment_option.py b/swagger_client/models/create_issue_comment_option.py new file mode 100644 index 0000000..8018714 --- /dev/null +++ b/swagger_client/models/create_issue_comment_option.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateIssueCommentOption(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 = { + 'body': 'str' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None, _configuration=None): # noqa: E501 + """CreateIssueCommentOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self.discriminator = None + + self.body = body + + @property + def body(self): + """Gets the body of this CreateIssueCommentOption. # noqa: E501 + + + :return: The body of this CreateIssueCommentOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateIssueCommentOption. + + + :param body: The body of this CreateIssueCommentOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and body is None: + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + 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(CreateIssueCommentOption, 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, CreateIssueCommentOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateIssueCommentOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_issue_option.py b/swagger_client/models/create_issue_option.py new file mode 100644 index 0000000..e1ce152 --- /dev/null +++ b/swagger_client/models/create_issue_option.py @@ -0,0 +1,338 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateIssueOption(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 = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'body': 'str', + 'closed': 'bool', + 'due_date': 'datetime', + 'labels': 'list[int]', + 'milestone': 'int', + 'ref': 'str', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'closed': 'closed', + 'due_date': 'due_date', + 'labels': 'labels', + 'milestone': 'milestone', + 'ref': 'ref', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, body=None, closed=None, due_date=None, labels=None, milestone=None, ref=None, title=None, _configuration=None): # noqa: E501 + """CreateIssueOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assignee = None + self._assignees = None + self._body = None + self._closed = None + self._due_date = None + self._labels = None + self._milestone = None + self._ref = None + self._title = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if closed is not None: + self.closed = closed + if due_date is not None: + self.due_date = due_date + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if ref is not None: + self.ref = ref + self.title = title + + @property + def assignee(self): + """Gets the assignee of this CreateIssueOption. # noqa: E501 + + deprecated # noqa: E501 + + :return: The assignee of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this CreateIssueOption. + + deprecated # noqa: E501 + + :param assignee: The assignee of this CreateIssueOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this CreateIssueOption. # noqa: E501 + + + :return: The assignees of this CreateIssueOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this CreateIssueOption. + + + :param assignees: The assignees of this CreateIssueOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this CreateIssueOption. # noqa: E501 + + + :return: The body of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateIssueOption. + + + :param body: The body of this CreateIssueOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def closed(self): + """Gets the closed of this CreateIssueOption. # noqa: E501 + + + :return: The closed of this CreateIssueOption. # noqa: E501 + :rtype: bool + """ + return self._closed + + @closed.setter + def closed(self, closed): + """Sets the closed of this CreateIssueOption. + + + :param closed: The closed of this CreateIssueOption. # noqa: E501 + :type: bool + """ + + self._closed = closed + + @property + def due_date(self): + """Gets the due_date of this CreateIssueOption. # noqa: E501 + + + :return: The due_date of this CreateIssueOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this CreateIssueOption. + + + :param due_date: The due_date of this CreateIssueOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def labels(self): + """Gets the labels of this CreateIssueOption. # noqa: E501 + + list of label ids # noqa: E501 + + :return: The labels of this CreateIssueOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this CreateIssueOption. + + list of label ids # noqa: E501 + + :param labels: The labels of this CreateIssueOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this CreateIssueOption. # noqa: E501 + + milestone id # noqa: E501 + + :return: The milestone of this CreateIssueOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this CreateIssueOption. + + milestone id # noqa: E501 + + :param milestone: The milestone of this CreateIssueOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def ref(self): + """Gets the ref of this CreateIssueOption. # noqa: E501 + + + :return: The ref of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this CreateIssueOption. + + + :param ref: The ref of this CreateIssueOption. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def title(self): + """Gets the title of this CreateIssueOption. # noqa: E501 + + + :return: The title of this CreateIssueOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateIssueOption. + + + :param title: The title of this CreateIssueOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and title is None: + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 + + self._title = title + + 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(CreateIssueOption, 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, CreateIssueOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateIssueOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_key_option.py b/swagger_client/models/create_key_option.py new file mode 100644 index 0000000..020a05f --- /dev/null +++ b/swagger_client/models/create_key_option.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateKeyOption(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 = { + 'key': 'str', + 'read_only': 'bool', + 'title': 'str' + } + + attribute_map = { + 'key': 'key', + 'read_only': 'read_only', + 'title': 'title' + } + + def __init__(self, key=None, read_only=None, title=None, _configuration=None): # noqa: E501 + """CreateKeyOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._key = None + self._read_only = None + self._title = None + self.discriminator = None + + self.key = key + if read_only is not None: + self.read_only = read_only + self.title = title + + @property + def key(self): + """Gets the key of this CreateKeyOption. # noqa: E501 + + An armored SSH key to add # noqa: E501 + + :return: The key of this CreateKeyOption. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this CreateKeyOption. + + An armored SSH key to add # noqa: E501 + + :param key: The key of this CreateKeyOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and key is None: + raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 + + self._key = key + + @property + def read_only(self): + """Gets the read_only of this CreateKeyOption. # noqa: E501 + + Describe if the key has only read access or read/write # noqa: E501 + + :return: The read_only of this CreateKeyOption. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this CreateKeyOption. + + Describe if the key has only read access or read/write # noqa: E501 + + :param read_only: The read_only of this CreateKeyOption. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def title(self): + """Gets the title of this CreateKeyOption. # noqa: E501 + + Title of the key to add # noqa: E501 + + :return: The title of this CreateKeyOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateKeyOption. + + Title of the key to add # noqa: E501 + + :param title: The title of this CreateKeyOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and title is None: + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 + + self._title = title + + 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(CreateKeyOption, 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, CreateKeyOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateKeyOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_label_option.py b/swagger_client/models/create_label_option.py new file mode 100644 index 0000000..89da841 --- /dev/null +++ b/swagger_client/models/create_label_option.py @@ -0,0 +1,231 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateLabelOption(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 = { + 'color': 'str', + 'description': 'str', + 'exclusive': 'bool', + 'is_archived': 'bool', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'exclusive': 'exclusive', + 'is_archived': 'is_archived', + 'name': 'name' + } + + def __init__(self, color=None, description=None, exclusive=None, is_archived=None, name=None, _configuration=None): # noqa: E501 + """CreateLabelOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._color = None + self._description = None + self._exclusive = None + self._is_archived = None + self._name = None + self.discriminator = None + + self.color = color + if description is not None: + self.description = description + if exclusive is not None: + self.exclusive = exclusive + if is_archived is not None: + self.is_archived = is_archived + self.name = name + + @property + def color(self): + """Gets the color of this CreateLabelOption. # noqa: E501 + + + :return: The color of this CreateLabelOption. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this CreateLabelOption. + + + :param color: The color of this CreateLabelOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and color is None: + raise ValueError("Invalid value for `color`, must not be `None`") # noqa: E501 + + self._color = color + + @property + def description(self): + """Gets the description of this CreateLabelOption. # noqa: E501 + + Description provides additional context about the label's purpose # noqa: E501 + + :return: The description of this CreateLabelOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateLabelOption. + + Description provides additional context about the label's purpose # noqa: E501 + + :param description: The description of this CreateLabelOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def exclusive(self): + """Gets the exclusive of this CreateLabelOption. # noqa: E501 + + + :return: The exclusive of this CreateLabelOption. # noqa: E501 + :rtype: bool + """ + return self._exclusive + + @exclusive.setter + def exclusive(self, exclusive): + """Sets the exclusive of this CreateLabelOption. + + + :param exclusive: The exclusive of this CreateLabelOption. # noqa: E501 + :type: bool + """ + + self._exclusive = exclusive + + @property + def is_archived(self): + """Gets the is_archived of this CreateLabelOption. # noqa: E501 + + + :return: The is_archived of this CreateLabelOption. # noqa: E501 + :rtype: bool + """ + return self._is_archived + + @is_archived.setter + def is_archived(self, is_archived): + """Sets the is_archived of this CreateLabelOption. + + + :param is_archived: The is_archived of this CreateLabelOption. # noqa: E501 + :type: bool + """ + + self._is_archived = is_archived + + @property + def name(self): + """Gets the name of this CreateLabelOption. # noqa: E501 + + + :return: The name of this CreateLabelOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateLabelOption. + + + :param name: The name of this CreateLabelOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + 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(CreateLabelOption, 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, CreateLabelOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateLabelOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_milestone_option.py b/swagger_client/models/create_milestone_option.py new file mode 100644 index 0000000..d33a6a4 --- /dev/null +++ b/swagger_client/models/create_milestone_option.py @@ -0,0 +1,212 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateMilestoneOption(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', + 'due_on': 'datetime', + 'state': 'str', + 'title': 'str' + } + + attribute_map = { + 'description': 'description', + 'due_on': 'due_on', + 'state': 'state', + 'title': 'title' + } + + def __init__(self, description=None, due_on=None, state=None, title=None, _configuration=None): # noqa: E501 + """CreateMilestoneOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._due_on = None + self._state = None + self._title = None + self.discriminator = None + + if description is not None: + self.description = description + if due_on is not None: + self.due_on = due_on + if state is not None: + self.state = state + if title is not None: + self.title = title + + @property + def description(self): + """Gets the description of this CreateMilestoneOption. # noqa: E501 + + Description provides details about the milestone # noqa: E501 + + :return: The description of this CreateMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateMilestoneOption. + + Description provides details about the milestone # noqa: E501 + + :param description: The description of this CreateMilestoneOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def due_on(self): + """Gets the due_on of this CreateMilestoneOption. # noqa: E501 + + + :return: The due_on of this CreateMilestoneOption. # noqa: E501 + :rtype: datetime + """ + return self._due_on + + @due_on.setter + def due_on(self, due_on): + """Sets the due_on of this CreateMilestoneOption. + + + :param due_on: The due_on of this CreateMilestoneOption. # noqa: E501 + :type: datetime + """ + + self._due_on = due_on + + @property + def state(self): + """Gets the state of this CreateMilestoneOption. # noqa: E501 + + + :return: The state of this CreateMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this CreateMilestoneOption. + + + :param state: The state of this CreateMilestoneOption. # noqa: E501 + :type: str + """ + allowed_values = ["open", "closed"] # noqa: E501 + if (self._configuration.client_side_validation and + state not in allowed_values): + raise ValueError( + "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 + .format(state, allowed_values) + ) + + self._state = state + + @property + def title(self): + """Gets the title of this CreateMilestoneOption. # noqa: E501 + + Title is the title of the new milestone # noqa: E501 + + :return: The title of this CreateMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateMilestoneOption. + + Title is the title of the new milestone # noqa: E501 + + :param title: The title of this CreateMilestoneOption. # noqa: E501 + :type: str + """ + + self._title = title + + 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(CreateMilestoneOption, 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, CreateMilestoneOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateMilestoneOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_o_auth2_application_options.py b/swagger_client/models/create_o_auth2_application_options.py new file mode 100644 index 0000000..37c2619 --- /dev/null +++ b/swagger_client/models/create_o_auth2_application_options.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateOAuth2ApplicationOptions(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 = { + 'confidential_client': 'bool', + 'name': 'str', + 'redirect_uris': 'list[str]', + 'skip_secondary_authorization': 'bool' + } + + attribute_map = { + 'confidential_client': 'confidential_client', + 'name': 'name', + 'redirect_uris': 'redirect_uris', + 'skip_secondary_authorization': 'skip_secondary_authorization' + } + + def __init__(self, confidential_client=None, name=None, redirect_uris=None, skip_secondary_authorization=None, _configuration=None): # noqa: E501 + """CreateOAuth2ApplicationOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._confidential_client = None + self._name = None + self._redirect_uris = None + self._skip_secondary_authorization = None + self.discriminator = None + + if confidential_client is not None: + self.confidential_client = confidential_client + if name is not None: + self.name = name + if redirect_uris is not None: + self.redirect_uris = redirect_uris + if skip_secondary_authorization is not None: + self.skip_secondary_authorization = skip_secondary_authorization + + @property + def confidential_client(self): + """Gets the confidential_client of this CreateOAuth2ApplicationOptions. # noqa: E501 + + Whether the client is confidential # noqa: E501 + + :return: The confidential_client of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: bool + """ + return self._confidential_client + + @confidential_client.setter + def confidential_client(self, confidential_client): + """Sets the confidential_client of this CreateOAuth2ApplicationOptions. + + Whether the client is confidential # noqa: E501 + + :param confidential_client: The confidential_client of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: bool + """ + + self._confidential_client = confidential_client + + @property + def name(self): + """Gets the name of this CreateOAuth2ApplicationOptions. # noqa: E501 + + The name of the OAuth2 application # noqa: E501 + + :return: The name of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateOAuth2ApplicationOptions. + + The name of the OAuth2 application # noqa: E501 + + :param name: The name of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def redirect_uris(self): + """Gets the redirect_uris of this CreateOAuth2ApplicationOptions. # noqa: E501 + + The list of allowed redirect URIs # noqa: E501 + + :return: The redirect_uris of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: list[str] + """ + return self._redirect_uris + + @redirect_uris.setter + def redirect_uris(self, redirect_uris): + """Sets the redirect_uris of this CreateOAuth2ApplicationOptions. + + The list of allowed redirect URIs # noqa: E501 + + :param redirect_uris: The redirect_uris of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: list[str] + """ + + self._redirect_uris = redirect_uris + + @property + def skip_secondary_authorization(self): + """Gets the skip_secondary_authorization of this CreateOAuth2ApplicationOptions. # noqa: E501 + + Whether to skip secondary authorization # noqa: E501 + + :return: The skip_secondary_authorization of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: bool + """ + return self._skip_secondary_authorization + + @skip_secondary_authorization.setter + def skip_secondary_authorization(self, skip_secondary_authorization): + """Sets the skip_secondary_authorization of this CreateOAuth2ApplicationOptions. + + Whether to skip secondary authorization # noqa: E501 + + :param skip_secondary_authorization: The skip_secondary_authorization of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: bool + """ + + self._skip_secondary_authorization = skip_secondary_authorization + + 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(CreateOAuth2ApplicationOptions, 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, CreateOAuth2ApplicationOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateOAuth2ApplicationOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_or_update_secret_option.py b/swagger_client/models/create_or_update_secret_option.py new file mode 100644 index 0000000..52e81d4 --- /dev/null +++ b/swagger_client/models/create_or_update_secret_option.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateOrUpdateSecretOption(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 = { + 'data': 'str', + 'description': 'str' + } + + attribute_map = { + 'data': 'data', + 'description': 'description' + } + + def __init__(self, data=None, description=None, _configuration=None): # noqa: E501 + """CreateOrUpdateSecretOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data = None + self._description = None + self.discriminator = None + + self.data = data + if description is not None: + self.description = description + + @property + def data(self): + """Gets the data of this CreateOrUpdateSecretOption. # noqa: E501 + + Data of the secret to update # noqa: E501 + + :return: The data of this CreateOrUpdateSecretOption. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CreateOrUpdateSecretOption. + + Data of the secret to update # noqa: E501 + + :param data: The data of this CreateOrUpdateSecretOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + @property + def description(self): + """Gets the description of this CreateOrUpdateSecretOption. # noqa: E501 + + Description of the secret to update # noqa: E501 + + :return: The description of this CreateOrUpdateSecretOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateOrUpdateSecretOption. + + Description of the secret to update # noqa: E501 + + :param description: The description of this CreateOrUpdateSecretOption. # noqa: E501 + :type: str + """ + + self._description = description + + 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(CreateOrUpdateSecretOption, 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, CreateOrUpdateSecretOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateOrUpdateSecretOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_org_option.py b/swagger_client/models/create_org_option.py new file mode 100644 index 0000000..c8451f3 --- /dev/null +++ b/swagger_client/models/create_org_option.py @@ -0,0 +1,329 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateOrgOption(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', + 'email': 'str', + 'full_name': 'str', + 'location': 'str', + 'repo_admin_change_team_access': 'bool', + 'username': 'str', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'email': 'email', + 'full_name': 'full_name', + 'location': 'location', + 'repo_admin_change_team_access': 'repo_admin_change_team_access', + 'username': 'username', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, description=None, email=None, full_name=None, location=None, repo_admin_change_team_access=None, username=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """CreateOrgOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._email = None + self._full_name = None + self._location = None + self._repo_admin_change_team_access = None + self._username = None + self._visibility = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if email is not None: + self.email = email + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + if repo_admin_change_team_access is not None: + self.repo_admin_change_team_access = repo_admin_change_team_access + self.username = username + if visibility is not None: + self.visibility = visibility + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this CreateOrgOption. # noqa: E501 + + The description of the organization # noqa: E501 + + :return: The description of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateOrgOption. + + The description of the organization # noqa: E501 + + :param description: The description of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def email(self): + """Gets the email of this CreateOrgOption. # noqa: E501 + + The email address of the organization # noqa: E501 + + :return: The email of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CreateOrgOption. + + The email address of the organization # noqa: E501 + + :param email: The email of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this CreateOrgOption. # noqa: E501 + + The full display name of the organization # noqa: E501 + + :return: The full_name of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this CreateOrgOption. + + The full display name of the organization # noqa: E501 + + :param full_name: The full_name of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def location(self): + """Gets the location of this CreateOrgOption. # noqa: E501 + + The location of the organization # noqa: E501 + + :return: The location of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this CreateOrgOption. + + The location of the organization # noqa: E501 + + :param location: The location of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def repo_admin_change_team_access(self): + """Gets the repo_admin_change_team_access of this CreateOrgOption. # noqa: E501 + + Whether repository administrators can change team access # noqa: E501 + + :return: The repo_admin_change_team_access of this CreateOrgOption. # noqa: E501 + :rtype: bool + """ + return self._repo_admin_change_team_access + + @repo_admin_change_team_access.setter + def repo_admin_change_team_access(self, repo_admin_change_team_access): + """Sets the repo_admin_change_team_access of this CreateOrgOption. + + Whether repository administrators can change team access # noqa: E501 + + :param repo_admin_change_team_access: The repo_admin_change_team_access of this CreateOrgOption. # noqa: E501 + :type: bool + """ + + self._repo_admin_change_team_access = repo_admin_change_team_access + + @property + def username(self): + """Gets the username of this CreateOrgOption. # noqa: E501 + + username of the organization # noqa: E501 + + :return: The username of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this CreateOrgOption. + + username of the organization # noqa: E501 + + :param username: The username of this CreateOrgOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + @property + def visibility(self): + """Gets the visibility of this CreateOrgOption. # noqa: E501 + + possible values are `public` (default), `limited` or `private` # noqa: E501 + + :return: The visibility of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this CreateOrgOption. + + possible values are `public` (default), `limited` or `private` # noqa: E501 + + :param visibility: The visibility of this CreateOrgOption. # noqa: E501 + :type: str + """ + allowed_values = ["public", "limited", "private"] # noqa: E501 + if (self._configuration.client_side_validation and + visibility not in allowed_values): + raise ValueError( + "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 + .format(visibility, allowed_values) + ) + + self._visibility = visibility + + @property + def website(self): + """Gets the website of this CreateOrgOption. # noqa: E501 + + The website URL of the organization # noqa: E501 + + :return: The website of this CreateOrgOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this CreateOrgOption. + + The website URL of the organization # noqa: E501 + + :param website: The website of this CreateOrgOption. # noqa: E501 + :type: str + """ + + self._website = website + + 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(CreateOrgOption, 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, CreateOrgOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateOrgOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_pull_request_option.py b/swagger_client/models/create_pull_request_option.py new file mode 100644 index 0000000..5106567 --- /dev/null +++ b/swagger_client/models/create_pull_request_option.py @@ -0,0 +1,403 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreatePullRequestOption(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 = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'base': 'str', + 'body': 'str', + 'due_date': 'datetime', + 'head': 'str', + 'labels': 'list[int]', + 'milestone': 'int', + 'reviewers': 'list[str]', + 'team_reviewers': 'list[str]', + 'title': 'str' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'due_date': 'due_date', + 'head': 'head', + 'labels': 'labels', + 'milestone': 'milestone', + 'reviewers': 'reviewers', + 'team_reviewers': 'team_reviewers', + 'title': 'title' + } + + def __init__(self, assignee=None, assignees=None, base=None, body=None, due_date=None, head=None, labels=None, milestone=None, reviewers=None, team_reviewers=None, title=None, _configuration=None): # noqa: E501 + """CreatePullRequestOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assignee = None + self._assignees = None + self._base = None + self._body = None + self._due_date = None + self._head = None + self._labels = None + self._milestone = None + self._reviewers = None + self._team_reviewers = None + self._title = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if base is not None: + self.base = base + if body is not None: + self.body = body + if due_date is not None: + self.due_date = due_date + if head is not None: + self.head = head + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if reviewers is not None: + self.reviewers = reviewers + if team_reviewers is not None: + self.team_reviewers = team_reviewers + if title is not None: + self.title = title + + @property + def assignee(self): + """Gets the assignee of this CreatePullRequestOption. # noqa: E501 + + The primary assignee username # noqa: E501 + + :return: The assignee of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this CreatePullRequestOption. + + The primary assignee username # noqa: E501 + + :param assignee: The assignee of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this CreatePullRequestOption. # noqa: E501 + + The list of assignee usernames # noqa: E501 + + :return: The assignees of this CreatePullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this CreatePullRequestOption. + + The list of assignee usernames # noqa: E501 + + :param assignees: The assignees of this CreatePullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def base(self): + """Gets the base of this CreatePullRequestOption. # noqa: E501 + + The base branch for the pull request # noqa: E501 + + :return: The base of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this CreatePullRequestOption. + + The base branch for the pull request # noqa: E501 + + :param base: The base of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._base = base + + @property + def body(self): + """Gets the body of this CreatePullRequestOption. # noqa: E501 + + The description body of the pull request # noqa: E501 + + :return: The body of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePullRequestOption. + + The description body of the pull request # noqa: E501 + + :param body: The body of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def due_date(self): + """Gets the due_date of this CreatePullRequestOption. # noqa: E501 + + + :return: The due_date of this CreatePullRequestOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this CreatePullRequestOption. + + + :param due_date: The due_date of this CreatePullRequestOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def head(self): + """Gets the head of this CreatePullRequestOption. # noqa: E501 + + The head branch for the pull request, it could be a branch name on the base repository or a form like `:` which refers to the user's fork repository's branch. # noqa: E501 + + :return: The head of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._head + + @head.setter + def head(self, head): + """Sets the head of this CreatePullRequestOption. + + The head branch for the pull request, it could be a branch name on the base repository or a form like `:` which refers to the user's fork repository's branch. # noqa: E501 + + :param head: The head of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._head = head + + @property + def labels(self): + """Gets the labels of this CreatePullRequestOption. # noqa: E501 + + The list of label IDs to assign to the pull request # noqa: E501 + + :return: The labels of this CreatePullRequestOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this CreatePullRequestOption. + + The list of label IDs to assign to the pull request # noqa: E501 + + :param labels: The labels of this CreatePullRequestOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this CreatePullRequestOption. # noqa: E501 + + The milestone ID to assign to the pull request # noqa: E501 + + :return: The milestone of this CreatePullRequestOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this CreatePullRequestOption. + + The milestone ID to assign to the pull request # noqa: E501 + + :param milestone: The milestone of this CreatePullRequestOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def reviewers(self): + """Gets the reviewers of this CreatePullRequestOption. # noqa: E501 + + The list of reviewer usernames # noqa: E501 + + :return: The reviewers of this CreatePullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._reviewers + + @reviewers.setter + def reviewers(self, reviewers): + """Sets the reviewers of this CreatePullRequestOption. + + The list of reviewer usernames # noqa: E501 + + :param reviewers: The reviewers of this CreatePullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._reviewers = reviewers + + @property + def team_reviewers(self): + """Gets the team_reviewers of this CreatePullRequestOption. # noqa: E501 + + The list of team reviewer names # noqa: E501 + + :return: The team_reviewers of this CreatePullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._team_reviewers + + @team_reviewers.setter + def team_reviewers(self, team_reviewers): + """Sets the team_reviewers of this CreatePullRequestOption. + + The list of team reviewer names # noqa: E501 + + :param team_reviewers: The team_reviewers of this CreatePullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._team_reviewers = team_reviewers + + @property + def title(self): + """Gets the title of this CreatePullRequestOption. # noqa: E501 + + The title of the pull request # noqa: E501 + + :return: The title of this CreatePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreatePullRequestOption. + + The title of the pull request # noqa: E501 + + :param title: The title of this CreatePullRequestOption. # noqa: E501 + :type: str + """ + + self._title = title + + 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(CreatePullRequestOption, 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, CreatePullRequestOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePullRequestOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_pull_review_comment.py b/swagger_client/models/create_pull_review_comment.py new file mode 100644 index 0000000..d8600cc --- /dev/null +++ b/swagger_client/models/create_pull_review_comment.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreatePullReviewComment(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 = { + 'body': 'str', + 'new_position': 'int', + 'old_position': 'int', + 'path': 'str' + } + + attribute_map = { + 'body': 'body', + 'new_position': 'new_position', + 'old_position': 'old_position', + 'path': 'path' + } + + def __init__(self, body=None, new_position=None, old_position=None, path=None, _configuration=None): # noqa: E501 + """CreatePullReviewComment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._new_position = None + self._old_position = None + self._path = None + self.discriminator = None + + if body is not None: + self.body = body + if new_position is not None: + self.new_position = new_position + if old_position is not None: + self.old_position = old_position + if path is not None: + self.path = path + + @property + def body(self): + """Gets the body of this CreatePullReviewComment. # noqa: E501 + + + :return: The body of this CreatePullReviewComment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePullReviewComment. + + + :param body: The body of this CreatePullReviewComment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def new_position(self): + """Gets the new_position of this CreatePullReviewComment. # noqa: E501 + + if comment to new file line or 0 # noqa: E501 + + :return: The new_position of this CreatePullReviewComment. # noqa: E501 + :rtype: int + """ + return self._new_position + + @new_position.setter + def new_position(self, new_position): + """Sets the new_position of this CreatePullReviewComment. + + if comment to new file line or 0 # noqa: E501 + + :param new_position: The new_position of this CreatePullReviewComment. # noqa: E501 + :type: int + """ + + self._new_position = new_position + + @property + def old_position(self): + """Gets the old_position of this CreatePullReviewComment. # noqa: E501 + + if comment to old file line or 0 # noqa: E501 + + :return: The old_position of this CreatePullReviewComment. # noqa: E501 + :rtype: int + """ + return self._old_position + + @old_position.setter + def old_position(self, old_position): + """Sets the old_position of this CreatePullReviewComment. + + if comment to old file line or 0 # noqa: E501 + + :param old_position: The old_position of this CreatePullReviewComment. # noqa: E501 + :type: int + """ + + self._old_position = old_position + + @property + def path(self): + """Gets the path of this CreatePullReviewComment. # noqa: E501 + + the tree path # noqa: E501 + + :return: The path of this CreatePullReviewComment. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this CreatePullReviewComment. + + the tree path # noqa: E501 + + :param path: The path of this CreatePullReviewComment. # noqa: E501 + :type: str + """ + + self._path = path + + 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(CreatePullReviewComment, 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, CreatePullReviewComment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePullReviewComment): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_pull_review_options.py b/swagger_client/models/create_pull_review_options.py new file mode 100644 index 0000000..5e38ec5 --- /dev/null +++ b/swagger_client/models/create_pull_review_options.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreatePullReviewOptions(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 = { + 'body': 'str', + 'comments': 'list[CreatePullReviewComment]', + 'commit_id': 'str', + 'event': 'ReviewStateType' + } + + attribute_map = { + 'body': 'body', + 'comments': 'comments', + 'commit_id': 'commit_id', + 'event': 'event' + } + + def __init__(self, body=None, comments=None, commit_id=None, event=None, _configuration=None): # noqa: E501 + """CreatePullReviewOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._comments = None + self._commit_id = None + self._event = None + self.discriminator = None + + if body is not None: + self.body = body + if comments is not None: + self.comments = comments + if commit_id is not None: + self.commit_id = commit_id + if event is not None: + self.event = event + + @property + def body(self): + """Gets the body of this CreatePullReviewOptions. # noqa: E501 + + + :return: The body of this CreatePullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePullReviewOptions. + + + :param body: The body of this CreatePullReviewOptions. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def comments(self): + """Gets the comments of this CreatePullReviewOptions. # noqa: E501 + + + :return: The comments of this CreatePullReviewOptions. # noqa: E501 + :rtype: list[CreatePullReviewComment] + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this CreatePullReviewOptions. + + + :param comments: The comments of this CreatePullReviewOptions. # noqa: E501 + :type: list[CreatePullReviewComment] + """ + + self._comments = comments + + @property + def commit_id(self): + """Gets the commit_id of this CreatePullReviewOptions. # noqa: E501 + + + :return: The commit_id of this CreatePullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """Sets the commit_id of this CreatePullReviewOptions. + + + :param commit_id: The commit_id of this CreatePullReviewOptions. # noqa: E501 + :type: str + """ + + self._commit_id = commit_id + + @property + def event(self): + """Gets the event of this CreatePullReviewOptions. # noqa: E501 + + + :return: The event of this CreatePullReviewOptions. # noqa: E501 + :rtype: ReviewStateType + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this CreatePullReviewOptions. + + + :param event: The event of this CreatePullReviewOptions. # noqa: E501 + :type: ReviewStateType + """ + + self._event = event + + 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(CreatePullReviewOptions, 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, CreatePullReviewOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePullReviewOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_push_mirror_option.py b/swagger_client/models/create_push_mirror_option.py new file mode 100644 index 0000000..558726d --- /dev/null +++ b/swagger_client/models/create_push_mirror_option.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreatePushMirrorOption(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 = { + 'interval': 'str', + 'remote_address': 'str', + 'remote_password': 'str', + 'remote_username': 'str', + 'sync_on_commit': 'bool' + } + + attribute_map = { + 'interval': 'interval', + 'remote_address': 'remote_address', + 'remote_password': 'remote_password', + 'remote_username': 'remote_username', + 'sync_on_commit': 'sync_on_commit' + } + + def __init__(self, interval=None, remote_address=None, remote_password=None, remote_username=None, sync_on_commit=None, _configuration=None): # noqa: E501 + """CreatePushMirrorOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._interval = None + self._remote_address = None + self._remote_password = None + self._remote_username = None + self._sync_on_commit = None + self.discriminator = None + + if interval is not None: + self.interval = interval + if remote_address is not None: + self.remote_address = remote_address + if remote_password is not None: + self.remote_password = remote_password + if remote_username is not None: + self.remote_username = remote_username + if sync_on_commit is not None: + self.sync_on_commit = sync_on_commit + + @property + def interval(self): + """Gets the interval of this CreatePushMirrorOption. # noqa: E501 + + The sync interval for automatic updates # noqa: E501 + + :return: The interval of this CreatePushMirrorOption. # noqa: E501 + :rtype: str + """ + return self._interval + + @interval.setter + def interval(self, interval): + """Sets the interval of this CreatePushMirrorOption. + + The sync interval for automatic updates # noqa: E501 + + :param interval: The interval of this CreatePushMirrorOption. # noqa: E501 + :type: str + """ + + self._interval = interval + + @property + def remote_address(self): + """Gets the remote_address of this CreatePushMirrorOption. # noqa: E501 + + The remote repository URL to push to # noqa: E501 + + :return: The remote_address of this CreatePushMirrorOption. # noqa: E501 + :rtype: str + """ + return self._remote_address + + @remote_address.setter + def remote_address(self, remote_address): + """Sets the remote_address of this CreatePushMirrorOption. + + The remote repository URL to push to # noqa: E501 + + :param remote_address: The remote_address of this CreatePushMirrorOption. # noqa: E501 + :type: str + """ + + self._remote_address = remote_address + + @property + def remote_password(self): + """Gets the remote_password of this CreatePushMirrorOption. # noqa: E501 + + The password for authentication with the remote repository # noqa: E501 + + :return: The remote_password of this CreatePushMirrorOption. # noqa: E501 + :rtype: str + """ + return self._remote_password + + @remote_password.setter + def remote_password(self, remote_password): + """Sets the remote_password of this CreatePushMirrorOption. + + The password for authentication with the remote repository # noqa: E501 + + :param remote_password: The remote_password of this CreatePushMirrorOption. # noqa: E501 + :type: str + """ + + self._remote_password = remote_password + + @property + def remote_username(self): + """Gets the remote_username of this CreatePushMirrorOption. # noqa: E501 + + The username for authentication with the remote repository # noqa: E501 + + :return: The remote_username of this CreatePushMirrorOption. # noqa: E501 + :rtype: str + """ + return self._remote_username + + @remote_username.setter + def remote_username(self, remote_username): + """Sets the remote_username of this CreatePushMirrorOption. + + The username for authentication with the remote repository # noqa: E501 + + :param remote_username: The remote_username of this CreatePushMirrorOption. # noqa: E501 + :type: str + """ + + self._remote_username = remote_username + + @property + def sync_on_commit(self): + """Gets the sync_on_commit of this CreatePushMirrorOption. # noqa: E501 + + Whether to sync on every commit # noqa: E501 + + :return: The sync_on_commit of this CreatePushMirrorOption. # noqa: E501 + :rtype: bool + """ + return self._sync_on_commit + + @sync_on_commit.setter + def sync_on_commit(self, sync_on_commit): + """Sets the sync_on_commit of this CreatePushMirrorOption. + + Whether to sync on every commit # noqa: E501 + + :param sync_on_commit: The sync_on_commit of this CreatePushMirrorOption. # noqa: E501 + :type: bool + """ + + self._sync_on_commit = sync_on_commit + + 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(CreatePushMirrorOption, 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, CreatePushMirrorOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePushMirrorOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_release_option.py b/swagger_client/models/create_release_option.py new file mode 100644 index 0000000..fa0c776 --- /dev/null +++ b/swagger_client/models/create_release_option.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateReleaseOption(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 = { + 'body': 'str', + 'draft': 'bool', + 'name': 'str', + 'prerelease': 'bool', + 'tag_message': 'str', + 'tag_name': 'str', + 'target_commitish': 'str' + } + + attribute_map = { + 'body': 'body', + 'draft': 'draft', + 'name': 'name', + 'prerelease': 'prerelease', + 'tag_message': 'tag_message', + 'tag_name': 'tag_name', + 'target_commitish': 'target_commitish' + } + + def __init__(self, body=None, draft=None, name=None, prerelease=None, tag_message=None, tag_name=None, target_commitish=None, _configuration=None): # noqa: E501 + """CreateReleaseOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._draft = None + self._name = None + self._prerelease = None + self._tag_message = None + self._tag_name = None + self._target_commitish = None + self.discriminator = None + + if body is not None: + self.body = body + if draft is not None: + self.draft = draft + if name is not None: + self.name = name + if prerelease is not None: + self.prerelease = prerelease + if tag_message is not None: + self.tag_message = tag_message + self.tag_name = tag_name + if target_commitish is not None: + self.target_commitish = target_commitish + + @property + def body(self): + """Gets the body of this CreateReleaseOption. # noqa: E501 + + The release notes or description # noqa: E501 + + :return: The body of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateReleaseOption. + + The release notes or description # noqa: E501 + + :param body: The body of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def draft(self): + """Gets the draft of this CreateReleaseOption. # noqa: E501 + + Whether to create the release as a draft # noqa: E501 + + :return: The draft of this CreateReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this CreateReleaseOption. + + Whether to create the release as a draft # noqa: E501 + + :param draft: The draft of this CreateReleaseOption. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def name(self): + """Gets the name of this CreateReleaseOption. # noqa: E501 + + The display title of the release # noqa: E501 + + :return: The name of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateReleaseOption. + + The display title of the release # noqa: E501 + + :param name: The name of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prerelease(self): + """Gets the prerelease of this CreateReleaseOption. # noqa: E501 + + Whether to mark the release as a prerelease # noqa: E501 + + :return: The prerelease of this CreateReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._prerelease + + @prerelease.setter + def prerelease(self, prerelease): + """Sets the prerelease of this CreateReleaseOption. + + Whether to mark the release as a prerelease # noqa: E501 + + :param prerelease: The prerelease of this CreateReleaseOption. # noqa: E501 + :type: bool + """ + + self._prerelease = prerelease + + @property + def tag_message(self): + """Gets the tag_message of this CreateReleaseOption. # noqa: E501 + + The message for the git tag # noqa: E501 + + :return: The tag_message of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._tag_message + + @tag_message.setter + def tag_message(self, tag_message): + """Sets the tag_message of this CreateReleaseOption. + + The message for the git tag # noqa: E501 + + :param tag_message: The tag_message of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._tag_message = tag_message + + @property + def tag_name(self): + """Gets the tag_name of this CreateReleaseOption. # noqa: E501 + + + :return: The tag_name of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this CreateReleaseOption. + + + :param tag_name: The tag_name of this CreateReleaseOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and tag_name is None: + raise ValueError("Invalid value for `tag_name`, must not be `None`") # noqa: E501 + + self._tag_name = tag_name + + @property + def target_commitish(self): + """Gets the target_commitish of this CreateReleaseOption. # noqa: E501 + + The target commitish for the release # noqa: E501 + + :return: The target_commitish of this CreateReleaseOption. # noqa: E501 + :rtype: str + """ + return self._target_commitish + + @target_commitish.setter + def target_commitish(self, target_commitish): + """Sets the target_commitish of this CreateReleaseOption. + + The target commitish for the release # noqa: E501 + + :param target_commitish: The target_commitish of this CreateReleaseOption. # noqa: E501 + :type: str + """ + + self._target_commitish = target_commitish + + 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(CreateReleaseOption, 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, CreateReleaseOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateReleaseOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_repo_option.py b/swagger_client/models/create_repo_option.py new file mode 100644 index 0000000..6bf06c7 --- /dev/null +++ b/swagger_client/models/create_repo_option.py @@ -0,0 +1,448 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateRepoOption(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 = { + 'auto_init': 'bool', + 'default_branch': 'str', + 'description': 'str', + 'gitignores': 'str', + 'issue_labels': 'str', + 'license': 'str', + 'name': 'str', + 'object_format_name': 'str', + 'private': 'bool', + 'readme': 'str', + 'template': 'bool', + 'trust_model': 'str' + } + + attribute_map = { + 'auto_init': 'auto_init', + 'default_branch': 'default_branch', + 'description': 'description', + 'gitignores': 'gitignores', + 'issue_labels': 'issue_labels', + 'license': 'license', + 'name': 'name', + 'object_format_name': 'object_format_name', + 'private': 'private', + 'readme': 'readme', + 'template': 'template', + 'trust_model': 'trust_model' + } + + def __init__(self, auto_init=None, default_branch=None, description=None, gitignores=None, issue_labels=None, license=None, name=None, object_format_name=None, private=None, readme=None, template=None, trust_model=None, _configuration=None): # noqa: E501 + """CreateRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._auto_init = None + self._default_branch = None + self._description = None + self._gitignores = None + self._issue_labels = None + self._license = None + self._name = None + self._object_format_name = None + self._private = None + self._readme = None + self._template = None + self._trust_model = None + self.discriminator = None + + if auto_init is not None: + self.auto_init = auto_init + if default_branch is not None: + self.default_branch = default_branch + if description is not None: + self.description = description + if gitignores is not None: + self.gitignores = gitignores + if issue_labels is not None: + self.issue_labels = issue_labels + if license is not None: + self.license = license + self.name = name + if object_format_name is not None: + self.object_format_name = object_format_name + if private is not None: + self.private = private + if readme is not None: + self.readme = readme + if template is not None: + self.template = template + if trust_model is not None: + self.trust_model = trust_model + + @property + def auto_init(self): + """Gets the auto_init of this CreateRepoOption. # noqa: E501 + + Whether the repository should be auto-initialized? # noqa: E501 + + :return: The auto_init of this CreateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._auto_init + + @auto_init.setter + def auto_init(self, auto_init): + """Sets the auto_init of this CreateRepoOption. + + Whether the repository should be auto-initialized? # noqa: E501 + + :param auto_init: The auto_init of this CreateRepoOption. # noqa: E501 + :type: bool + """ + + self._auto_init = auto_init + + @property + def default_branch(self): + """Gets the default_branch of this CreateRepoOption. # noqa: E501 + + DefaultBranch of the repository (used when initializes and in template) # noqa: E501 + + :return: The default_branch of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this CreateRepoOption. + + DefaultBranch of the repository (used when initializes and in template) # noqa: E501 + + :param default_branch: The default_branch of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @property + def description(self): + """Gets the description of this CreateRepoOption. # noqa: E501 + + Description of the repository to create # noqa: E501 + + :return: The description of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateRepoOption. + + Description of the repository to create # noqa: E501 + + :param description: The description of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def gitignores(self): + """Gets the gitignores of this CreateRepoOption. # noqa: E501 + + Gitignores to use # noqa: E501 + + :return: The gitignores of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._gitignores + + @gitignores.setter + def gitignores(self, gitignores): + """Sets the gitignores of this CreateRepoOption. + + Gitignores to use # noqa: E501 + + :param gitignores: The gitignores of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._gitignores = gitignores + + @property + def issue_labels(self): + """Gets the issue_labels of this CreateRepoOption. # noqa: E501 + + Label-Set to use # noqa: E501 + + :return: The issue_labels of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._issue_labels + + @issue_labels.setter + def issue_labels(self, issue_labels): + """Sets the issue_labels of this CreateRepoOption. + + Label-Set to use # noqa: E501 + + :param issue_labels: The issue_labels of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._issue_labels = issue_labels + + @property + def license(self): + """Gets the license of this CreateRepoOption. # noqa: E501 + + License to use # noqa: E501 + + :return: The license of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._license + + @license.setter + def license(self, license): + """Sets the license of this CreateRepoOption. + + License to use # noqa: E501 + + :param license: The license of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._license = license + + @property + def name(self): + """Gets the name of this CreateRepoOption. # noqa: E501 + + Name of the repository to create # noqa: E501 + + :return: The name of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateRepoOption. + + Name of the repository to create # noqa: E501 + + :param name: The name of this CreateRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def object_format_name(self): + """Gets the object_format_name of this CreateRepoOption. # noqa: E501 + + ObjectFormatName of the underlying git repository # noqa: E501 + + :return: The object_format_name of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._object_format_name + + @object_format_name.setter + def object_format_name(self, object_format_name): + """Sets the object_format_name of this CreateRepoOption. + + ObjectFormatName of the underlying git repository # noqa: E501 + + :param object_format_name: The object_format_name of this CreateRepoOption. # noqa: E501 + :type: str + """ + allowed_values = ["sha1", "sha256"] # noqa: E501 + if (self._configuration.client_side_validation and + object_format_name not in allowed_values): + raise ValueError( + "Invalid value for `object_format_name` ({0}), must be one of {1}" # noqa: E501 + .format(object_format_name, allowed_values) + ) + + self._object_format_name = object_format_name + + @property + def private(self): + """Gets the private of this CreateRepoOption. # noqa: E501 + + Whether the repository is private # noqa: E501 + + :return: The private of this CreateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this CreateRepoOption. + + Whether the repository is private # noqa: E501 + + :param private: The private of this CreateRepoOption. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def readme(self): + """Gets the readme of this CreateRepoOption. # noqa: E501 + + Readme of the repository to create # noqa: E501 + + :return: The readme of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._readme + + @readme.setter + def readme(self, readme): + """Sets the readme of this CreateRepoOption. + + Readme of the repository to create # noqa: E501 + + :param readme: The readme of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._readme = readme + + @property + def template(self): + """Gets the template of this CreateRepoOption. # noqa: E501 + + Whether the repository is template # noqa: E501 + + :return: The template of this CreateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this CreateRepoOption. + + Whether the repository is template # noqa: E501 + + :param template: The template of this CreateRepoOption. # noqa: E501 + :type: bool + """ + + self._template = template + + @property + def trust_model(self): + """Gets the trust_model of this CreateRepoOption. # noqa: E501 + + TrustModel of the repository # noqa: E501 + + :return: The trust_model of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._trust_model + + @trust_model.setter + def trust_model(self, trust_model): + """Sets the trust_model of this CreateRepoOption. + + TrustModel of the repository # noqa: E501 + + :param trust_model: The trust_model of this CreateRepoOption. # noqa: E501 + :type: str + """ + allowed_values = ["default", "collaborator", "committer", "collaboratorcommitter"] # noqa: E501 + if (self._configuration.client_side_validation and + trust_model not in allowed_values): + raise ValueError( + "Invalid value for `trust_model` ({0}), must be one of {1}" # noqa: E501 + .format(trust_model, allowed_values) + ) + + self._trust_model = trust_model + + 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(CreateRepoOption, 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, CreateRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_status_option.py b/swagger_client/models/create_status_option.py new file mode 100644 index 0000000..7f99790 --- /dev/null +++ b/swagger_client/models/create_status_option.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateStatusOption(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 = { + 'context': 'str', + 'description': 'str', + 'state': 'str', + 'target_url': 'str' + } + + attribute_map = { + 'context': 'context', + 'description': 'description', + 'state': 'state', + 'target_url': 'target_url' + } + + def __init__(self, context=None, description=None, state=None, target_url=None, _configuration=None): # noqa: E501 + """CreateStatusOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._context = None + self._description = None + self._state = None + self._target_url = None + self.discriminator = None + + if context is not None: + self.context = context + if description is not None: + self.description = description + if state is not None: + self.state = state + if target_url is not None: + self.target_url = target_url + + @property + def context(self): + """Gets the context of this CreateStatusOption. # noqa: E501 + + Context is the unique context identifier for the status # noqa: E501 + + :return: The context of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this CreateStatusOption. + + Context is the unique context identifier for the status # noqa: E501 + + :param context: The context of this CreateStatusOption. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def description(self): + """Gets the description of this CreateStatusOption. # noqa: E501 + + Description provides a brief description of the status # noqa: E501 + + :return: The description of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateStatusOption. + + Description provides a brief description of the status # noqa: E501 + + :param description: The description of this CreateStatusOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def state(self): + """Gets the state of this CreateStatusOption. # noqa: E501 + + State represents the status state to set (pending, success, error, failure) pending CommitStatusPending CommitStatusPending is for when the CommitStatus is Pending success CommitStatusSuccess CommitStatusSuccess is for when the CommitStatus is Success error CommitStatusError CommitStatusError is for when the CommitStatus is Error failure CommitStatusFailure CommitStatusFailure is for when the CommitStatus is Failure warning CommitStatusWarning CommitStatusWarning is for when the CommitStatus is Warning skipped CommitStatusSkipped CommitStatusSkipped is for when CommitStatus is Skipped # noqa: E501 + + :return: The state of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this CreateStatusOption. + + State represents the status state to set (pending, success, error, failure) pending CommitStatusPending CommitStatusPending is for when the CommitStatus is Pending success CommitStatusSuccess CommitStatusSuccess is for when the CommitStatus is Success error CommitStatusError CommitStatusError is for when the CommitStatus is Error failure CommitStatusFailure CommitStatusFailure is for when the CommitStatus is Failure warning CommitStatusWarning CommitStatusWarning is for when the CommitStatus is Warning skipped CommitStatusSkipped CommitStatusSkipped is for when CommitStatus is Skipped # noqa: E501 + + :param state: The state of this CreateStatusOption. # noqa: E501 + :type: str + """ + allowed_values = ["pending", "success", "error", "failure", "warning", "skipped"] # noqa: E501 + if (self._configuration.client_side_validation and + state not in allowed_values): + raise ValueError( + "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 + .format(state, allowed_values) + ) + + self._state = state + + @property + def target_url(self): + """Gets the target_url of this CreateStatusOption. # noqa: E501 + + TargetURL is the URL to link to for more details # noqa: E501 + + :return: The target_url of this CreateStatusOption. # noqa: E501 + :rtype: str + """ + return self._target_url + + @target_url.setter + def target_url(self, target_url): + """Sets the target_url of this CreateStatusOption. + + TargetURL is the URL to link to for more details # noqa: E501 + + :param target_url: The target_url of this CreateStatusOption. # noqa: E501 + :type: str + """ + + self._target_url = target_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(CreateStatusOption, 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, CreateStatusOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateStatusOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_tag_option.py b/swagger_client/models/create_tag_option.py new file mode 100644 index 0000000..23c59dd --- /dev/null +++ b/swagger_client/models/create_tag_option.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateTagOption(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 = { + 'message': 'str', + 'tag_name': 'str', + 'target': 'str' + } + + attribute_map = { + 'message': 'message', + 'tag_name': 'tag_name', + 'target': 'target' + } + + def __init__(self, message=None, tag_name=None, target=None, _configuration=None): # noqa: E501 + """CreateTagOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._tag_name = None + self._target = None + self.discriminator = None + + if message is not None: + self.message = message + self.tag_name = tag_name + if target is not None: + self.target = target + + @property + def message(self): + """Gets the message of this CreateTagOption. # noqa: E501 + + The message to associate with the tag # noqa: E501 + + :return: The message of this CreateTagOption. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CreateTagOption. + + The message to associate with the tag # noqa: E501 + + :param message: The message of this CreateTagOption. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def tag_name(self): + """Gets the tag_name of this CreateTagOption. # noqa: E501 + + + :return: The tag_name of this CreateTagOption. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this CreateTagOption. + + + :param tag_name: The tag_name of this CreateTagOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and tag_name is None: + raise ValueError("Invalid value for `tag_name`, must not be `None`") # noqa: E501 + + self._tag_name = tag_name + + @property + def target(self): + """Gets the target of this CreateTagOption. # noqa: E501 + + The target commit SHA or branch name for the tag # noqa: E501 + + :return: The target of this CreateTagOption. # noqa: E501 + :rtype: str + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this CreateTagOption. + + The target commit SHA or branch name for the tag # noqa: E501 + + :param target: The target of this CreateTagOption. # noqa: E501 + :type: str + """ + + self._target = target + + 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(CreateTagOption, 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, CreateTagOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateTagOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_tag_protection_option.py b/swagger_client/models/create_tag_protection_option.py new file mode 100644 index 0000000..7e64daf --- /dev/null +++ b/swagger_client/models/create_tag_protection_option.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateTagProtectionOption(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_pattern': 'str', + 'whitelist_teams': 'list[str]', + 'whitelist_usernames': 'list[str]' + } + + attribute_map = { + 'name_pattern': 'name_pattern', + 'whitelist_teams': 'whitelist_teams', + 'whitelist_usernames': 'whitelist_usernames' + } + + def __init__(self, name_pattern=None, whitelist_teams=None, whitelist_usernames=None, _configuration=None): # noqa: E501 + """CreateTagProtectionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name_pattern = None + self._whitelist_teams = None + self._whitelist_usernames = None + self.discriminator = None + + if name_pattern is not None: + self.name_pattern = name_pattern + if whitelist_teams is not None: + self.whitelist_teams = whitelist_teams + if whitelist_usernames is not None: + self.whitelist_usernames = whitelist_usernames + + @property + def name_pattern(self): + """Gets the name_pattern of this CreateTagProtectionOption. # noqa: E501 + + The pattern to match tag names for protection # noqa: E501 + + :return: The name_pattern of this CreateTagProtectionOption. # noqa: E501 + :rtype: str + """ + return self._name_pattern + + @name_pattern.setter + def name_pattern(self, name_pattern): + """Sets the name_pattern of this CreateTagProtectionOption. + + The pattern to match tag names for protection # noqa: E501 + + :param name_pattern: The name_pattern of this CreateTagProtectionOption. # noqa: E501 + :type: str + """ + + self._name_pattern = name_pattern + + @property + def whitelist_teams(self): + """Gets the whitelist_teams of this CreateTagProtectionOption. # noqa: E501 + + List of team names allowed to create/delete protected tags # noqa: E501 + + :return: The whitelist_teams of this CreateTagProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_teams + + @whitelist_teams.setter + def whitelist_teams(self, whitelist_teams): + """Sets the whitelist_teams of this CreateTagProtectionOption. + + List of team names allowed to create/delete protected tags # noqa: E501 + + :param whitelist_teams: The whitelist_teams of this CreateTagProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._whitelist_teams = whitelist_teams + + @property + def whitelist_usernames(self): + """Gets the whitelist_usernames of this CreateTagProtectionOption. # noqa: E501 + + List of usernames allowed to create/delete protected tags # noqa: E501 + + :return: The whitelist_usernames of this CreateTagProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_usernames + + @whitelist_usernames.setter + def whitelist_usernames(self, whitelist_usernames): + """Sets the whitelist_usernames of this CreateTagProtectionOption. + + List of usernames allowed to create/delete protected tags # noqa: E501 + + :param whitelist_usernames: The whitelist_usernames of this CreateTagProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._whitelist_usernames = whitelist_usernames + + 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(CreateTagProtectionOption, 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, CreateTagProtectionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateTagProtectionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_team_option.py b/swagger_client/models/create_team_option.py new file mode 100644 index 0000000..6e881d2 --- /dev/null +++ b/swagger_client/models/create_team_option.py @@ -0,0 +1,293 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateTeamOption(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 = { + 'can_create_org_repo': 'bool', + 'description': 'str', + 'includes_all_repositories': 'bool', + 'name': 'str', + 'permission': 'str', + 'units': 'list[str]', + 'units_map': 'dict(str, str)' + } + + attribute_map = { + 'can_create_org_repo': 'can_create_org_repo', + 'description': 'description', + 'includes_all_repositories': 'includes_all_repositories', + 'name': 'name', + 'permission': 'permission', + 'units': 'units', + 'units_map': 'units_map' + } + + def __init__(self, can_create_org_repo=None, description=None, includes_all_repositories=None, name=None, permission=None, units=None, units_map=None, _configuration=None): # noqa: E501 + """CreateTeamOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._can_create_org_repo = None + self._description = None + self._includes_all_repositories = None + self._name = None + self._permission = None + self._units = None + self._units_map = None + self.discriminator = None + + if can_create_org_repo is not None: + self.can_create_org_repo = can_create_org_repo + if description is not None: + self.description = description + if includes_all_repositories is not None: + self.includes_all_repositories = includes_all_repositories + self.name = name + if permission is not None: + self.permission = permission + if units is not None: + self.units = units + if units_map is not None: + self.units_map = units_map + + @property + def can_create_org_repo(self): + """Gets the can_create_org_repo of this CreateTeamOption. # noqa: E501 + + Whether the team can create repositories in the organization # noqa: E501 + + :return: The can_create_org_repo of this CreateTeamOption. # noqa: E501 + :rtype: bool + """ + return self._can_create_org_repo + + @can_create_org_repo.setter + def can_create_org_repo(self, can_create_org_repo): + """Sets the can_create_org_repo of this CreateTeamOption. + + Whether the team can create repositories in the organization # noqa: E501 + + :param can_create_org_repo: The can_create_org_repo of this CreateTeamOption. # noqa: E501 + :type: bool + """ + + self._can_create_org_repo = can_create_org_repo + + @property + def description(self): + """Gets the description of this CreateTeamOption. # noqa: E501 + + The description of the team # noqa: E501 + + :return: The description of this CreateTeamOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateTeamOption. + + The description of the team # noqa: E501 + + :param description: The description of this CreateTeamOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def includes_all_repositories(self): + """Gets the includes_all_repositories of this CreateTeamOption. # noqa: E501 + + Whether the team has access to all repositories in the organization # noqa: E501 + + :return: The includes_all_repositories of this CreateTeamOption. # noqa: E501 + :rtype: bool + """ + return self._includes_all_repositories + + @includes_all_repositories.setter + def includes_all_repositories(self, includes_all_repositories): + """Sets the includes_all_repositories of this CreateTeamOption. + + Whether the team has access to all repositories in the organization # noqa: E501 + + :param includes_all_repositories: The includes_all_repositories of this CreateTeamOption. # noqa: E501 + :type: bool + """ + + self._includes_all_repositories = includes_all_repositories + + @property + def name(self): + """Gets the name of this CreateTeamOption. # noqa: E501 + + + :return: The name of this CreateTeamOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateTeamOption. + + + :param name: The name of this CreateTeamOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def permission(self): + """Gets the permission of this CreateTeamOption. # noqa: E501 + + + :return: The permission of this CreateTeamOption. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this CreateTeamOption. + + + :param permission: The permission of this CreateTeamOption. # noqa: E501 + :type: str + """ + allowed_values = ["read", "write", "admin"] # noqa: E501 + if (self._configuration.client_side_validation and + permission not in allowed_values): + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + @property + def units(self): + """Gets the units of this CreateTeamOption. # noqa: E501 + + + :return: The units of this CreateTeamOption. # noqa: E501 + :rtype: list[str] + """ + return self._units + + @units.setter + def units(self, units): + """Sets the units of this CreateTeamOption. + + + :param units: The units of this CreateTeamOption. # noqa: E501 + :type: list[str] + """ + + self._units = units + + @property + def units_map(self): + """Gets the units_map of this CreateTeamOption. # noqa: E501 + + + :return: The units_map of this CreateTeamOption. # noqa: E501 + :rtype: dict(str, str) + """ + return self._units_map + + @units_map.setter + def units_map(self, units_map): + """Sets the units_map of this CreateTeamOption. + + + :param units_map: The units_map of this CreateTeamOption. # noqa: E501 + :type: dict(str, str) + """ + + self._units_map = units_map + + 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(CreateTeamOption, 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, CreateTeamOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateTeamOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_user_option.py b/swagger_client/models/create_user_option.py new file mode 100644 index 0000000..635412a --- /dev/null +++ b/swagger_client/models/create_user_option.py @@ -0,0 +1,405 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateUserOption(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 = { + 'created_at': 'datetime', + 'email': 'str', + 'full_name': 'str', + 'login_name': 'str', + 'must_change_password': 'bool', + 'password': 'str', + 'restricted': 'bool', + 'send_notify': 'bool', + 'source_id': 'int', + 'username': 'str', + 'visibility': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'email': 'email', + 'full_name': 'full_name', + 'login_name': 'login_name', + 'must_change_password': 'must_change_password', + 'password': 'password', + 'restricted': 'restricted', + 'send_notify': 'send_notify', + 'source_id': 'source_id', + 'username': 'username', + 'visibility': 'visibility' + } + + def __init__(self, created_at=None, email=None, full_name=None, login_name='empty', must_change_password=None, password=None, restricted=None, send_notify=None, source_id=None, username=None, visibility=None, _configuration=None): # noqa: E501 + """CreateUserOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._email = None + self._full_name = None + self._login_name = None + self._must_change_password = None + self._password = None + self._restricted = None + self._send_notify = None + self._source_id = None + self._username = None + self._visibility = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + self.email = email + if full_name is not None: + self.full_name = full_name + if login_name is not None: + self.login_name = login_name + if must_change_password is not None: + self.must_change_password = must_change_password + if password is not None: + self.password = password + if restricted is not None: + self.restricted = restricted + if send_notify is not None: + self.send_notify = send_notify + if source_id is not None: + self.source_id = source_id + self.username = username + if visibility is not None: + self.visibility = visibility + + @property + def created_at(self): + """Gets the created_at of this CreateUserOption. # noqa: E501 + + For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". # noqa: E501 + + :return: The created_at of this CreateUserOption. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this CreateUserOption. + + For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". # noqa: E501 + + :param created_at: The created_at of this CreateUserOption. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def email(self): + """Gets the email of this CreateUserOption. # noqa: E501 + + + :return: The email of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CreateUserOption. + + + :param email: The email of this CreateUserOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this CreateUserOption. # noqa: E501 + + The full display name of the user # noqa: E501 + + :return: The full_name of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this CreateUserOption. + + The full display name of the user # noqa: E501 + + :param full_name: The full_name of this CreateUserOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def login_name(self): + """Gets the login_name of this CreateUserOption. # noqa: E501 + + identifier of the user, provided by the external authenticator (if configured) # noqa: E501 + + :return: The login_name of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._login_name + + @login_name.setter + def login_name(self, login_name): + """Sets the login_name of this CreateUserOption. + + identifier of the user, provided by the external authenticator (if configured) # noqa: E501 + + :param login_name: The login_name of this CreateUserOption. # noqa: E501 + :type: str + """ + + self._login_name = login_name + + @property + def must_change_password(self): + """Gets the must_change_password of this CreateUserOption. # noqa: E501 + + Whether the user must change password on first login # noqa: E501 + + :return: The must_change_password of this CreateUserOption. # noqa: E501 + :rtype: bool + """ + return self._must_change_password + + @must_change_password.setter + def must_change_password(self, must_change_password): + """Sets the must_change_password of this CreateUserOption. + + Whether the user must change password on first login # noqa: E501 + + :param must_change_password: The must_change_password of this CreateUserOption. # noqa: E501 + :type: bool + """ + + self._must_change_password = must_change_password + + @property + def password(self): + """Gets the password of this CreateUserOption. # noqa: E501 + + The plain text password for the user # noqa: E501 + + :return: The password of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this CreateUserOption. + + The plain text password for the user # noqa: E501 + + :param password: The password of this CreateUserOption. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def restricted(self): + """Gets the restricted of this CreateUserOption. # noqa: E501 + + Whether the user has restricted access privileges # noqa: E501 + + :return: The restricted of this CreateUserOption. # noqa: E501 + :rtype: bool + """ + return self._restricted + + @restricted.setter + def restricted(self, restricted): + """Sets the restricted of this CreateUserOption. + + Whether the user has restricted access privileges # noqa: E501 + + :param restricted: The restricted of this CreateUserOption. # noqa: E501 + :type: bool + """ + + self._restricted = restricted + + @property + def send_notify(self): + """Gets the send_notify of this CreateUserOption. # noqa: E501 + + Whether to send welcome notification email to the user # noqa: E501 + + :return: The send_notify of this CreateUserOption. # noqa: E501 + :rtype: bool + """ + return self._send_notify + + @send_notify.setter + def send_notify(self, send_notify): + """Sets the send_notify of this CreateUserOption. + + Whether to send welcome notification email to the user # noqa: E501 + + :param send_notify: The send_notify of this CreateUserOption. # noqa: E501 + :type: bool + """ + + self._send_notify = send_notify + + @property + def source_id(self): + """Gets the source_id of this CreateUserOption. # noqa: E501 + + The authentication source ID to associate with the user # noqa: E501 + + :return: The source_id of this CreateUserOption. # noqa: E501 + :rtype: int + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this CreateUserOption. + + The authentication source ID to associate with the user # noqa: E501 + + :param source_id: The source_id of this CreateUserOption. # noqa: E501 + :type: int + """ + + self._source_id = source_id + + @property + def username(self): + """Gets the username of this CreateUserOption. # noqa: E501 + + username of the user # noqa: E501 + + :return: The username of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this CreateUserOption. + + username of the user # noqa: E501 + + :param username: The username of this CreateUserOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + @property + def visibility(self): + """Gets the visibility of this CreateUserOption. # noqa: E501 + + User visibility level: public, limited, or private # noqa: E501 + + :return: The visibility of this CreateUserOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this CreateUserOption. + + User visibility level: public, limited, or private # noqa: E501 + + :param visibility: The visibility of this CreateUserOption. # noqa: E501 + :type: str + """ + + 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(CreateUserOption, 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, CreateUserOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateUserOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_variable_option.py b/swagger_client/models/create_variable_option.py new file mode 100644 index 0000000..664f858 --- /dev/null +++ b/swagger_client/models/create_variable_option.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateVariableOption(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', + 'value': 'str' + } + + attribute_map = { + 'description': 'description', + 'value': 'value' + } + + def __init__(self, description=None, value=None, _configuration=None): # noqa: E501 + """CreateVariableOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._value = None + self.discriminator = None + + if description is not None: + self.description = description + self.value = value + + @property + def description(self): + """Gets the description of this CreateVariableOption. # noqa: E501 + + Description of the variable to create # noqa: E501 + + :return: The description of this CreateVariableOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateVariableOption. + + Description of the variable to create # noqa: E501 + + :param description: The description of this CreateVariableOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def value(self): + """Gets the value of this CreateVariableOption. # noqa: E501 + + Value of the variable to create # noqa: E501 + + :return: The value of this CreateVariableOption. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this CreateVariableOption. + + Value of the variable to create # noqa: E501 + + :param value: The value of this CreateVariableOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and value is None: + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + 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(CreateVariableOption, 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, CreateVariableOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateVariableOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/create_wiki_page_options.py b/swagger_client/models/create_wiki_page_options.py new file mode 100644 index 0000000..a5e34b1 --- /dev/null +++ b/swagger_client/models/create_wiki_page_options.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class CreateWikiPageOptions(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_base64': 'str', + 'message': 'str', + 'title': 'str' + } + + attribute_map = { + 'content_base64': 'content_base64', + 'message': 'message', + 'title': 'title' + } + + def __init__(self, content_base64=None, message=None, title=None, _configuration=None): # noqa: E501 + """CreateWikiPageOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content_base64 = None + self._message = None + self._title = None + self.discriminator = None + + if content_base64 is not None: + self.content_base64 = content_base64 + if message is not None: + self.message = message + if title is not None: + self.title = title + + @property + def content_base64(self): + """Gets the content_base64 of this CreateWikiPageOptions. # noqa: E501 + + content must be base64 encoded # noqa: E501 + + :return: The content_base64 of this CreateWikiPageOptions. # noqa: E501 + :rtype: str + """ + return self._content_base64 + + @content_base64.setter + def content_base64(self, content_base64): + """Sets the content_base64 of this CreateWikiPageOptions. + + content must be base64 encoded # noqa: E501 + + :param content_base64: The content_base64 of this CreateWikiPageOptions. # noqa: E501 + :type: str + """ + + self._content_base64 = content_base64 + + @property + def message(self): + """Gets the message of this CreateWikiPageOptions. # noqa: E501 + + optional commit message summarizing the change # noqa: E501 + + :return: The message of this CreateWikiPageOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this CreateWikiPageOptions. + + optional commit message summarizing the change # noqa: E501 + + :param message: The message of this CreateWikiPageOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def title(self): + """Gets the title of this CreateWikiPageOptions. # noqa: E501 + + page title. leave empty to keep unchanged # noqa: E501 + + :return: The title of this CreateWikiPageOptions. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CreateWikiPageOptions. + + page title. leave empty to keep unchanged # noqa: E501 + + :param title: The title of this CreateWikiPageOptions. # noqa: E501 + :type: str + """ + + self._title = title + + 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(CreateWikiPageOptions, 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, CreateWikiPageOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateWikiPageOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/cron.py b/swagger_client/models/cron.py new file mode 100644 index 0000000..7598ab4 --- /dev/null +++ b/swagger_client/models/cron.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Cron(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 = { + 'exec_times': 'int', + 'name': 'str', + 'next': 'datetime', + 'prev': 'datetime', + 'schedule': 'str' + } + + attribute_map = { + 'exec_times': 'exec_times', + 'name': 'name', + 'next': 'next', + 'prev': 'prev', + 'schedule': 'schedule' + } + + def __init__(self, exec_times=None, name=None, next=None, prev=None, schedule=None, _configuration=None): # noqa: E501 + """Cron - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._exec_times = None + self._name = None + self._next = None + self._prev = None + self._schedule = None + self.discriminator = None + + if exec_times is not None: + self.exec_times = exec_times + if name is not None: + self.name = name + if next is not None: + self.next = next + if prev is not None: + self.prev = prev + if schedule is not None: + self.schedule = schedule + + @property + def exec_times(self): + """Gets the exec_times of this Cron. # noqa: E501 + + The total number of times this cron task has been executed # noqa: E501 + + :return: The exec_times of this Cron. # noqa: E501 + :rtype: int + """ + return self._exec_times + + @exec_times.setter + def exec_times(self, exec_times): + """Sets the exec_times of this Cron. + + The total number of times this cron task has been executed # noqa: E501 + + :param exec_times: The exec_times of this Cron. # noqa: E501 + :type: int + """ + + self._exec_times = exec_times + + @property + def name(self): + """Gets the name of this Cron. # noqa: E501 + + The name of the cron task # noqa: E501 + + :return: The name of this Cron. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Cron. + + The name of the cron task # noqa: E501 + + :param name: The name of this Cron. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def next(self): + """Gets the next of this Cron. # noqa: E501 + + The next scheduled execution time # noqa: E501 + + :return: The next of this Cron. # noqa: E501 + :rtype: datetime + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this Cron. + + The next scheduled execution time # noqa: E501 + + :param next: The next of this Cron. # noqa: E501 + :type: datetime + """ + + self._next = next + + @property + def prev(self): + """Gets the prev of this Cron. # noqa: E501 + + The previous execution time # noqa: E501 + + :return: The prev of this Cron. # noqa: E501 + :rtype: datetime + """ + return self._prev + + @prev.setter + def prev(self, prev): + """Sets the prev of this Cron. + + The previous execution time # noqa: E501 + + :param prev: The prev of this Cron. # noqa: E501 + :type: datetime + """ + + self._prev = prev + + @property + def schedule(self): + """Gets the schedule of this Cron. # noqa: E501 + + The cron schedule expression (e.g., \"0 0 * * *\") # noqa: E501 + + :return: The schedule of this Cron. # noqa: E501 + :rtype: str + """ + return self._schedule + + @schedule.setter + def schedule(self, schedule): + """Sets the schedule of this Cron. + + The cron schedule expression (e.g., \"0 0 * * *\") # noqa: E501 + + :param schedule: The schedule of this Cron. # noqa: E501 + :type: str + """ + + self._schedule = schedule + + 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(Cron, 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, Cron): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Cron): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/delete_email_option.py b/swagger_client/models/delete_email_option.py new file mode 100644 index 0000000..2672c2c --- /dev/null +++ b/swagger_client/models/delete_email_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class DeleteEmailOption(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 = { + 'emails': 'list[str]' + } + + attribute_map = { + 'emails': 'emails' + } + + def __init__(self, emails=None, _configuration=None): # noqa: E501 + """DeleteEmailOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._emails = None + self.discriminator = None + + if emails is not None: + self.emails = emails + + @property + def emails(self): + """Gets the emails of this DeleteEmailOption. # noqa: E501 + + email addresses to delete # noqa: E501 + + :return: The emails of this DeleteEmailOption. # noqa: E501 + :rtype: list[str] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this DeleteEmailOption. + + email addresses to delete # noqa: E501 + + :param emails: The emails of this DeleteEmailOption. # noqa: E501 + :type: list[str] + """ + + self._emails = emails + + 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(DeleteEmailOption, 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, DeleteEmailOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeleteEmailOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/delete_file_options.py b/swagger_client/models/delete_file_options.py new file mode 100644 index 0000000..9f72a45 --- /dev/null +++ b/swagger_client/models/delete_file_options.py @@ -0,0 +1,316 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class DeleteFileOptions(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 = { + 'author': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'dates': 'CommitDateOptions', + 'message': 'str', + 'new_branch': 'str', + 'sha': 'str', + 'signoff': 'bool' + } + + attribute_map = { + 'author': 'author', + 'branch': 'branch', + 'committer': 'committer', + 'dates': 'dates', + 'message': 'message', + 'new_branch': 'new_branch', + 'sha': 'sha', + 'signoff': 'signoff' + } + + def __init__(self, author=None, branch=None, committer=None, dates=None, message=None, new_branch=None, sha=None, signoff=None, _configuration=None): # noqa: E501 + """DeleteFileOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._branch = None + self._committer = None + self._dates = None + self._message = None + self._new_branch = None + self._sha = None + self._signoff = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + if committer is not None: + self.committer = committer + if dates is not None: + self.dates = dates + if message is not None: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + self.sha = sha + if signoff is not None: + self.signoff = signoff + + @property + def author(self): + """Gets the author of this DeleteFileOptions. # noqa: E501 + + + :return: The author of this DeleteFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this DeleteFileOptions. + + + :param author: The author of this DeleteFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this DeleteFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this DeleteFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this DeleteFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this DeleteFileOptions. # noqa: E501 + + + :return: The committer of this DeleteFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this DeleteFileOptions. + + + :param committer: The committer of this DeleteFileOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def dates(self): + """Gets the dates of this DeleteFileOptions. # noqa: E501 + + + :return: The dates of this DeleteFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this DeleteFileOptions. + + + :param dates: The dates of this DeleteFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + + @property + def message(self): + """Gets the message of this DeleteFileOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this DeleteFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this DeleteFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this DeleteFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this DeleteFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this DeleteFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def sha(self): + """Gets the sha of this DeleteFileOptions. # noqa: E501 + + the blob ID (SHA) for the file that already exists, it is required for changing existing files # noqa: E501 + + :return: The sha of this DeleteFileOptions. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this DeleteFileOptions. + + the blob ID (SHA) for the file that already exists, it is required for changing existing files # noqa: E501 + + :param sha: The sha of this DeleteFileOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and sha is None: + raise ValueError("Invalid value for `sha`, must not be `None`") # noqa: E501 + + self._sha = sha + + @property + def signoff(self): + """Gets the signoff of this DeleteFileOptions. # noqa: E501 + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :return: The signoff of this DeleteFileOptions. # noqa: E501 + :rtype: bool + """ + return self._signoff + + @signoff.setter + def signoff(self, signoff): + """Sets the signoff of this DeleteFileOptions. + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :param signoff: The signoff of this DeleteFileOptions. # noqa: E501 + :type: bool + """ + + self._signoff = signoff + + 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(DeleteFileOptions, 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, DeleteFileOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeleteFileOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/deploy_key.py b/swagger_client/models/deploy_key.py new file mode 100644 index 0000000..8098661 --- /dev/null +++ b/swagger_client/models/deploy_key.py @@ -0,0 +1,345 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class DeployKey(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 = { + 'created_at': 'datetime', + 'fingerprint': 'str', + 'id': 'int', + 'key': 'str', + 'key_id': 'int', + 'read_only': 'bool', + 'repository': 'Repository', + 'title': 'str', + 'url': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'fingerprint': 'fingerprint', + 'id': 'id', + 'key': 'key', + 'key_id': 'key_id', + 'read_only': 'read_only', + 'repository': 'repository', + 'title': 'title', + 'url': 'url' + } + + def __init__(self, created_at=None, fingerprint=None, id=None, key=None, key_id=None, read_only=None, repository=None, title=None, url=None, _configuration=None): # noqa: E501 + """DeployKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._fingerprint = None + self._id = None + self._key = None + self._key_id = None + self._read_only = None + self._repository = None + self._title = None + self._url = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if fingerprint is not None: + self.fingerprint = fingerprint + if id is not None: + self.id = id + if key is not None: + self.key = key + if key_id is not None: + self.key_id = key_id + if read_only is not None: + self.read_only = read_only + if repository is not None: + self.repository = repository + if title is not None: + self.title = title + if url is not None: + self.url = url + + @property + def created_at(self): + """Gets the created_at of this DeployKey. # noqa: E501 + + + :return: The created_at of this DeployKey. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this DeployKey. + + + :param created_at: The created_at of this DeployKey. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def fingerprint(self): + """Gets the fingerprint of this DeployKey. # noqa: E501 + + Fingerprint is the key's fingerprint # noqa: E501 + + :return: The fingerprint of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._fingerprint + + @fingerprint.setter + def fingerprint(self, fingerprint): + """Sets the fingerprint of this DeployKey. + + Fingerprint is the key's fingerprint # noqa: E501 + + :param fingerprint: The fingerprint of this DeployKey. # noqa: E501 + :type: str + """ + + self._fingerprint = fingerprint + + @property + def id(self): + """Gets the id of this DeployKey. # noqa: E501 + + ID is the unique identifier for the deploy key # noqa: E501 + + :return: The id of this DeployKey. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeployKey. + + ID is the unique identifier for the deploy key # noqa: E501 + + :param id: The id of this DeployKey. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def key(self): + """Gets the key of this DeployKey. # noqa: E501 + + Key contains the actual SSH key content # noqa: E501 + + :return: The key of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this DeployKey. + + Key contains the actual SSH key content # noqa: E501 + + :param key: The key of this DeployKey. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def key_id(self): + """Gets the key_id of this DeployKey. # noqa: E501 + + KeyID is the associated public key ID # noqa: E501 + + :return: The key_id of this DeployKey. # noqa: E501 + :rtype: int + """ + return self._key_id + + @key_id.setter + def key_id(self, key_id): + """Sets the key_id of this DeployKey. + + KeyID is the associated public key ID # noqa: E501 + + :param key_id: The key_id of this DeployKey. # noqa: E501 + :type: int + """ + + self._key_id = key_id + + @property + def read_only(self): + """Gets the read_only of this DeployKey. # noqa: E501 + + ReadOnly indicates if the key has read-only access # noqa: E501 + + :return: The read_only of this DeployKey. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this DeployKey. + + ReadOnly indicates if the key has read-only access # noqa: E501 + + :param read_only: The read_only of this DeployKey. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def repository(self): + """Gets the repository of this DeployKey. # noqa: E501 + + + :return: The repository of this DeployKey. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this DeployKey. + + + :param repository: The repository of this DeployKey. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def title(self): + """Gets the title of this DeployKey. # noqa: E501 + + Title is the human-readable name for the key # noqa: E501 + + :return: The title of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this DeployKey. + + Title is the human-readable name for the key # noqa: E501 + + :param title: The title of this DeployKey. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def url(self): + """Gets the url of this DeployKey. # noqa: E501 + + URL is the API URL for this deploy key # noqa: E501 + + :return: The url of this DeployKey. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this DeployKey. + + URL is the API URL for this deploy key # noqa: E501 + + :param url: The url of this DeployKey. # 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(DeployKey, 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, DeployKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeployKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/dismiss_pull_review_options.py b/swagger_client/models/dismiss_pull_review_options.py new file mode 100644 index 0000000..827b34a --- /dev/null +++ b/swagger_client/models/dismiss_pull_review_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class DismissPullReviewOptions(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 = { + 'message': 'str', + 'priors': 'bool' + } + + attribute_map = { + 'message': 'message', + 'priors': 'priors' + } + + def __init__(self, message=None, priors=None, _configuration=None): # noqa: E501 + """DismissPullReviewOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._priors = None + self.discriminator = None + + if message is not None: + self.message = message + if priors is not None: + self.priors = priors + + @property + def message(self): + """Gets the message of this DismissPullReviewOptions. # noqa: E501 + + + :return: The message of this DismissPullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this DismissPullReviewOptions. + + + :param message: The message of this DismissPullReviewOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def priors(self): + """Gets the priors of this DismissPullReviewOptions. # noqa: E501 + + + :return: The priors of this DismissPullReviewOptions. # noqa: E501 + :rtype: bool + """ + return self._priors + + @priors.setter + def priors(self, priors): + """Sets the priors of this DismissPullReviewOptions. + + + :param priors: The priors of this DismissPullReviewOptions. # noqa: E501 + :type: bool + """ + + self._priors = priors + + 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(DismissPullReviewOptions, 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, DismissPullReviewOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DismissPullReviewOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_attachment_options.py b/swagger_client/models/edit_attachment_options.py new file mode 100644 index 0000000..fb7df6d --- /dev/null +++ b/swagger_client/models/edit_attachment_options.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditAttachmentOptions(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, _configuration=None): # noqa: E501 + """EditAttachmentOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self.discriminator = None + + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this EditAttachmentOptions. # noqa: E501 + + Name is the new filename for the attachment # noqa: E501 + + :return: The name of this EditAttachmentOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditAttachmentOptions. + + Name is the new filename for the attachment # noqa: E501 + + :param name: The name of this EditAttachmentOptions. # 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(EditAttachmentOptions, 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, EditAttachmentOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditAttachmentOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_branch_protection_option.py b/swagger_client/models/edit_branch_protection_option.py new file mode 100644 index 0000000..b89e8aa --- /dev/null +++ b/swagger_client/models/edit_branch_protection_option.py @@ -0,0 +1,851 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditBranchProtectionOption(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 = { + 'approvals_whitelist_teams': 'list[str]', + 'approvals_whitelist_username': 'list[str]', + 'block_admin_merge_override': 'bool', + 'block_on_official_review_requests': 'bool', + 'block_on_outdated_branch': 'bool', + 'block_on_rejected_reviews': 'bool', + 'dismiss_stale_approvals': 'bool', + 'enable_approvals_whitelist': 'bool', + 'enable_force_push': 'bool', + 'enable_force_push_allowlist': 'bool', + 'enable_merge_whitelist': 'bool', + 'enable_push': 'bool', + 'enable_push_whitelist': 'bool', + 'enable_status_check': 'bool', + 'force_push_allowlist_deploy_keys': 'bool', + 'force_push_allowlist_teams': 'list[str]', + 'force_push_allowlist_usernames': 'list[str]', + 'ignore_stale_approvals': 'bool', + 'merge_whitelist_teams': 'list[str]', + 'merge_whitelist_usernames': 'list[str]', + 'priority': 'int', + 'protected_file_patterns': 'str', + 'push_whitelist_deploy_keys': 'bool', + 'push_whitelist_teams': 'list[str]', + 'push_whitelist_usernames': 'list[str]', + 'require_signed_commits': 'bool', + 'required_approvals': 'int', + 'status_check_contexts': 'list[str]', + 'unprotected_file_patterns': 'str' + } + + attribute_map = { + 'approvals_whitelist_teams': 'approvals_whitelist_teams', + 'approvals_whitelist_username': 'approvals_whitelist_username', + 'block_admin_merge_override': 'block_admin_merge_override', + 'block_on_official_review_requests': 'block_on_official_review_requests', + 'block_on_outdated_branch': 'block_on_outdated_branch', + 'block_on_rejected_reviews': 'block_on_rejected_reviews', + 'dismiss_stale_approvals': 'dismiss_stale_approvals', + 'enable_approvals_whitelist': 'enable_approvals_whitelist', + 'enable_force_push': 'enable_force_push', + 'enable_force_push_allowlist': 'enable_force_push_allowlist', + 'enable_merge_whitelist': 'enable_merge_whitelist', + 'enable_push': 'enable_push', + 'enable_push_whitelist': 'enable_push_whitelist', + 'enable_status_check': 'enable_status_check', + 'force_push_allowlist_deploy_keys': 'force_push_allowlist_deploy_keys', + 'force_push_allowlist_teams': 'force_push_allowlist_teams', + 'force_push_allowlist_usernames': 'force_push_allowlist_usernames', + 'ignore_stale_approvals': 'ignore_stale_approvals', + 'merge_whitelist_teams': 'merge_whitelist_teams', + 'merge_whitelist_usernames': 'merge_whitelist_usernames', + 'priority': 'priority', + 'protected_file_patterns': 'protected_file_patterns', + 'push_whitelist_deploy_keys': 'push_whitelist_deploy_keys', + 'push_whitelist_teams': 'push_whitelist_teams', + 'push_whitelist_usernames': 'push_whitelist_usernames', + 'require_signed_commits': 'require_signed_commits', + 'required_approvals': 'required_approvals', + 'status_check_contexts': 'status_check_contexts', + 'unprotected_file_patterns': 'unprotected_file_patterns' + } + + def __init__(self, approvals_whitelist_teams=None, approvals_whitelist_username=None, block_admin_merge_override=None, block_on_official_review_requests=None, block_on_outdated_branch=None, block_on_rejected_reviews=None, dismiss_stale_approvals=None, enable_approvals_whitelist=None, enable_force_push=None, enable_force_push_allowlist=None, enable_merge_whitelist=None, enable_push=None, enable_push_whitelist=None, enable_status_check=None, force_push_allowlist_deploy_keys=None, force_push_allowlist_teams=None, force_push_allowlist_usernames=None, ignore_stale_approvals=None, merge_whitelist_teams=None, merge_whitelist_usernames=None, priority=None, protected_file_patterns=None, push_whitelist_deploy_keys=None, push_whitelist_teams=None, push_whitelist_usernames=None, require_signed_commits=None, required_approvals=None, status_check_contexts=None, unprotected_file_patterns=None, _configuration=None): # noqa: E501 + """EditBranchProtectionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._approvals_whitelist_teams = None + self._approvals_whitelist_username = None + self._block_admin_merge_override = None + self._block_on_official_review_requests = None + self._block_on_outdated_branch = None + self._block_on_rejected_reviews = None + self._dismiss_stale_approvals = None + self._enable_approvals_whitelist = None + self._enable_force_push = None + self._enable_force_push_allowlist = None + self._enable_merge_whitelist = None + self._enable_push = None + self._enable_push_whitelist = None + self._enable_status_check = None + self._force_push_allowlist_deploy_keys = None + self._force_push_allowlist_teams = None + self._force_push_allowlist_usernames = None + self._ignore_stale_approvals = None + self._merge_whitelist_teams = None + self._merge_whitelist_usernames = None + self._priority = None + self._protected_file_patterns = None + self._push_whitelist_deploy_keys = None + self._push_whitelist_teams = None + self._push_whitelist_usernames = None + self._require_signed_commits = None + self._required_approvals = None + self._status_check_contexts = None + self._unprotected_file_patterns = None + self.discriminator = None + + if approvals_whitelist_teams is not None: + self.approvals_whitelist_teams = approvals_whitelist_teams + if approvals_whitelist_username is not None: + self.approvals_whitelist_username = approvals_whitelist_username + if block_admin_merge_override is not None: + self.block_admin_merge_override = block_admin_merge_override + if block_on_official_review_requests is not None: + self.block_on_official_review_requests = block_on_official_review_requests + if block_on_outdated_branch is not None: + self.block_on_outdated_branch = block_on_outdated_branch + if block_on_rejected_reviews is not None: + self.block_on_rejected_reviews = block_on_rejected_reviews + if dismiss_stale_approvals is not None: + self.dismiss_stale_approvals = dismiss_stale_approvals + if enable_approvals_whitelist is not None: + self.enable_approvals_whitelist = enable_approvals_whitelist + if enable_force_push is not None: + self.enable_force_push = enable_force_push + if enable_force_push_allowlist is not None: + self.enable_force_push_allowlist = enable_force_push_allowlist + if enable_merge_whitelist is not None: + self.enable_merge_whitelist = enable_merge_whitelist + if enable_push is not None: + self.enable_push = enable_push + if enable_push_whitelist is not None: + self.enable_push_whitelist = enable_push_whitelist + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if force_push_allowlist_deploy_keys is not None: + self.force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + if force_push_allowlist_teams is not None: + self.force_push_allowlist_teams = force_push_allowlist_teams + if force_push_allowlist_usernames is not None: + self.force_push_allowlist_usernames = force_push_allowlist_usernames + if ignore_stale_approvals is not None: + self.ignore_stale_approvals = ignore_stale_approvals + if merge_whitelist_teams is not None: + self.merge_whitelist_teams = merge_whitelist_teams + if merge_whitelist_usernames is not None: + self.merge_whitelist_usernames = merge_whitelist_usernames + if priority is not None: + self.priority = priority + if protected_file_patterns is not None: + self.protected_file_patterns = protected_file_patterns + if push_whitelist_deploy_keys is not None: + self.push_whitelist_deploy_keys = push_whitelist_deploy_keys + if push_whitelist_teams is not None: + self.push_whitelist_teams = push_whitelist_teams + if push_whitelist_usernames is not None: + self.push_whitelist_usernames = push_whitelist_usernames + if require_signed_commits is not None: + self.require_signed_commits = require_signed_commits + if required_approvals is not None: + self.required_approvals = required_approvals + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if unprotected_file_patterns is not None: + self.unprotected_file_patterns = unprotected_file_patterns + + @property + def approvals_whitelist_teams(self): + """Gets the approvals_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_teams + + @approvals_whitelist_teams.setter + def approvals_whitelist_teams(self, approvals_whitelist_teams): + """Sets the approvals_whitelist_teams of this EditBranchProtectionOption. + + + :param approvals_whitelist_teams: The approvals_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_teams = approvals_whitelist_teams + + @property + def approvals_whitelist_username(self): + """Gets the approvals_whitelist_username of this EditBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_username of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_username + + @approvals_whitelist_username.setter + def approvals_whitelist_username(self, approvals_whitelist_username): + """Sets the approvals_whitelist_username of this EditBranchProtectionOption. + + + :param approvals_whitelist_username: The approvals_whitelist_username of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_username = approvals_whitelist_username + + @property + def block_admin_merge_override(self): + """Gets the block_admin_merge_override of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_admin_merge_override of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_admin_merge_override + + @block_admin_merge_override.setter + def block_admin_merge_override(self, block_admin_merge_override): + """Sets the block_admin_merge_override of this EditBranchProtectionOption. + + + :param block_admin_merge_override: The block_admin_merge_override of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_admin_merge_override = block_admin_merge_override + + @property + def block_on_official_review_requests(self): + """Gets the block_on_official_review_requests of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_on_official_review_requests of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_official_review_requests + + @block_on_official_review_requests.setter + def block_on_official_review_requests(self, block_on_official_review_requests): + """Sets the block_on_official_review_requests of this EditBranchProtectionOption. + + + :param block_on_official_review_requests: The block_on_official_review_requests of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_official_review_requests = block_on_official_review_requests + + @property + def block_on_outdated_branch(self): + """Gets the block_on_outdated_branch of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_on_outdated_branch of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_outdated_branch + + @block_on_outdated_branch.setter + def block_on_outdated_branch(self, block_on_outdated_branch): + """Sets the block_on_outdated_branch of this EditBranchProtectionOption. + + + :param block_on_outdated_branch: The block_on_outdated_branch of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_outdated_branch = block_on_outdated_branch + + @property + def block_on_rejected_reviews(self): + """Gets the block_on_rejected_reviews of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_on_rejected_reviews of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_rejected_reviews + + @block_on_rejected_reviews.setter + def block_on_rejected_reviews(self, block_on_rejected_reviews): + """Sets the block_on_rejected_reviews of this EditBranchProtectionOption. + + + :param block_on_rejected_reviews: The block_on_rejected_reviews of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_rejected_reviews = block_on_rejected_reviews + + @property + def dismiss_stale_approvals(self): + """Gets the dismiss_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + + + :return: The dismiss_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._dismiss_stale_approvals + + @dismiss_stale_approvals.setter + def dismiss_stale_approvals(self, dismiss_stale_approvals): + """Sets the dismiss_stale_approvals of this EditBranchProtectionOption. + + + :param dismiss_stale_approvals: The dismiss_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._dismiss_stale_approvals = dismiss_stale_approvals + + @property + def enable_approvals_whitelist(self): + """Gets the enable_approvals_whitelist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_approvals_whitelist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_approvals_whitelist + + @enable_approvals_whitelist.setter + def enable_approvals_whitelist(self, enable_approvals_whitelist): + """Sets the enable_approvals_whitelist of this EditBranchProtectionOption. + + + :param enable_approvals_whitelist: The enable_approvals_whitelist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_approvals_whitelist = enable_approvals_whitelist + + @property + def enable_force_push(self): + """Gets the enable_force_push of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_force_push of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push + + @enable_force_push.setter + def enable_force_push(self, enable_force_push): + """Sets the enable_force_push of this EditBranchProtectionOption. + + + :param enable_force_push: The enable_force_push of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_force_push = enable_force_push + + @property + def enable_force_push_allowlist(self): + """Gets the enable_force_push_allowlist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_force_push_allowlist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_force_push_allowlist + + @enable_force_push_allowlist.setter + def enable_force_push_allowlist(self, enable_force_push_allowlist): + """Sets the enable_force_push_allowlist of this EditBranchProtectionOption. + + + :param enable_force_push_allowlist: The enable_force_push_allowlist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_force_push_allowlist = enable_force_push_allowlist + + @property + def enable_merge_whitelist(self): + """Gets the enable_merge_whitelist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_merge_whitelist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_merge_whitelist + + @enable_merge_whitelist.setter + def enable_merge_whitelist(self, enable_merge_whitelist): + """Sets the enable_merge_whitelist of this EditBranchProtectionOption. + + + :param enable_merge_whitelist: The enable_merge_whitelist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_merge_whitelist = enable_merge_whitelist + + @property + def enable_push(self): + """Gets the enable_push of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_push of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push + + @enable_push.setter + def enable_push(self, enable_push): + """Sets the enable_push of this EditBranchProtectionOption. + + + :param enable_push: The enable_push of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push = enable_push + + @property + def enable_push_whitelist(self): + """Gets the enable_push_whitelist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_push_whitelist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push_whitelist + + @enable_push_whitelist.setter + def enable_push_whitelist(self, enable_push_whitelist): + """Sets the enable_push_whitelist of this EditBranchProtectionOption. + + + :param enable_push_whitelist: The enable_push_whitelist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push_whitelist = enable_push_whitelist + + @property + def enable_status_check(self): + """Gets the enable_status_check of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_status_check of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this EditBranchProtectionOption. + + + :param enable_status_check: The enable_status_check of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def force_push_allowlist_deploy_keys(self): + """Gets the force_push_allowlist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._force_push_allowlist_deploy_keys + + @force_push_allowlist_deploy_keys.setter + def force_push_allowlist_deploy_keys(self, force_push_allowlist_deploy_keys): + """Sets the force_push_allowlist_deploy_keys of this EditBranchProtectionOption. + + + :param force_push_allowlist_deploy_keys: The force_push_allowlist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._force_push_allowlist_deploy_keys = force_push_allowlist_deploy_keys + + @property + def force_push_allowlist_teams(self): + """Gets the force_push_allowlist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_teams + + @force_push_allowlist_teams.setter + def force_push_allowlist_teams(self, force_push_allowlist_teams): + """Sets the force_push_allowlist_teams of this EditBranchProtectionOption. + + + :param force_push_allowlist_teams: The force_push_allowlist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_teams = force_push_allowlist_teams + + @property + def force_push_allowlist_usernames(self): + """Gets the force_push_allowlist_usernames of this EditBranchProtectionOption. # noqa: E501 + + + :return: The force_push_allowlist_usernames of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._force_push_allowlist_usernames + + @force_push_allowlist_usernames.setter + def force_push_allowlist_usernames(self, force_push_allowlist_usernames): + """Sets the force_push_allowlist_usernames of this EditBranchProtectionOption. + + + :param force_push_allowlist_usernames: The force_push_allowlist_usernames of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._force_push_allowlist_usernames = force_push_allowlist_usernames + + @property + def ignore_stale_approvals(self): + """Gets the ignore_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + + + :return: The ignore_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._ignore_stale_approvals + + @ignore_stale_approvals.setter + def ignore_stale_approvals(self, ignore_stale_approvals): + """Sets the ignore_stale_approvals of this EditBranchProtectionOption. + + + :param ignore_stale_approvals: The ignore_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._ignore_stale_approvals = ignore_stale_approvals + + @property + def merge_whitelist_teams(self): + """Gets the merge_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_teams + + @merge_whitelist_teams.setter + def merge_whitelist_teams(self, merge_whitelist_teams): + """Sets the merge_whitelist_teams of this EditBranchProtectionOption. + + + :param merge_whitelist_teams: The merge_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_teams = merge_whitelist_teams + + @property + def merge_whitelist_usernames(self): + """Gets the merge_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_usernames + + @merge_whitelist_usernames.setter + def merge_whitelist_usernames(self, merge_whitelist_usernames): + """Sets the merge_whitelist_usernames of this EditBranchProtectionOption. + + + :param merge_whitelist_usernames: The merge_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_usernames = merge_whitelist_usernames + + @property + def priority(self): + """Gets the priority of this EditBranchProtectionOption. # noqa: E501 + + + :return: The priority of this EditBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this EditBranchProtectionOption. + + + :param priority: The priority of this EditBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._priority = priority + + @property + def protected_file_patterns(self): + """Gets the protected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + + + :return: The protected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._protected_file_patterns + + @protected_file_patterns.setter + def protected_file_patterns(self, protected_file_patterns): + """Sets the protected_file_patterns of this EditBranchProtectionOption. + + + :param protected_file_patterns: The protected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._protected_file_patterns = protected_file_patterns + + @property + def push_whitelist_deploy_keys(self): + """Gets the push_whitelist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._push_whitelist_deploy_keys + + @push_whitelist_deploy_keys.setter + def push_whitelist_deploy_keys(self, push_whitelist_deploy_keys): + """Sets the push_whitelist_deploy_keys of this EditBranchProtectionOption. + + + :param push_whitelist_deploy_keys: The push_whitelist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._push_whitelist_deploy_keys = push_whitelist_deploy_keys + + @property + def push_whitelist_teams(self): + """Gets the push_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_teams + + @push_whitelist_teams.setter + def push_whitelist_teams(self, push_whitelist_teams): + """Sets the push_whitelist_teams of this EditBranchProtectionOption. + + + :param push_whitelist_teams: The push_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_teams = push_whitelist_teams + + @property + def push_whitelist_usernames(self): + """Gets the push_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_usernames + + @push_whitelist_usernames.setter + def push_whitelist_usernames(self, push_whitelist_usernames): + """Sets the push_whitelist_usernames of this EditBranchProtectionOption. + + + :param push_whitelist_usernames: The push_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_usernames = push_whitelist_usernames + + @property + def require_signed_commits(self): + """Gets the require_signed_commits of this EditBranchProtectionOption. # noqa: E501 + + + :return: The require_signed_commits of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._require_signed_commits + + @require_signed_commits.setter + def require_signed_commits(self, require_signed_commits): + """Sets the require_signed_commits of this EditBranchProtectionOption. + + + :param require_signed_commits: The require_signed_commits of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._require_signed_commits = require_signed_commits + + @property + def required_approvals(self): + """Gets the required_approvals of this EditBranchProtectionOption. # noqa: E501 + + + :return: The required_approvals of this EditBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this EditBranchProtectionOption. + + + :param required_approvals: The required_approvals of this EditBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this EditBranchProtectionOption. # noqa: E501 + + + :return: The status_check_contexts of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this EditBranchProtectionOption. + + + :param status_check_contexts: The status_check_contexts of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def unprotected_file_patterns(self): + """Gets the unprotected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + + + :return: The unprotected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._unprotected_file_patterns + + @unprotected_file_patterns.setter + def unprotected_file_patterns(self, unprotected_file_patterns): + """Sets the unprotected_file_patterns of this EditBranchProtectionOption. + + + :param unprotected_file_patterns: The unprotected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._unprotected_file_patterns = unprotected_file_patterns + + 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(EditBranchProtectionOption, 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, EditBranchProtectionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditBranchProtectionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_deadline_option.py b/swagger_client/models/edit_deadline_option.py new file mode 100644 index 0000000..55fc79c --- /dev/null +++ b/swagger_client/models/edit_deadline_option.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditDeadlineOption(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 = { + 'due_date': 'datetime' + } + + attribute_map = { + 'due_date': 'due_date' + } + + def __init__(self, due_date=None, _configuration=None): # noqa: E501 + """EditDeadlineOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._due_date = None + self.discriminator = None + + self.due_date = due_date + + @property + def due_date(self): + """Gets the due_date of this EditDeadlineOption. # noqa: E501 + + + :return: The due_date of this EditDeadlineOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this EditDeadlineOption. + + + :param due_date: The due_date of this EditDeadlineOption. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and due_date is None: + raise ValueError("Invalid value for `due_date`, must not be `None`") # noqa: E501 + + self._due_date = due_date + + 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(EditDeadlineOption, 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, EditDeadlineOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditDeadlineOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_git_hook_option.py b/swagger_client/models/edit_git_hook_option.py new file mode 100644 index 0000000..8865883 --- /dev/null +++ b/swagger_client/models/edit_git_hook_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditGitHookOption(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, _configuration=None): # noqa: E501 + """EditGitHookOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self.discriminator = None + + if content is not None: + self.content = content + + @property + def content(self): + """Gets the content of this EditGitHookOption. # noqa: E501 + + Content is the new script content for the hook # noqa: E501 + + :return: The content of this EditGitHookOption. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this EditGitHookOption. + + Content is the new script content for the hook # noqa: E501 + + :param content: The content of this EditGitHookOption. # 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(EditGitHookOption, 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, EditGitHookOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditGitHookOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_hook_option.py b/swagger_client/models/edit_hook_option.py new file mode 100644 index 0000000..5c7a90c --- /dev/null +++ b/swagger_client/models/edit_hook_option.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditHookOption(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 = { + 'active': 'bool', + 'authorization_header': 'str', + 'branch_filter': 'str', + 'config': 'dict(str, str)', + 'events': 'list[str]' + } + + attribute_map = { + 'active': 'active', + 'authorization_header': 'authorization_header', + 'branch_filter': 'branch_filter', + 'config': 'config', + 'events': 'events' + } + + def __init__(self, active=None, authorization_header=None, branch_filter=None, config=None, events=None, _configuration=None): # noqa: E501 + """EditHookOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._authorization_header = None + self._branch_filter = None + self._config = None + self._events = None + self.discriminator = None + + if active is not None: + self.active = active + if authorization_header is not None: + self.authorization_header = authorization_header + if branch_filter is not None: + self.branch_filter = branch_filter + if config is not None: + self.config = config + if events is not None: + self.events = events + + @property + def active(self): + """Gets the active of this EditHookOption. # noqa: E501 + + Whether the webhook is active and will be triggered # noqa: E501 + + :return: The active of this EditHookOption. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this EditHookOption. + + Whether the webhook is active and will be triggered # noqa: E501 + + :param active: The active of this EditHookOption. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def authorization_header(self): + """Gets the authorization_header of this EditHookOption. # noqa: E501 + + Authorization header to include in webhook requests # noqa: E501 + + :return: The authorization_header of this EditHookOption. # noqa: E501 + :rtype: str + """ + return self._authorization_header + + @authorization_header.setter + def authorization_header(self, authorization_header): + """Sets the authorization_header of this EditHookOption. + + Authorization header to include in webhook requests # noqa: E501 + + :param authorization_header: The authorization_header of this EditHookOption. # noqa: E501 + :type: str + """ + + self._authorization_header = authorization_header + + @property + def branch_filter(self): + """Gets the branch_filter of this EditHookOption. # noqa: E501 + + Branch filter pattern to determine which branches trigger the webhook # noqa: E501 + + :return: The branch_filter of this EditHookOption. # noqa: E501 + :rtype: str + """ + return self._branch_filter + + @branch_filter.setter + def branch_filter(self, branch_filter): + """Sets the branch_filter of this EditHookOption. + + Branch filter pattern to determine which branches trigger the webhook # noqa: E501 + + :param branch_filter: The branch_filter of this EditHookOption. # noqa: E501 + :type: str + """ + + self._branch_filter = branch_filter + + @property + def config(self): + """Gets the config of this EditHookOption. # noqa: E501 + + Configuration settings for the webhook # noqa: E501 + + :return: The config of this EditHookOption. # noqa: E501 + :rtype: dict(str, str) + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this EditHookOption. + + Configuration settings for the webhook # noqa: E501 + + :param config: The config of this EditHookOption. # noqa: E501 + :type: dict(str, str) + """ + + self._config = config + + @property + def events(self): + """Gets the events of this EditHookOption. # noqa: E501 + + List of events that trigger this webhook # noqa: E501 + + :return: The events of this EditHookOption. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this EditHookOption. + + List of events that trigger this webhook # noqa: E501 + + :param events: The events of this EditHookOption. # noqa: E501 + :type: list[str] + """ + + self._events = events + + 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(EditHookOption, 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, EditHookOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditHookOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_issue_comment_option.py b/swagger_client/models/edit_issue_comment_option.py new file mode 100644 index 0000000..cf0e830 --- /dev/null +++ b/swagger_client/models/edit_issue_comment_option.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditIssueCommentOption(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 = { + 'body': 'str' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None, _configuration=None): # noqa: E501 + """EditIssueCommentOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self.discriminator = None + + self.body = body + + @property + def body(self): + """Gets the body of this EditIssueCommentOption. # noqa: E501 + + + :return: The body of this EditIssueCommentOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditIssueCommentOption. + + + :param body: The body of this EditIssueCommentOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and body is None: + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + 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(EditIssueCommentOption, 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, EditIssueCommentOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditIssueCommentOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_issue_option.py b/swagger_client/models/edit_issue_option.py new file mode 100644 index 0000000..05138ea --- /dev/null +++ b/swagger_client/models/edit_issue_option.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditIssueOption(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 = { + 'assignee': 'str', + 'assignees': 'list[str]', + 'body': 'str', + 'due_date': 'datetime', + 'milestone': 'int', + 'ref': 'str', + 'state': 'str', + 'title': 'str', + 'unset_due_date': 'bool' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'due_date': 'due_date', + 'milestone': 'milestone', + 'ref': 'ref', + 'state': 'state', + 'title': 'title', + 'unset_due_date': 'unset_due_date' + } + + def __init__(self, assignee=None, assignees=None, body=None, due_date=None, milestone=None, ref=None, state=None, title=None, unset_due_date=None, _configuration=None): # noqa: E501 + """EditIssueOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assignee = None + self._assignees = None + self._body = None + self._due_date = None + self._milestone = None + self._ref = None + self._state = None + self._title = None + self._unset_due_date = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if due_date is not None: + self.due_date = due_date + if milestone is not None: + self.milestone = milestone + if ref is not None: + self.ref = ref + if state is not None: + self.state = state + if title is not None: + self.title = title + if unset_due_date is not None: + self.unset_due_date = unset_due_date + + @property + def assignee(self): + """Gets the assignee of this EditIssueOption. # noqa: E501 + + deprecated # noqa: E501 + + :return: The assignee of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this EditIssueOption. + + deprecated # noqa: E501 + + :param assignee: The assignee of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this EditIssueOption. # noqa: E501 + + + :return: The assignees of this EditIssueOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this EditIssueOption. + + + :param assignees: The assignees of this EditIssueOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this EditIssueOption. # noqa: E501 + + + :return: The body of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditIssueOption. + + + :param body: The body of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def due_date(self): + """Gets the due_date of this EditIssueOption. # noqa: E501 + + + :return: The due_date of this EditIssueOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this EditIssueOption. + + + :param due_date: The due_date of this EditIssueOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def milestone(self): + """Gets the milestone of this EditIssueOption. # noqa: E501 + + + :return: The milestone of this EditIssueOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this EditIssueOption. + + + :param milestone: The milestone of this EditIssueOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def ref(self): + """Gets the ref of this EditIssueOption. # noqa: E501 + + + :return: The ref of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this EditIssueOption. + + + :param ref: The ref of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def state(self): + """Gets the state of this EditIssueOption. # noqa: E501 + + + :return: The state of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this EditIssueOption. + + + :param state: The state of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def title(self): + """Gets the title of this EditIssueOption. # noqa: E501 + + + :return: The title of this EditIssueOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this EditIssueOption. + + + :param title: The title of this EditIssueOption. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def unset_due_date(self): + """Gets the unset_due_date of this EditIssueOption. # noqa: E501 + + + :return: The unset_due_date of this EditIssueOption. # noqa: E501 + :rtype: bool + """ + return self._unset_due_date + + @unset_due_date.setter + def unset_due_date(self, unset_due_date): + """Sets the unset_due_date of this EditIssueOption. + + + :param unset_due_date: The unset_due_date of this EditIssueOption. # noqa: E501 + :type: bool + """ + + self._unset_due_date = unset_due_date + + 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(EditIssueOption, 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, EditIssueOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditIssueOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_label_option.py b/swagger_client/models/edit_label_option.py new file mode 100644 index 0000000..38ca536 --- /dev/null +++ b/swagger_client/models/edit_label_option.py @@ -0,0 +1,231 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditLabelOption(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 = { + 'color': 'str', + 'description': 'str', + 'exclusive': 'bool', + 'is_archived': 'bool', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'exclusive': 'exclusive', + 'is_archived': 'is_archived', + 'name': 'name' + } + + def __init__(self, color=None, description=None, exclusive=None, is_archived=None, name=None, _configuration=None): # noqa: E501 + """EditLabelOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._color = None + self._description = None + self._exclusive = None + self._is_archived = None + self._name = None + self.discriminator = None + + if color is not None: + self.color = color + if description is not None: + self.description = description + if exclusive is not None: + self.exclusive = exclusive + if is_archived is not None: + self.is_archived = is_archived + if name is not None: + self.name = name + + @property + def color(self): + """Gets the color of this EditLabelOption. # noqa: E501 + + + :return: The color of this EditLabelOption. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this EditLabelOption. + + + :param color: The color of this EditLabelOption. # noqa: E501 + :type: str + """ + + self._color = color + + @property + def description(self): + """Gets the description of this EditLabelOption. # noqa: E501 + + Description provides additional context about the label's purpose # noqa: E501 + + :return: The description of this EditLabelOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditLabelOption. + + Description provides additional context about the label's purpose # noqa: E501 + + :param description: The description of this EditLabelOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def exclusive(self): + """Gets the exclusive of this EditLabelOption. # noqa: E501 + + + :return: The exclusive of this EditLabelOption. # noqa: E501 + :rtype: bool + """ + return self._exclusive + + @exclusive.setter + def exclusive(self, exclusive): + """Sets the exclusive of this EditLabelOption. + + + :param exclusive: The exclusive of this EditLabelOption. # noqa: E501 + :type: bool + """ + + self._exclusive = exclusive + + @property + def is_archived(self): + """Gets the is_archived of this EditLabelOption. # noqa: E501 + + + :return: The is_archived of this EditLabelOption. # noqa: E501 + :rtype: bool + """ + return self._is_archived + + @is_archived.setter + def is_archived(self, is_archived): + """Sets the is_archived of this EditLabelOption. + + + :param is_archived: The is_archived of this EditLabelOption. # noqa: E501 + :type: bool + """ + + self._is_archived = is_archived + + @property + def name(self): + """Gets the name of this EditLabelOption. # noqa: E501 + + Name is the new display name for the label # noqa: E501 + + :return: The name of this EditLabelOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditLabelOption. + + Name is the new display name for the label # noqa: E501 + + :param name: The name of this EditLabelOption. # 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(EditLabelOption, 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, EditLabelOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditLabelOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_milestone_option.py b/swagger_client/models/edit_milestone_option.py new file mode 100644 index 0000000..347e70f --- /dev/null +++ b/swagger_client/models/edit_milestone_option.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditMilestoneOption(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', + 'due_on': 'datetime', + 'state': 'str', + 'title': 'str' + } + + attribute_map = { + 'description': 'description', + 'due_on': 'due_on', + 'state': 'state', + 'title': 'title' + } + + def __init__(self, description=None, due_on=None, state=None, title=None, _configuration=None): # noqa: E501 + """EditMilestoneOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._due_on = None + self._state = None + self._title = None + self.discriminator = None + + if description is not None: + self.description = description + if due_on is not None: + self.due_on = due_on + if state is not None: + self.state = state + if title is not None: + self.title = title + + @property + def description(self): + """Gets the description of this EditMilestoneOption. # noqa: E501 + + Description provides updated details about the milestone # noqa: E501 + + :return: The description of this EditMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditMilestoneOption. + + Description provides updated details about the milestone # noqa: E501 + + :param description: The description of this EditMilestoneOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def due_on(self): + """Gets the due_on of this EditMilestoneOption. # noqa: E501 + + Deadline is the updated due date for the milestone # noqa: E501 + + :return: The due_on of this EditMilestoneOption. # noqa: E501 + :rtype: datetime + """ + return self._due_on + + @due_on.setter + def due_on(self, due_on): + """Sets the due_on of this EditMilestoneOption. + + Deadline is the updated due date for the milestone # noqa: E501 + + :param due_on: The due_on of this EditMilestoneOption. # noqa: E501 + :type: datetime + """ + + self._due_on = due_on + + @property + def state(self): + """Gets the state of this EditMilestoneOption. # noqa: E501 + + State indicates the updated state of the milestone # noqa: E501 + + :return: The state of this EditMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this EditMilestoneOption. + + State indicates the updated state of the milestone # noqa: E501 + + :param state: The state of this EditMilestoneOption. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def title(self): + """Gets the title of this EditMilestoneOption. # noqa: E501 + + Title is the updated title of the milestone # noqa: E501 + + :return: The title of this EditMilestoneOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this EditMilestoneOption. + + Title is the updated title of the milestone # noqa: E501 + + :param title: The title of this EditMilestoneOption. # noqa: E501 + :type: str + """ + + self._title = title + + 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(EditMilestoneOption, 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, EditMilestoneOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditMilestoneOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_org_option.py b/swagger_client/models/edit_org_option.py new file mode 100644 index 0000000..3870a2f --- /dev/null +++ b/swagger_client/models/edit_org_option.py @@ -0,0 +1,300 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditOrgOption(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', + 'email': 'str', + 'full_name': 'str', + 'location': 'str', + 'repo_admin_change_team_access': 'bool', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'email': 'email', + 'full_name': 'full_name', + 'location': 'location', + 'repo_admin_change_team_access': 'repo_admin_change_team_access', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, description=None, email=None, full_name=None, location=None, repo_admin_change_team_access=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """EditOrgOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._email = None + self._full_name = None + self._location = None + self._repo_admin_change_team_access = None + self._visibility = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if email is not None: + self.email = email + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + if repo_admin_change_team_access is not None: + self.repo_admin_change_team_access = repo_admin_change_team_access + if visibility is not None: + self.visibility = visibility + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this EditOrgOption. # noqa: E501 + + The description of the organization # noqa: E501 + + :return: The description of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditOrgOption. + + The description of the organization # noqa: E501 + + :param description: The description of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def email(self): + """Gets the email of this EditOrgOption. # noqa: E501 + + The email address of the organization # noqa: E501 + + :return: The email of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this EditOrgOption. + + The email address of the organization # noqa: E501 + + :param email: The email of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this EditOrgOption. # noqa: E501 + + The full display name of the organization # noqa: E501 + + :return: The full_name of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this EditOrgOption. + + The full display name of the organization # noqa: E501 + + :param full_name: The full_name of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def location(self): + """Gets the location of this EditOrgOption. # noqa: E501 + + The location of the organization # noqa: E501 + + :return: The location of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this EditOrgOption. + + The location of the organization # noqa: E501 + + :param location: The location of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def repo_admin_change_team_access(self): + """Gets the repo_admin_change_team_access of this EditOrgOption. # noqa: E501 + + Whether repository administrators can change team access # noqa: E501 + + :return: The repo_admin_change_team_access of this EditOrgOption. # noqa: E501 + :rtype: bool + """ + return self._repo_admin_change_team_access + + @repo_admin_change_team_access.setter + def repo_admin_change_team_access(self, repo_admin_change_team_access): + """Sets the repo_admin_change_team_access of this EditOrgOption. + + Whether repository administrators can change team access # noqa: E501 + + :param repo_admin_change_team_access: The repo_admin_change_team_access of this EditOrgOption. # noqa: E501 + :type: bool + """ + + self._repo_admin_change_team_access = repo_admin_change_team_access + + @property + def visibility(self): + """Gets the visibility of this EditOrgOption. # noqa: E501 + + possible values are `public`, `limited` or `private` # noqa: E501 + + :return: The visibility of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this EditOrgOption. + + possible values are `public`, `limited` or `private` # noqa: E501 + + :param visibility: The visibility of this EditOrgOption. # noqa: E501 + :type: str + """ + allowed_values = ["public", "limited", "private"] # noqa: E501 + if (self._configuration.client_side_validation and + visibility not in allowed_values): + raise ValueError( + "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 + .format(visibility, allowed_values) + ) + + self._visibility = visibility + + @property + def website(self): + """Gets the website of this EditOrgOption. # noqa: E501 + + The website URL of the organization # noqa: E501 + + :return: The website of this EditOrgOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this EditOrgOption. + + The website URL of the organization # noqa: E501 + + :param website: The website of this EditOrgOption. # noqa: E501 + :type: str + """ + + self._website = website + + 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(EditOrgOption, 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, EditOrgOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditOrgOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_pull_request_option.py b/swagger_client/models/edit_pull_request_option.py new file mode 100644 index 0000000..6450dc3 --- /dev/null +++ b/swagger_client/models/edit_pull_request_option.py @@ -0,0 +1,403 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditPullRequestOption(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 = { + 'allow_maintainer_edit': 'bool', + 'assignee': 'str', + 'assignees': 'list[str]', + 'base': 'str', + 'body': 'str', + 'due_date': 'datetime', + 'labels': 'list[int]', + 'milestone': 'int', + 'state': 'str', + 'title': 'str', + 'unset_due_date': 'bool' + } + + attribute_map = { + 'allow_maintainer_edit': 'allow_maintainer_edit', + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'due_date': 'due_date', + 'labels': 'labels', + 'milestone': 'milestone', + 'state': 'state', + 'title': 'title', + 'unset_due_date': 'unset_due_date' + } + + def __init__(self, allow_maintainer_edit=None, assignee=None, assignees=None, base=None, body=None, due_date=None, labels=None, milestone=None, state=None, title=None, unset_due_date=None, _configuration=None): # noqa: E501 + """EditPullRequestOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allow_maintainer_edit = None + self._assignee = None + self._assignees = None + self._base = None + self._body = None + self._due_date = None + self._labels = None + self._milestone = None + self._state = None + self._title = None + self._unset_due_date = None + self.discriminator = None + + if allow_maintainer_edit is not None: + self.allow_maintainer_edit = allow_maintainer_edit + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if base is not None: + self.base = base + if body is not None: + self.body = body + if due_date is not None: + self.due_date = due_date + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if state is not None: + self.state = state + if title is not None: + self.title = title + if unset_due_date is not None: + self.unset_due_date = unset_due_date + + @property + def allow_maintainer_edit(self): + """Gets the allow_maintainer_edit of this EditPullRequestOption. # noqa: E501 + + Whether to allow maintainer edits # noqa: E501 + + :return: The allow_maintainer_edit of this EditPullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._allow_maintainer_edit + + @allow_maintainer_edit.setter + def allow_maintainer_edit(self, allow_maintainer_edit): + """Sets the allow_maintainer_edit of this EditPullRequestOption. + + Whether to allow maintainer edits # noqa: E501 + + :param allow_maintainer_edit: The allow_maintainer_edit of this EditPullRequestOption. # noqa: E501 + :type: bool + """ + + self._allow_maintainer_edit = allow_maintainer_edit + + @property + def assignee(self): + """Gets the assignee of this EditPullRequestOption. # noqa: E501 + + The new primary assignee username # noqa: E501 + + :return: The assignee of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this EditPullRequestOption. + + The new primary assignee username # noqa: E501 + + :param assignee: The assignee of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this EditPullRequestOption. # noqa: E501 + + The new list of assignee usernames # noqa: E501 + + :return: The assignees of this EditPullRequestOption. # noqa: E501 + :rtype: list[str] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this EditPullRequestOption. + + The new list of assignee usernames # noqa: E501 + + :param assignees: The assignees of this EditPullRequestOption. # noqa: E501 + :type: list[str] + """ + + self._assignees = assignees + + @property + def base(self): + """Gets the base of this EditPullRequestOption. # noqa: E501 + + The new base branch for the pull request # noqa: E501 + + :return: The base of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this EditPullRequestOption. + + The new base branch for the pull request # noqa: E501 + + :param base: The base of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._base = base + + @property + def body(self): + """Gets the body of this EditPullRequestOption. # noqa: E501 + + The new description body for the pull request # noqa: E501 + + :return: The body of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditPullRequestOption. + + The new description body for the pull request # noqa: E501 + + :param body: The body of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def due_date(self): + """Gets the due_date of this EditPullRequestOption. # noqa: E501 + + + :return: The due_date of this EditPullRequestOption. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this EditPullRequestOption. + + + :param due_date: The due_date of this EditPullRequestOption. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def labels(self): + """Gets the labels of this EditPullRequestOption. # noqa: E501 + + The new list of label IDs for the pull request # noqa: E501 + + :return: The labels of this EditPullRequestOption. # noqa: E501 + :rtype: list[int] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this EditPullRequestOption. + + The new list of label IDs for the pull request # noqa: E501 + + :param labels: The labels of this EditPullRequestOption. # noqa: E501 + :type: list[int] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this EditPullRequestOption. # noqa: E501 + + The new milestone ID for the pull request # noqa: E501 + + :return: The milestone of this EditPullRequestOption. # noqa: E501 + :rtype: int + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this EditPullRequestOption. + + The new milestone ID for the pull request # noqa: E501 + + :param milestone: The milestone of this EditPullRequestOption. # noqa: E501 + :type: int + """ + + self._milestone = milestone + + @property + def state(self): + """Gets the state of this EditPullRequestOption. # noqa: E501 + + The new state for the pull request # noqa: E501 + + :return: The state of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this EditPullRequestOption. + + The new state for the pull request # noqa: E501 + + :param state: The state of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def title(self): + """Gets the title of this EditPullRequestOption. # noqa: E501 + + The new title for the pull request # noqa: E501 + + :return: The title of this EditPullRequestOption. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this EditPullRequestOption. + + The new title for the pull request # noqa: E501 + + :param title: The title of this EditPullRequestOption. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def unset_due_date(self): + """Gets the unset_due_date of this EditPullRequestOption. # noqa: E501 + + Whether to remove the current deadline # noqa: E501 + + :return: The unset_due_date of this EditPullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._unset_due_date + + @unset_due_date.setter + def unset_due_date(self, unset_due_date): + """Sets the unset_due_date of this EditPullRequestOption. + + Whether to remove the current deadline # noqa: E501 + + :param unset_due_date: The unset_due_date of this EditPullRequestOption. # noqa: E501 + :type: bool + """ + + self._unset_due_date = unset_due_date + + 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(EditPullRequestOption, 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, EditPullRequestOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditPullRequestOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_reaction_option.py b/swagger_client/models/edit_reaction_option.py new file mode 100644 index 0000000..e4b4fb0 --- /dev/null +++ b/swagger_client/models/edit_reaction_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditReactionOption(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, _configuration=None): # noqa: E501 + """EditReactionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self.discriminator = None + + if content is not None: + self.content = content + + @property + def content(self): + """Gets the content of this EditReactionOption. # noqa: E501 + + The reaction content (e.g., emoji or reaction type) # noqa: E501 + + :return: The content of this EditReactionOption. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this EditReactionOption. + + The reaction content (e.g., emoji or reaction type) # noqa: E501 + + :param content: The content of this EditReactionOption. # 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(EditReactionOption, 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, EditReactionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditReactionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_release_option.py b/swagger_client/models/edit_release_option.py new file mode 100644 index 0000000..64cd461 --- /dev/null +++ b/swagger_client/models/edit_release_option.py @@ -0,0 +1,265 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditReleaseOption(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 = { + 'body': 'str', + 'draft': 'bool', + 'name': 'str', + 'prerelease': 'bool', + 'tag_name': 'str', + 'target_commitish': 'str' + } + + attribute_map = { + 'body': 'body', + 'draft': 'draft', + 'name': 'name', + 'prerelease': 'prerelease', + 'tag_name': 'tag_name', + 'target_commitish': 'target_commitish' + } + + def __init__(self, body=None, draft=None, name=None, prerelease=None, tag_name=None, target_commitish=None, _configuration=None): # noqa: E501 + """EditReleaseOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._draft = None + self._name = None + self._prerelease = None + self._tag_name = None + self._target_commitish = None + self.discriminator = None + + if body is not None: + self.body = body + if draft is not None: + self.draft = draft + if name is not None: + self.name = name + if prerelease is not None: + self.prerelease = prerelease + if tag_name is not None: + self.tag_name = tag_name + if target_commitish is not None: + self.target_commitish = target_commitish + + @property + def body(self): + """Gets the body of this EditReleaseOption. # noqa: E501 + + The new release notes or description # noqa: E501 + + :return: The body of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EditReleaseOption. + + The new release notes or description # noqa: E501 + + :param body: The body of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def draft(self): + """Gets the draft of this EditReleaseOption. # noqa: E501 + + Whether to change the draft status # noqa: E501 + + :return: The draft of this EditReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this EditReleaseOption. + + Whether to change the draft status # noqa: E501 + + :param draft: The draft of this EditReleaseOption. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def name(self): + """Gets the name of this EditReleaseOption. # noqa: E501 + + The new display title of the release # noqa: E501 + + :return: The name of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditReleaseOption. + + The new display title of the release # noqa: E501 + + :param name: The name of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prerelease(self): + """Gets the prerelease of this EditReleaseOption. # noqa: E501 + + Whether to change the prerelease status # noqa: E501 + + :return: The prerelease of this EditReleaseOption. # noqa: E501 + :rtype: bool + """ + return self._prerelease + + @prerelease.setter + def prerelease(self, prerelease): + """Sets the prerelease of this EditReleaseOption. + + Whether to change the prerelease status # noqa: E501 + + :param prerelease: The prerelease of this EditReleaseOption. # noqa: E501 + :type: bool + """ + + self._prerelease = prerelease + + @property + def tag_name(self): + """Gets the tag_name of this EditReleaseOption. # noqa: E501 + + The new name of the git tag # noqa: E501 + + :return: The tag_name of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this EditReleaseOption. + + The new name of the git tag # noqa: E501 + + :param tag_name: The tag_name of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._tag_name = tag_name + + @property + def target_commitish(self): + """Gets the target_commitish of this EditReleaseOption. # noqa: E501 + + The new target commitish for the release # noqa: E501 + + :return: The target_commitish of this EditReleaseOption. # noqa: E501 + :rtype: str + """ + return self._target_commitish + + @target_commitish.setter + def target_commitish(self, target_commitish): + """Sets the target_commitish of this EditReleaseOption. + + The new target commitish for the release # noqa: E501 + + :param target_commitish: The target_commitish of this EditReleaseOption. # noqa: E501 + :type: str + """ + + self._target_commitish = target_commitish + + 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(EditReleaseOption, 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, EditReleaseOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditReleaseOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_repo_option.py b/swagger_client/models/edit_repo_option.py new file mode 100644 index 0000000..44f12b0 --- /dev/null +++ b/swagger_client/models/edit_repo_option.py @@ -0,0 +1,1015 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditRepoOption(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 = { + 'allow_fast_forward_only_merge': 'bool', + 'allow_manual_merge': 'bool', + 'allow_merge_commits': 'bool', + 'allow_rebase': 'bool', + 'allow_rebase_explicit': 'bool', + 'allow_rebase_update': 'bool', + 'allow_squash_merge': 'bool', + 'archived': 'bool', + 'autodetect_manual_merge': 'bool', + 'default_allow_maintainer_edit': 'bool', + 'default_branch': 'str', + 'default_delete_branch_after_merge': 'bool', + 'default_merge_style': 'str', + 'description': 'str', + 'enable_prune': 'bool', + 'external_tracker': 'ExternalTracker', + 'external_wiki': 'ExternalWiki', + 'has_actions': 'bool', + 'has_code': 'bool', + 'has_issues': 'bool', + 'has_packages': 'bool', + 'has_projects': 'bool', + 'has_pull_requests': 'bool', + 'has_releases': 'bool', + 'has_wiki': 'bool', + 'ignore_whitespace_conflicts': 'bool', + 'internal_tracker': 'InternalTracker', + 'mirror_interval': 'str', + 'name': 'str', + 'private': 'bool', + 'projects_mode': 'str', + 'template': 'bool', + 'website': 'str' + } + + attribute_map = { + 'allow_fast_forward_only_merge': 'allow_fast_forward_only_merge', + 'allow_manual_merge': 'allow_manual_merge', + 'allow_merge_commits': 'allow_merge_commits', + 'allow_rebase': 'allow_rebase', + 'allow_rebase_explicit': 'allow_rebase_explicit', + 'allow_rebase_update': 'allow_rebase_update', + 'allow_squash_merge': 'allow_squash_merge', + 'archived': 'archived', + 'autodetect_manual_merge': 'autodetect_manual_merge', + 'default_allow_maintainer_edit': 'default_allow_maintainer_edit', + 'default_branch': 'default_branch', + 'default_delete_branch_after_merge': 'default_delete_branch_after_merge', + 'default_merge_style': 'default_merge_style', + 'description': 'description', + 'enable_prune': 'enable_prune', + 'external_tracker': 'external_tracker', + 'external_wiki': 'external_wiki', + 'has_actions': 'has_actions', + 'has_code': 'has_code', + 'has_issues': 'has_issues', + 'has_packages': 'has_packages', + 'has_projects': 'has_projects', + 'has_pull_requests': 'has_pull_requests', + 'has_releases': 'has_releases', + 'has_wiki': 'has_wiki', + 'ignore_whitespace_conflicts': 'ignore_whitespace_conflicts', + 'internal_tracker': 'internal_tracker', + 'mirror_interval': 'mirror_interval', + 'name': 'name', + 'private': 'private', + 'projects_mode': 'projects_mode', + 'template': 'template', + 'website': 'website' + } + + def __init__(self, allow_fast_forward_only_merge=None, allow_manual_merge=None, allow_merge_commits=None, allow_rebase=None, allow_rebase_explicit=None, allow_rebase_update=None, allow_squash_merge=None, archived=None, autodetect_manual_merge=None, default_allow_maintainer_edit=None, default_branch=None, default_delete_branch_after_merge=None, default_merge_style=None, description=None, enable_prune=None, external_tracker=None, external_wiki=None, has_actions=None, has_code=None, has_issues=None, has_packages=None, has_projects=None, has_pull_requests=None, has_releases=None, has_wiki=None, ignore_whitespace_conflicts=None, internal_tracker=None, mirror_interval=None, name=None, private=None, projects_mode=None, template=None, website=None, _configuration=None): # noqa: E501 + """EditRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allow_fast_forward_only_merge = None + self._allow_manual_merge = None + self._allow_merge_commits = None + self._allow_rebase = None + self._allow_rebase_explicit = None + self._allow_rebase_update = None + self._allow_squash_merge = None + self._archived = None + self._autodetect_manual_merge = None + self._default_allow_maintainer_edit = None + self._default_branch = None + self._default_delete_branch_after_merge = None + self._default_merge_style = None + self._description = None + self._enable_prune = None + self._external_tracker = None + self._external_wiki = None + self._has_actions = None + self._has_code = None + self._has_issues = None + self._has_packages = None + self._has_projects = None + self._has_pull_requests = None + self._has_releases = None + self._has_wiki = None + self._ignore_whitespace_conflicts = None + self._internal_tracker = None + self._mirror_interval = None + self._name = None + self._private = None + self._projects_mode = None + self._template = None + self._website = None + self.discriminator = None + + if allow_fast_forward_only_merge is not None: + self.allow_fast_forward_only_merge = allow_fast_forward_only_merge + if allow_manual_merge is not None: + self.allow_manual_merge = allow_manual_merge + if allow_merge_commits is not None: + self.allow_merge_commits = allow_merge_commits + if allow_rebase is not None: + self.allow_rebase = allow_rebase + if allow_rebase_explicit is not None: + self.allow_rebase_explicit = allow_rebase_explicit + if allow_rebase_update is not None: + self.allow_rebase_update = allow_rebase_update + if allow_squash_merge is not None: + self.allow_squash_merge = allow_squash_merge + if archived is not None: + self.archived = archived + if autodetect_manual_merge is not None: + self.autodetect_manual_merge = autodetect_manual_merge + if default_allow_maintainer_edit is not None: + self.default_allow_maintainer_edit = default_allow_maintainer_edit + if default_branch is not None: + self.default_branch = default_branch + if default_delete_branch_after_merge is not None: + self.default_delete_branch_after_merge = default_delete_branch_after_merge + if default_merge_style is not None: + self.default_merge_style = default_merge_style + if description is not None: + self.description = description + if enable_prune is not None: + self.enable_prune = enable_prune + if external_tracker is not None: + self.external_tracker = external_tracker + if external_wiki is not None: + self.external_wiki = external_wiki + if has_actions is not None: + self.has_actions = has_actions + if has_code is not None: + self.has_code = has_code + if has_issues is not None: + self.has_issues = has_issues + if has_packages is not None: + self.has_packages = has_packages + if has_projects is not None: + self.has_projects = has_projects + if has_pull_requests is not None: + self.has_pull_requests = has_pull_requests + if has_releases is not None: + self.has_releases = has_releases + if has_wiki is not None: + self.has_wiki = has_wiki + if ignore_whitespace_conflicts is not None: + self.ignore_whitespace_conflicts = ignore_whitespace_conflicts + if internal_tracker is not None: + self.internal_tracker = internal_tracker + if mirror_interval is not None: + self.mirror_interval = mirror_interval + if name is not None: + self.name = name + if private is not None: + self.private = private + if projects_mode is not None: + self.projects_mode = projects_mode + if template is not None: + self.template = template + if website is not None: + self.website = website + + @property + def allow_fast_forward_only_merge(self): + """Gets the allow_fast_forward_only_merge of this EditRepoOption. # noqa: E501 + + either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. # noqa: E501 + + :return: The allow_fast_forward_only_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_fast_forward_only_merge + + @allow_fast_forward_only_merge.setter + def allow_fast_forward_only_merge(self, allow_fast_forward_only_merge): + """Sets the allow_fast_forward_only_merge of this EditRepoOption. + + either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. # noqa: E501 + + :param allow_fast_forward_only_merge: The allow_fast_forward_only_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_fast_forward_only_merge = allow_fast_forward_only_merge + + @property + def allow_manual_merge(self): + """Gets the allow_manual_merge of this EditRepoOption. # noqa: E501 + + either `true` to allow mark pr as merged manually, or `false` to prevent it. # noqa: E501 + + :return: The allow_manual_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_manual_merge + + @allow_manual_merge.setter + def allow_manual_merge(self, allow_manual_merge): + """Sets the allow_manual_merge of this EditRepoOption. + + either `true` to allow mark pr as merged manually, or `false` to prevent it. # noqa: E501 + + :param allow_manual_merge: The allow_manual_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_manual_merge = allow_manual_merge + + @property + def allow_merge_commits(self): + """Gets the allow_merge_commits of this EditRepoOption. # noqa: E501 + + either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. # noqa: E501 + + :return: The allow_merge_commits of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_merge_commits + + @allow_merge_commits.setter + def allow_merge_commits(self, allow_merge_commits): + """Sets the allow_merge_commits of this EditRepoOption. + + either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. # noqa: E501 + + :param allow_merge_commits: The allow_merge_commits of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_merge_commits = allow_merge_commits + + @property + def allow_rebase(self): + """Gets the allow_rebase of this EditRepoOption. # noqa: E501 + + either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. # noqa: E501 + + :return: The allow_rebase of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase + + @allow_rebase.setter + def allow_rebase(self, allow_rebase): + """Sets the allow_rebase of this EditRepoOption. + + either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. # noqa: E501 + + :param allow_rebase: The allow_rebase of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_rebase = allow_rebase + + @property + def allow_rebase_explicit(self): + """Gets the allow_rebase_explicit of this EditRepoOption. # noqa: E501 + + either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. # noqa: E501 + + :return: The allow_rebase_explicit of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_explicit + + @allow_rebase_explicit.setter + def allow_rebase_explicit(self, allow_rebase_explicit): + """Sets the allow_rebase_explicit of this EditRepoOption. + + either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. # noqa: E501 + + :param allow_rebase_explicit: The allow_rebase_explicit of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_rebase_explicit = allow_rebase_explicit + + @property + def allow_rebase_update(self): + """Gets the allow_rebase_update of this EditRepoOption. # noqa: E501 + + either `true` to allow updating pull request branch by rebase, or `false` to prevent it. # noqa: E501 + + :return: The allow_rebase_update of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_update + + @allow_rebase_update.setter + def allow_rebase_update(self, allow_rebase_update): + """Sets the allow_rebase_update of this EditRepoOption. + + either `true` to allow updating pull request branch by rebase, or `false` to prevent it. # noqa: E501 + + :param allow_rebase_update: The allow_rebase_update of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_rebase_update = allow_rebase_update + + @property + def allow_squash_merge(self): + """Gets the allow_squash_merge of this EditRepoOption. # noqa: E501 + + either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. # noqa: E501 + + :return: The allow_squash_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._allow_squash_merge + + @allow_squash_merge.setter + def allow_squash_merge(self, allow_squash_merge): + """Sets the allow_squash_merge of this EditRepoOption. + + either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. # noqa: E501 + + :param allow_squash_merge: The allow_squash_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._allow_squash_merge = allow_squash_merge + + @property + def archived(self): + """Gets the archived of this EditRepoOption. # noqa: E501 + + set to `true` to archive this repository. # noqa: E501 + + :return: The archived of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._archived + + @archived.setter + def archived(self, archived): + """Sets the archived of this EditRepoOption. + + set to `true` to archive this repository. # noqa: E501 + + :param archived: The archived of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._archived = archived + + @property + def autodetect_manual_merge(self): + """Gets the autodetect_manual_merge of this EditRepoOption. # noqa: E501 + + either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. # noqa: E501 + + :return: The autodetect_manual_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._autodetect_manual_merge + + @autodetect_manual_merge.setter + def autodetect_manual_merge(self, autodetect_manual_merge): + """Sets the autodetect_manual_merge of this EditRepoOption. + + either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. # noqa: E501 + + :param autodetect_manual_merge: The autodetect_manual_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._autodetect_manual_merge = autodetect_manual_merge + + @property + def default_allow_maintainer_edit(self): + """Gets the default_allow_maintainer_edit of this EditRepoOption. # noqa: E501 + + set to `true` to allow edits from maintainers by default # noqa: E501 + + :return: The default_allow_maintainer_edit of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._default_allow_maintainer_edit + + @default_allow_maintainer_edit.setter + def default_allow_maintainer_edit(self, default_allow_maintainer_edit): + """Sets the default_allow_maintainer_edit of this EditRepoOption. + + set to `true` to allow edits from maintainers by default # noqa: E501 + + :param default_allow_maintainer_edit: The default_allow_maintainer_edit of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._default_allow_maintainer_edit = default_allow_maintainer_edit + + @property + def default_branch(self): + """Gets the default_branch of this EditRepoOption. # noqa: E501 + + sets the default branch for this repository. # noqa: E501 + + :return: The default_branch of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this EditRepoOption. + + sets the default branch for this repository. # noqa: E501 + + :param default_branch: The default_branch of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @property + def default_delete_branch_after_merge(self): + """Gets the default_delete_branch_after_merge of this EditRepoOption. # noqa: E501 + + set to `true` to delete pr branch after merge by default # noqa: E501 + + :return: The default_delete_branch_after_merge of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._default_delete_branch_after_merge + + @default_delete_branch_after_merge.setter + def default_delete_branch_after_merge(self, default_delete_branch_after_merge): + """Sets the default_delete_branch_after_merge of this EditRepoOption. + + set to `true` to delete pr branch after merge by default # noqa: E501 + + :param default_delete_branch_after_merge: The default_delete_branch_after_merge of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._default_delete_branch_after_merge = default_delete_branch_after_merge + + @property + def default_merge_style(self): + """Gets the default_merge_style of this EditRepoOption. # noqa: E501 + + set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", or \"fast-forward-only\". # noqa: E501 + + :return: The default_merge_style of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_merge_style + + @default_merge_style.setter + def default_merge_style(self, default_merge_style): + """Sets the default_merge_style of this EditRepoOption. + + set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", \"squash\", or \"fast-forward-only\". # noqa: E501 + + :param default_merge_style: The default_merge_style of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._default_merge_style = default_merge_style + + @property + def description(self): + """Gets the description of this EditRepoOption. # noqa: E501 + + a short description of the repository. # noqa: E501 + + :return: The description of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditRepoOption. + + a short description of the repository. # noqa: E501 + + :param description: The description of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def enable_prune(self): + """Gets the enable_prune of this EditRepoOption. # noqa: E501 + + enable prune - remove obsolete remote-tracking references when mirroring # noqa: E501 + + :return: The enable_prune of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._enable_prune + + @enable_prune.setter + def enable_prune(self, enable_prune): + """Sets the enable_prune of this EditRepoOption. + + enable prune - remove obsolete remote-tracking references when mirroring # noqa: E501 + + :param enable_prune: The enable_prune of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._enable_prune = enable_prune + + @property + def external_tracker(self): + """Gets the external_tracker of this EditRepoOption. # noqa: E501 + + + :return: The external_tracker of this EditRepoOption. # noqa: E501 + :rtype: ExternalTracker + """ + return self._external_tracker + + @external_tracker.setter + def external_tracker(self, external_tracker): + """Sets the external_tracker of this EditRepoOption. + + + :param external_tracker: The external_tracker of this EditRepoOption. # noqa: E501 + :type: ExternalTracker + """ + + self._external_tracker = external_tracker + + @property + def external_wiki(self): + """Gets the external_wiki of this EditRepoOption. # noqa: E501 + + + :return: The external_wiki of this EditRepoOption. # noqa: E501 + :rtype: ExternalWiki + """ + return self._external_wiki + + @external_wiki.setter + def external_wiki(self, external_wiki): + """Sets the external_wiki of this EditRepoOption. + + + :param external_wiki: The external_wiki of this EditRepoOption. # noqa: E501 + :type: ExternalWiki + """ + + self._external_wiki = external_wiki + + @property + def has_actions(self): + """Gets the has_actions of this EditRepoOption. # noqa: E501 + + either `true` to enable actions unit, or `false` to disable them. # noqa: E501 + + :return: The has_actions of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_actions + + @has_actions.setter + def has_actions(self, has_actions): + """Sets the has_actions of this EditRepoOption. + + either `true` to enable actions unit, or `false` to disable them. # noqa: E501 + + :param has_actions: The has_actions of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_actions = has_actions + + @property + def has_code(self): + """Gets the has_code of this EditRepoOption. # noqa: E501 + + either `true` to enable code for this repository or `false` to disable it. # noqa: E501 + + :return: The has_code of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_code + + @has_code.setter + def has_code(self, has_code): + """Sets the has_code of this EditRepoOption. + + either `true` to enable code for this repository or `false` to disable it. # noqa: E501 + + :param has_code: The has_code of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_code = has_code + + @property + def has_issues(self): + """Gets the has_issues of this EditRepoOption. # noqa: E501 + + either `true` to enable issues for this repository or `false` to disable them. # noqa: E501 + + :return: The has_issues of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_issues + + @has_issues.setter + def has_issues(self, has_issues): + """Sets the has_issues of this EditRepoOption. + + either `true` to enable issues for this repository or `false` to disable them. # noqa: E501 + + :param has_issues: The has_issues of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_issues = has_issues + + @property + def has_packages(self): + """Gets the has_packages of this EditRepoOption. # noqa: E501 + + either `true` to enable packages unit, or `false` to disable them. # noqa: E501 + + :return: The has_packages of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_packages + + @has_packages.setter + def has_packages(self, has_packages): + """Sets the has_packages of this EditRepoOption. + + either `true` to enable packages unit, or `false` to disable them. # noqa: E501 + + :param has_packages: The has_packages of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_packages = has_packages + + @property + def has_projects(self): + """Gets the has_projects of this EditRepoOption. # noqa: E501 + + either `true` to enable project unit, or `false` to disable them. # noqa: E501 + + :return: The has_projects of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_projects + + @has_projects.setter + def has_projects(self, has_projects): + """Sets the has_projects of this EditRepoOption. + + either `true` to enable project unit, or `false` to disable them. # noqa: E501 + + :param has_projects: The has_projects of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_projects = has_projects + + @property + def has_pull_requests(self): + """Gets the has_pull_requests of this EditRepoOption. # noqa: E501 + + either `true` to allow pull requests, or `false` to prevent pull request. # noqa: E501 + + :return: The has_pull_requests of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_pull_requests + + @has_pull_requests.setter + def has_pull_requests(self, has_pull_requests): + """Sets the has_pull_requests of this EditRepoOption. + + either `true` to allow pull requests, or `false` to prevent pull request. # noqa: E501 + + :param has_pull_requests: The has_pull_requests of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_pull_requests = has_pull_requests + + @property + def has_releases(self): + """Gets the has_releases of this EditRepoOption. # noqa: E501 + + either `true` to enable releases unit, or `false` to disable them. # noqa: E501 + + :return: The has_releases of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_releases + + @has_releases.setter + def has_releases(self, has_releases): + """Sets the has_releases of this EditRepoOption. + + either `true` to enable releases unit, or `false` to disable them. # noqa: E501 + + :param has_releases: The has_releases of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_releases = has_releases + + @property + def has_wiki(self): + """Gets the has_wiki of this EditRepoOption. # noqa: E501 + + either `true` to enable the wiki for this repository or `false` to disable it. # noqa: E501 + + :return: The has_wiki of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._has_wiki + + @has_wiki.setter + def has_wiki(self, has_wiki): + """Sets the has_wiki of this EditRepoOption. + + either `true` to enable the wiki for this repository or `false` to disable it. # noqa: E501 + + :param has_wiki: The has_wiki of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._has_wiki = has_wiki + + @property + def ignore_whitespace_conflicts(self): + """Gets the ignore_whitespace_conflicts of this EditRepoOption. # noqa: E501 + + either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. # noqa: E501 + + :return: The ignore_whitespace_conflicts of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._ignore_whitespace_conflicts + + @ignore_whitespace_conflicts.setter + def ignore_whitespace_conflicts(self, ignore_whitespace_conflicts): + """Sets the ignore_whitespace_conflicts of this EditRepoOption. + + either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. # noqa: E501 + + :param ignore_whitespace_conflicts: The ignore_whitespace_conflicts of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._ignore_whitespace_conflicts = ignore_whitespace_conflicts + + @property + def internal_tracker(self): + """Gets the internal_tracker of this EditRepoOption. # noqa: E501 + + + :return: The internal_tracker of this EditRepoOption. # noqa: E501 + :rtype: InternalTracker + """ + return self._internal_tracker + + @internal_tracker.setter + def internal_tracker(self, internal_tracker): + """Sets the internal_tracker of this EditRepoOption. + + + :param internal_tracker: The internal_tracker of this EditRepoOption. # noqa: E501 + :type: InternalTracker + """ + + self._internal_tracker = internal_tracker + + @property + def mirror_interval(self): + """Gets the mirror_interval of this EditRepoOption. # noqa: E501 + + set to a string like `8h30m0s` to set the mirror interval time # noqa: E501 + + :return: The mirror_interval of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._mirror_interval + + @mirror_interval.setter + def mirror_interval(self, mirror_interval): + """Sets the mirror_interval of this EditRepoOption. + + set to a string like `8h30m0s` to set the mirror interval time # noqa: E501 + + :param mirror_interval: The mirror_interval of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._mirror_interval = mirror_interval + + @property + def name(self): + """Gets the name of this EditRepoOption. # noqa: E501 + + name of the repository # noqa: E501 + + :return: The name of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditRepoOption. + + name of the repository # noqa: E501 + + :param name: The name of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def private(self): + """Gets the private of this EditRepoOption. # noqa: E501 + + either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. # noqa: E501 + + :return: The private of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this EditRepoOption. + + either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. # noqa: E501 + + :param private: The private of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def projects_mode(self): + """Gets the projects_mode of this EditRepoOption. # noqa: E501 + + `repo` to only allow repo-level projects, `owner` to only allow owner projects, `all` to allow both. # noqa: E501 + + :return: The projects_mode of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._projects_mode + + @projects_mode.setter + def projects_mode(self, projects_mode): + """Sets the projects_mode of this EditRepoOption. + + `repo` to only allow repo-level projects, `owner` to only allow owner projects, `all` to allow both. # noqa: E501 + + :param projects_mode: The projects_mode of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._projects_mode = projects_mode + + @property + def template(self): + """Gets the template of this EditRepoOption. # noqa: E501 + + either `true` to make this repository a template or `false` to make it a normal repository # noqa: E501 + + :return: The template of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this EditRepoOption. + + either `true` to make this repository a template or `false` to make it a normal repository # noqa: E501 + + :param template: The template of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._template = template + + @property + def website(self): + """Gets the website of this EditRepoOption. # noqa: E501 + + a URL with more information about the repository. # noqa: E501 + + :return: The website of this EditRepoOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this EditRepoOption. + + a URL with more information about the repository. # noqa: E501 + + :param website: The website of this EditRepoOption. # noqa: E501 + :type: str + """ + + self._website = website + + 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(EditRepoOption, 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, EditRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_tag_protection_option.py b/swagger_client/models/edit_tag_protection_option.py new file mode 100644 index 0000000..ed3ecc9 --- /dev/null +++ b/swagger_client/models/edit_tag_protection_option.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditTagProtectionOption(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_pattern': 'str', + 'whitelist_teams': 'list[str]', + 'whitelist_usernames': 'list[str]' + } + + attribute_map = { + 'name_pattern': 'name_pattern', + 'whitelist_teams': 'whitelist_teams', + 'whitelist_usernames': 'whitelist_usernames' + } + + def __init__(self, name_pattern=None, whitelist_teams=None, whitelist_usernames=None, _configuration=None): # noqa: E501 + """EditTagProtectionOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name_pattern = None + self._whitelist_teams = None + self._whitelist_usernames = None + self.discriminator = None + + if name_pattern is not None: + self.name_pattern = name_pattern + if whitelist_teams is not None: + self.whitelist_teams = whitelist_teams + if whitelist_usernames is not None: + self.whitelist_usernames = whitelist_usernames + + @property + def name_pattern(self): + """Gets the name_pattern of this EditTagProtectionOption. # noqa: E501 + + The pattern to match tag names for protection # noqa: E501 + + :return: The name_pattern of this EditTagProtectionOption. # noqa: E501 + :rtype: str + """ + return self._name_pattern + + @name_pattern.setter + def name_pattern(self, name_pattern): + """Sets the name_pattern of this EditTagProtectionOption. + + The pattern to match tag names for protection # noqa: E501 + + :param name_pattern: The name_pattern of this EditTagProtectionOption. # noqa: E501 + :type: str + """ + + self._name_pattern = name_pattern + + @property + def whitelist_teams(self): + """Gets the whitelist_teams of this EditTagProtectionOption. # noqa: E501 + + List of team names allowed to create/delete protected tags # noqa: E501 + + :return: The whitelist_teams of this EditTagProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_teams + + @whitelist_teams.setter + def whitelist_teams(self, whitelist_teams): + """Sets the whitelist_teams of this EditTagProtectionOption. + + List of team names allowed to create/delete protected tags # noqa: E501 + + :param whitelist_teams: The whitelist_teams of this EditTagProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._whitelist_teams = whitelist_teams + + @property + def whitelist_usernames(self): + """Gets the whitelist_usernames of this EditTagProtectionOption. # noqa: E501 + + List of usernames allowed to create/delete protected tags # noqa: E501 + + :return: The whitelist_usernames of this EditTagProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_usernames + + @whitelist_usernames.setter + def whitelist_usernames(self, whitelist_usernames): + """Sets the whitelist_usernames of this EditTagProtectionOption. + + List of usernames allowed to create/delete protected tags # noqa: E501 + + :param whitelist_usernames: The whitelist_usernames of this EditTagProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._whitelist_usernames = whitelist_usernames + + 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(EditTagProtectionOption, 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, EditTagProtectionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditTagProtectionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_team_option.py b/swagger_client/models/edit_team_option.py new file mode 100644 index 0000000..aa61e6f --- /dev/null +++ b/swagger_client/models/edit_team_option.py @@ -0,0 +1,293 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditTeamOption(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 = { + 'can_create_org_repo': 'bool', + 'description': 'str', + 'includes_all_repositories': 'bool', + 'name': 'str', + 'permission': 'str', + 'units': 'list[str]', + 'units_map': 'dict(str, str)' + } + + attribute_map = { + 'can_create_org_repo': 'can_create_org_repo', + 'description': 'description', + 'includes_all_repositories': 'includes_all_repositories', + 'name': 'name', + 'permission': 'permission', + 'units': 'units', + 'units_map': 'units_map' + } + + def __init__(self, can_create_org_repo=None, description=None, includes_all_repositories=None, name=None, permission=None, units=None, units_map=None, _configuration=None): # noqa: E501 + """EditTeamOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._can_create_org_repo = None + self._description = None + self._includes_all_repositories = None + self._name = None + self._permission = None + self._units = None + self._units_map = None + self.discriminator = None + + if can_create_org_repo is not None: + self.can_create_org_repo = can_create_org_repo + if description is not None: + self.description = description + if includes_all_repositories is not None: + self.includes_all_repositories = includes_all_repositories + self.name = name + if permission is not None: + self.permission = permission + if units is not None: + self.units = units + if units_map is not None: + self.units_map = units_map + + @property + def can_create_org_repo(self): + """Gets the can_create_org_repo of this EditTeamOption. # noqa: E501 + + Whether the team can create repositories in the organization # noqa: E501 + + :return: The can_create_org_repo of this EditTeamOption. # noqa: E501 + :rtype: bool + """ + return self._can_create_org_repo + + @can_create_org_repo.setter + def can_create_org_repo(self, can_create_org_repo): + """Sets the can_create_org_repo of this EditTeamOption. + + Whether the team can create repositories in the organization # noqa: E501 + + :param can_create_org_repo: The can_create_org_repo of this EditTeamOption. # noqa: E501 + :type: bool + """ + + self._can_create_org_repo = can_create_org_repo + + @property + def description(self): + """Gets the description of this EditTeamOption. # noqa: E501 + + The description of the team # noqa: E501 + + :return: The description of this EditTeamOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditTeamOption. + + The description of the team # noqa: E501 + + :param description: The description of this EditTeamOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def includes_all_repositories(self): + """Gets the includes_all_repositories of this EditTeamOption. # noqa: E501 + + Whether the team has access to all repositories in the organization # noqa: E501 + + :return: The includes_all_repositories of this EditTeamOption. # noqa: E501 + :rtype: bool + """ + return self._includes_all_repositories + + @includes_all_repositories.setter + def includes_all_repositories(self, includes_all_repositories): + """Sets the includes_all_repositories of this EditTeamOption. + + Whether the team has access to all repositories in the organization # noqa: E501 + + :param includes_all_repositories: The includes_all_repositories of this EditTeamOption. # noqa: E501 + :type: bool + """ + + self._includes_all_repositories = includes_all_repositories + + @property + def name(self): + """Gets the name of this EditTeamOption. # noqa: E501 + + + :return: The name of this EditTeamOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EditTeamOption. + + + :param name: The name of this EditTeamOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def permission(self): + """Gets the permission of this EditTeamOption. # noqa: E501 + + + :return: The permission of this EditTeamOption. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this EditTeamOption. + + + :param permission: The permission of this EditTeamOption. # noqa: E501 + :type: str + """ + allowed_values = ["read", "write", "admin"] # noqa: E501 + if (self._configuration.client_side_validation and + permission not in allowed_values): + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + @property + def units(self): + """Gets the units of this EditTeamOption. # noqa: E501 + + + :return: The units of this EditTeamOption. # noqa: E501 + :rtype: list[str] + """ + return self._units + + @units.setter + def units(self, units): + """Sets the units of this EditTeamOption. + + + :param units: The units of this EditTeamOption. # noqa: E501 + :type: list[str] + """ + + self._units = units + + @property + def units_map(self): + """Gets the units_map of this EditTeamOption. # noqa: E501 + + + :return: The units_map of this EditTeamOption. # noqa: E501 + :rtype: dict(str, str) + """ + return self._units_map + + @units_map.setter + def units_map(self, units_map): + """Sets the units_map of this EditTeamOption. + + + :param units_map: The units_map of this EditTeamOption. # noqa: E501 + :type: dict(str, str) + """ + + self._units_map = units_map + + 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(EditTeamOption, 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, EditTeamOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditTeamOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/edit_user_option.py b/swagger_client/models/edit_user_option.py new file mode 100644 index 0000000..c330945 --- /dev/null +++ b/swagger_client/models/edit_user_option.py @@ -0,0 +1,599 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class EditUserOption(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 = { + 'active': 'bool', + 'admin': 'bool', + 'allow_create_organization': 'bool', + 'allow_git_hook': 'bool', + 'allow_import_local': 'bool', + 'description': 'str', + 'email': 'str', + 'full_name': 'str', + 'location': 'str', + 'login_name': 'str', + 'max_repo_creation': 'int', + 'must_change_password': 'bool', + 'password': 'str', + 'prohibit_login': 'bool', + 'restricted': 'bool', + 'source_id': 'int', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'active': 'active', + 'admin': 'admin', + 'allow_create_organization': 'allow_create_organization', + 'allow_git_hook': 'allow_git_hook', + 'allow_import_local': 'allow_import_local', + 'description': 'description', + 'email': 'email', + 'full_name': 'full_name', + 'location': 'location', + 'login_name': 'login_name', + 'max_repo_creation': 'max_repo_creation', + 'must_change_password': 'must_change_password', + 'password': 'password', + 'prohibit_login': 'prohibit_login', + 'restricted': 'restricted', + 'source_id': 'source_id', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, active=None, admin=None, allow_create_organization=None, allow_git_hook=None, allow_import_local=None, description=None, email=None, full_name=None, location=None, login_name='empty', max_repo_creation=None, must_change_password=None, password=None, prohibit_login=None, restricted=None, source_id=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """EditUserOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._admin = None + self._allow_create_organization = None + self._allow_git_hook = None + self._allow_import_local = None + self._description = None + self._email = None + self._full_name = None + self._location = None + self._login_name = None + self._max_repo_creation = None + self._must_change_password = None + self._password = None + self._prohibit_login = None + self._restricted = None + self._source_id = None + self._visibility = None + self._website = None + self.discriminator = None + + if active is not None: + self.active = active + if admin is not None: + self.admin = admin + if allow_create_organization is not None: + self.allow_create_organization = allow_create_organization + if allow_git_hook is not None: + self.allow_git_hook = allow_git_hook + if allow_import_local is not None: + self.allow_import_local = allow_import_local + if description is not None: + self.description = description + if email is not None: + self.email = email + if full_name is not None: + self.full_name = full_name + if location is not None: + self.location = location + self.login_name = login_name + if max_repo_creation is not None: + self.max_repo_creation = max_repo_creation + if must_change_password is not None: + self.must_change_password = must_change_password + if password is not None: + self.password = password + if prohibit_login is not None: + self.prohibit_login = prohibit_login + if restricted is not None: + self.restricted = restricted + self.source_id = source_id + if visibility is not None: + self.visibility = visibility + if website is not None: + self.website = website + + @property + def active(self): + """Gets the active of this EditUserOption. # noqa: E501 + + Whether the user account is active # noqa: E501 + + :return: The active of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this EditUserOption. + + Whether the user account is active # noqa: E501 + + :param active: The active of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def admin(self): + """Gets the admin of this EditUserOption. # noqa: E501 + + Whether the user has administrator privileges # noqa: E501 + + :return: The admin of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._admin + + @admin.setter + def admin(self, admin): + """Sets the admin of this EditUserOption. + + Whether the user has administrator privileges # noqa: E501 + + :param admin: The admin of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._admin = admin + + @property + def allow_create_organization(self): + """Gets the allow_create_organization of this EditUserOption. # noqa: E501 + + Whether the user can create organizations # noqa: E501 + + :return: The allow_create_organization of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._allow_create_organization + + @allow_create_organization.setter + def allow_create_organization(self, allow_create_organization): + """Sets the allow_create_organization of this EditUserOption. + + Whether the user can create organizations # noqa: E501 + + :param allow_create_organization: The allow_create_organization of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._allow_create_organization = allow_create_organization + + @property + def allow_git_hook(self): + """Gets the allow_git_hook of this EditUserOption. # noqa: E501 + + Whether the user can use Git hooks # noqa: E501 + + :return: The allow_git_hook of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._allow_git_hook + + @allow_git_hook.setter + def allow_git_hook(self, allow_git_hook): + """Sets the allow_git_hook of this EditUserOption. + + Whether the user can use Git hooks # noqa: E501 + + :param allow_git_hook: The allow_git_hook of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._allow_git_hook = allow_git_hook + + @property + def allow_import_local(self): + """Gets the allow_import_local of this EditUserOption. # noqa: E501 + + Whether the user can import local repositories # noqa: E501 + + :return: The allow_import_local of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._allow_import_local + + @allow_import_local.setter + def allow_import_local(self, allow_import_local): + """Sets the allow_import_local of this EditUserOption. + + Whether the user can import local repositories # noqa: E501 + + :param allow_import_local: The allow_import_local of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._allow_import_local = allow_import_local + + @property + def description(self): + """Gets the description of this EditUserOption. # noqa: E501 + + The user's personal description or bio # noqa: E501 + + :return: The description of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EditUserOption. + + The user's personal description or bio # noqa: E501 + + :param description: The description of this EditUserOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def email(self): + """Gets the email of this EditUserOption. # noqa: E501 + + + :return: The email of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this EditUserOption. + + + :param email: The email of this EditUserOption. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this EditUserOption. # noqa: E501 + + The full display name of the user # noqa: E501 + + :return: The full_name of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this EditUserOption. + + The full display name of the user # noqa: E501 + + :param full_name: The full_name of this EditUserOption. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def location(self): + """Gets the location of this EditUserOption. # noqa: E501 + + The user's location or address # noqa: E501 + + :return: The location of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this EditUserOption. + + The user's location or address # noqa: E501 + + :param location: The location of this EditUserOption. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def login_name(self): + """Gets the login_name of this EditUserOption. # noqa: E501 + + identifier of the user, provided by the external authenticator (if configured) # noqa: E501 + + :return: The login_name of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._login_name + + @login_name.setter + def login_name(self, login_name): + """Sets the login_name of this EditUserOption. + + identifier of the user, provided by the external authenticator (if configured) # noqa: E501 + + :param login_name: The login_name of this EditUserOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and login_name is None: + raise ValueError("Invalid value for `login_name`, must not be `None`") # noqa: E501 + + self._login_name = login_name + + @property + def max_repo_creation(self): + """Gets the max_repo_creation of this EditUserOption. # noqa: E501 + + Maximum number of repositories the user can create # noqa: E501 + + :return: The max_repo_creation of this EditUserOption. # noqa: E501 + :rtype: int + """ + return self._max_repo_creation + + @max_repo_creation.setter + def max_repo_creation(self, max_repo_creation): + """Sets the max_repo_creation of this EditUserOption. + + Maximum number of repositories the user can create # noqa: E501 + + :param max_repo_creation: The max_repo_creation of this EditUserOption. # noqa: E501 + :type: int + """ + + self._max_repo_creation = max_repo_creation + + @property + def must_change_password(self): + """Gets the must_change_password of this EditUserOption. # noqa: E501 + + Whether the user must change password on next login # noqa: E501 + + :return: The must_change_password of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._must_change_password + + @must_change_password.setter + def must_change_password(self, must_change_password): + """Sets the must_change_password of this EditUserOption. + + Whether the user must change password on next login # noqa: E501 + + :param must_change_password: The must_change_password of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._must_change_password = must_change_password + + @property + def password(self): + """Gets the password of this EditUserOption. # noqa: E501 + + The plain text password for the user # noqa: E501 + + :return: The password of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this EditUserOption. + + The plain text password for the user # noqa: E501 + + :param password: The password of this EditUserOption. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def prohibit_login(self): + """Gets the prohibit_login of this EditUserOption. # noqa: E501 + + Whether the user is prohibited from logging in # noqa: E501 + + :return: The prohibit_login of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._prohibit_login + + @prohibit_login.setter + def prohibit_login(self, prohibit_login): + """Sets the prohibit_login of this EditUserOption. + + Whether the user is prohibited from logging in # noqa: E501 + + :param prohibit_login: The prohibit_login of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._prohibit_login = prohibit_login + + @property + def restricted(self): + """Gets the restricted of this EditUserOption. # noqa: E501 + + Whether the user has restricted access privileges # noqa: E501 + + :return: The restricted of this EditUserOption. # noqa: E501 + :rtype: bool + """ + return self._restricted + + @restricted.setter + def restricted(self, restricted): + """Sets the restricted of this EditUserOption. + + Whether the user has restricted access privileges # noqa: E501 + + :param restricted: The restricted of this EditUserOption. # noqa: E501 + :type: bool + """ + + self._restricted = restricted + + @property + def source_id(self): + """Gets the source_id of this EditUserOption. # noqa: E501 + + + :return: The source_id of this EditUserOption. # noqa: E501 + :rtype: int + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this EditUserOption. + + + :param source_id: The source_id of this EditUserOption. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and source_id is None: + raise ValueError("Invalid value for `source_id`, must not be `None`") # noqa: E501 + + self._source_id = source_id + + @property + def visibility(self): + """Gets the visibility of this EditUserOption. # noqa: E501 + + User visibility level: public, limited, or private # noqa: E501 + + :return: The visibility of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this EditUserOption. + + User visibility level: public, limited, or private # noqa: E501 + + :param visibility: The visibility of this EditUserOption. # noqa: E501 + :type: str + """ + + self._visibility = visibility + + @property + def website(self): + """Gets the website of this EditUserOption. # noqa: E501 + + The user's personal website URL # noqa: E501 + + :return: The website of this EditUserOption. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this EditUserOption. + + The user's personal website URL # noqa: E501 + + :param website: The website of this EditUserOption. # noqa: E501 + :type: str + """ + + self._website = website + + 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(EditUserOption, 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, EditUserOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EditUserOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/email.py b/swagger_client/models/email.py new file mode 100644 index 0000000..6eab93a --- /dev/null +++ b/swagger_client/models/email.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Email(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 = { + 'email': 'str', + 'primary': 'bool', + 'user_id': 'int', + 'username': 'str', + 'verified': 'bool' + } + + attribute_map = { + 'email': 'email', + 'primary': 'primary', + 'user_id': 'user_id', + 'username': 'username', + 'verified': 'verified' + } + + def __init__(self, email=None, primary=None, user_id=None, username=None, verified=None, _configuration=None): # noqa: E501 + """Email - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self._primary = None + self._user_id = None + self._username = None + self._verified = None + self.discriminator = None + + if email is not None: + self.email = email + if primary is not None: + self.primary = primary + if user_id is not None: + self.user_id = user_id + if username is not None: + self.username = username + if verified is not None: + self.verified = verified + + @property + def email(self): + """Gets the email of this Email. # noqa: E501 + + + :return: The email of this Email. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Email. + + + :param email: The email of this Email. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def primary(self): + """Gets the primary of this Email. # noqa: E501 + + Whether this is the primary email address # noqa: E501 + + :return: The primary of this Email. # noqa: E501 + :rtype: bool + """ + return self._primary + + @primary.setter + def primary(self, primary): + """Sets the primary of this Email. + + Whether this is the primary email address # noqa: E501 + + :param primary: The primary of this Email. # noqa: E501 + :type: bool + """ + + self._primary = primary + + @property + def user_id(self): + """Gets the user_id of this Email. # noqa: E501 + + The unique identifier of the user who owns this email # noqa: E501 + + :return: The user_id of this Email. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Email. + + The unique identifier of the user who owns this email # noqa: E501 + + :param user_id: The user_id of this Email. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def username(self): + """Gets the username of this Email. # noqa: E501 + + username of the user # noqa: E501 + + :return: The username of this Email. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this Email. + + username of the user # noqa: E501 + + :param username: The username of this Email. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def verified(self): + """Gets the verified of this Email. # noqa: E501 + + Whether the email address has been verified # noqa: E501 + + :return: The verified of this Email. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this Email. + + Whether the email address has been verified # noqa: E501 + + :param verified: The verified of this Email. # noqa: E501 + :type: bool + """ + + self._verified = verified + + 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(Email, 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, Email): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Email): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/external_tracker.py b/swagger_client/models/external_tracker.py new file mode 100644 index 0000000..7142e3b --- /dev/null +++ b/swagger_client/models/external_tracker.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ExternalTracker(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 = { + 'external_tracker_format': 'str', + 'external_tracker_regexp_pattern': 'str', + 'external_tracker_style': 'str', + 'external_tracker_url': 'str' + } + + attribute_map = { + 'external_tracker_format': 'external_tracker_format', + 'external_tracker_regexp_pattern': 'external_tracker_regexp_pattern', + 'external_tracker_style': 'external_tracker_style', + 'external_tracker_url': 'external_tracker_url' + } + + def __init__(self, external_tracker_format=None, external_tracker_regexp_pattern=None, external_tracker_style=None, external_tracker_url=None, _configuration=None): # noqa: E501 + """ExternalTracker - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._external_tracker_format = None + self._external_tracker_regexp_pattern = None + self._external_tracker_style = None + self._external_tracker_url = None + self.discriminator = None + + if external_tracker_format is not None: + self.external_tracker_format = external_tracker_format + if external_tracker_regexp_pattern is not None: + self.external_tracker_regexp_pattern = external_tracker_regexp_pattern + if external_tracker_style is not None: + self.external_tracker_style = external_tracker_style + if external_tracker_url is not None: + self.external_tracker_url = external_tracker_url + + @property + def external_tracker_format(self): + """Gets the external_tracker_format of this ExternalTracker. # noqa: E501 + + External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. # noqa: E501 + + :return: The external_tracker_format of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_format + + @external_tracker_format.setter + def external_tracker_format(self, external_tracker_format): + """Sets the external_tracker_format of this ExternalTracker. + + External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. # noqa: E501 + + :param external_tracker_format: The external_tracker_format of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_format = external_tracker_format + + @property + def external_tracker_regexp_pattern(self): + """Gets the external_tracker_regexp_pattern of this ExternalTracker. # noqa: E501 + + External Issue Tracker issue regular expression # noqa: E501 + + :return: The external_tracker_regexp_pattern of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_regexp_pattern + + @external_tracker_regexp_pattern.setter + def external_tracker_regexp_pattern(self, external_tracker_regexp_pattern): + """Sets the external_tracker_regexp_pattern of this ExternalTracker. + + External Issue Tracker issue regular expression # noqa: E501 + + :param external_tracker_regexp_pattern: The external_tracker_regexp_pattern of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_regexp_pattern = external_tracker_regexp_pattern + + @property + def external_tracker_style(self): + """Gets the external_tracker_style of this ExternalTracker. # noqa: E501 + + External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` # noqa: E501 + + :return: The external_tracker_style of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_style + + @external_tracker_style.setter + def external_tracker_style(self, external_tracker_style): + """Sets the external_tracker_style of this ExternalTracker. + + External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` # noqa: E501 + + :param external_tracker_style: The external_tracker_style of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_style = external_tracker_style + + @property + def external_tracker_url(self): + """Gets the external_tracker_url of this ExternalTracker. # noqa: E501 + + URL of external issue tracker. # noqa: E501 + + :return: The external_tracker_url of this ExternalTracker. # noqa: E501 + :rtype: str + """ + return self._external_tracker_url + + @external_tracker_url.setter + def external_tracker_url(self, external_tracker_url): + """Sets the external_tracker_url of this ExternalTracker. + + URL of external issue tracker. # noqa: E501 + + :param external_tracker_url: The external_tracker_url of this ExternalTracker. # noqa: E501 + :type: str + """ + + self._external_tracker_url = external_tracker_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(ExternalTracker, 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, ExternalTracker): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExternalTracker): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/external_wiki.py b/swagger_client/models/external_wiki.py new file mode 100644 index 0000000..f02e7d1 --- /dev/null +++ b/swagger_client/models/external_wiki.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ExternalWiki(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 = { + 'external_wiki_url': 'str' + } + + attribute_map = { + 'external_wiki_url': 'external_wiki_url' + } + + def __init__(self, external_wiki_url=None, _configuration=None): # noqa: E501 + """ExternalWiki - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._external_wiki_url = None + self.discriminator = None + + if external_wiki_url is not None: + self.external_wiki_url = external_wiki_url + + @property + def external_wiki_url(self): + """Gets the external_wiki_url of this ExternalWiki. # noqa: E501 + + URL of external wiki. # noqa: E501 + + :return: The external_wiki_url of this ExternalWiki. # noqa: E501 + :rtype: str + """ + return self._external_wiki_url + + @external_wiki_url.setter + def external_wiki_url(self, external_wiki_url): + """Sets the external_wiki_url of this ExternalWiki. + + URL of external wiki. # noqa: E501 + + :param external_wiki_url: The external_wiki_url of this ExternalWiki. # noqa: E501 + :type: str + """ + + self._external_wiki_url = external_wiki_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(ExternalWiki, 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, ExternalWiki): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExternalWiki): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/file_commit_response.py b/swagger_client/models/file_commit_response.py new file mode 100644 index 0000000..ba41c0c --- /dev/null +++ b/swagger_client/models/file_commit_response.py @@ -0,0 +1,341 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class FileCommitResponse(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 = { + 'author': 'CommitUser', + 'committer': 'CommitUser', + 'created': 'datetime', + 'html_url': 'str', + 'message': 'str', + 'parents': 'list[CommitMeta]', + 'sha': 'str', + 'tree': 'CommitMeta', + 'url': 'str' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer', + 'created': 'created', + 'html_url': 'html_url', + 'message': 'message', + 'parents': 'parents', + 'sha': 'sha', + 'tree': 'tree', + 'url': 'url' + } + + def __init__(self, author=None, committer=None, created=None, html_url=None, message=None, parents=None, sha=None, tree=None, url=None, _configuration=None): # noqa: E501 + """FileCommitResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._committer = None + self._created = None + self._html_url = None + self._message = None + self._parents = None + self._sha = None + self._tree = None + self._url = None + self.discriminator = None + + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + if created is not None: + self.created = created + if html_url is not None: + self.html_url = html_url + if message is not None: + self.message = message + if parents is not None: + self.parents = parents + if sha is not None: + self.sha = sha + if tree is not None: + self.tree = tree + if url is not None: + self.url = url + + @property + def author(self): + """Gets the author of this FileCommitResponse. # noqa: E501 + + + :return: The author of this FileCommitResponse. # noqa: E501 + :rtype: CommitUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this FileCommitResponse. + + + :param author: The author of this FileCommitResponse. # noqa: E501 + :type: CommitUser + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this FileCommitResponse. # noqa: E501 + + + :return: The committer of this FileCommitResponse. # noqa: E501 + :rtype: CommitUser + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this FileCommitResponse. + + + :param committer: The committer of this FileCommitResponse. # noqa: E501 + :type: CommitUser + """ + + self._committer = committer + + @property + def created(self): + """Gets the created of this FileCommitResponse. # noqa: E501 + + + :return: The created of this FileCommitResponse. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this FileCommitResponse. + + + :param created: The created of this FileCommitResponse. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def html_url(self): + """Gets the html_url of this FileCommitResponse. # noqa: E501 + + HTMLURL is the web URL for viewing this commit # noqa: E501 + + :return: The html_url of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this FileCommitResponse. + + HTMLURL is the web URL for viewing this commit # noqa: E501 + + :param html_url: The html_url of this FileCommitResponse. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def message(self): + """Gets the message of this FileCommitResponse. # noqa: E501 + + Message is the commit message # noqa: E501 + + :return: The message of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this FileCommitResponse. + + Message is the commit message # noqa: E501 + + :param message: The message of this FileCommitResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def parents(self): + """Gets the parents of this FileCommitResponse. # noqa: E501 + + Parents contains parent commit metadata # noqa: E501 + + :return: The parents of this FileCommitResponse. # noqa: E501 + :rtype: list[CommitMeta] + """ + return self._parents + + @parents.setter + def parents(self, parents): + """Sets the parents of this FileCommitResponse. + + Parents contains parent commit metadata # noqa: E501 + + :param parents: The parents of this FileCommitResponse. # noqa: E501 + :type: list[CommitMeta] + """ + + self._parents = parents + + @property + def sha(self): + """Gets the sha of this FileCommitResponse. # noqa: E501 + + SHA is the commit SHA hash # noqa: E501 + + :return: The sha of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this FileCommitResponse. + + SHA is the commit SHA hash # noqa: E501 + + :param sha: The sha of this FileCommitResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def tree(self): + """Gets the tree of this FileCommitResponse. # noqa: E501 + + + :return: The tree of this FileCommitResponse. # noqa: E501 + :rtype: CommitMeta + """ + return self._tree + + @tree.setter + def tree(self, tree): + """Sets the tree of this FileCommitResponse. + + + :param tree: The tree of this FileCommitResponse. # noqa: E501 + :type: CommitMeta + """ + + self._tree = tree + + @property + def url(self): + """Gets the url of this FileCommitResponse. # noqa: E501 + + URL is the API URL for the commit # noqa: E501 + + :return: The url of this FileCommitResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this FileCommitResponse. + + URL is the API URL for the commit # noqa: E501 + + :param url: The url of this FileCommitResponse. # 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(FileCommitResponse, 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, FileCommitResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FileCommitResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/file_delete_response.py b/swagger_client/models/file_delete_response.py new file mode 100644 index 0000000..224988b --- /dev/null +++ b/swagger_client/models/file_delete_response.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class FileDeleteResponse(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 = { + 'commit': 'FileCommitResponse', + 'content': 'object', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'commit': 'commit', + 'content': 'content', + 'verification': 'verification' + } + + def __init__(self, commit=None, content=None, verification=None, _configuration=None): # noqa: E501 + """FileDeleteResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._content = None + self._verification = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if content is not None: + self.content = content + if verification is not None: + self.verification = verification + + @property + def commit(self): + """Gets the commit of this FileDeleteResponse. # noqa: E501 + + + :return: The commit of this FileDeleteResponse. # noqa: E501 + :rtype: FileCommitResponse + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this FileDeleteResponse. + + + :param commit: The commit of this FileDeleteResponse. # noqa: E501 + :type: FileCommitResponse + """ + + self._commit = commit + + @property + def content(self): + """Gets the content of this FileDeleteResponse. # noqa: E501 + + Content is always null for delete operations # noqa: E501 + + :return: The content of this FileDeleteResponse. # noqa: E501 + :rtype: object + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this FileDeleteResponse. + + Content is always null for delete operations # noqa: E501 + + :param content: The content of this FileDeleteResponse. # noqa: E501 + :type: object + """ + + self._content = content + + @property + def verification(self): + """Gets the verification of this FileDeleteResponse. # noqa: E501 + + + :return: The verification of this FileDeleteResponse. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this FileDeleteResponse. + + + :param verification: The verification of this FileDeleteResponse. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(FileDeleteResponse, 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, FileDeleteResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FileDeleteResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/file_links_response.py b/swagger_client/models/file_links_response.py new file mode 100644 index 0000000..85c1c0e --- /dev/null +++ b/swagger_client/models/file_links_response.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class FileLinksResponse(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 = { + 'git': 'str', + 'html': 'str', + '_self': 'str' + } + + attribute_map = { + 'git': 'git', + 'html': 'html', + '_self': 'self' + } + + def __init__(self, git=None, html=None, _self=None, _configuration=None): # noqa: E501 + """FileLinksResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._git = None + self._html = None + self.__self = None + self.discriminator = None + + if git is not None: + self.git = git + if html is not None: + self.html = html + if _self is not None: + self._self = _self + + @property + def git(self): + """Gets the git of this FileLinksResponse. # noqa: E501 + + GitURL is the Git API URL for this file # noqa: E501 + + :return: The git of this FileLinksResponse. # noqa: E501 + :rtype: str + """ + return self._git + + @git.setter + def git(self, git): + """Sets the git of this FileLinksResponse. + + GitURL is the Git API URL for this file # noqa: E501 + + :param git: The git of this FileLinksResponse. # noqa: E501 + :type: str + """ + + self._git = git + + @property + def html(self): + """Gets the html of this FileLinksResponse. # noqa: E501 + + HTMLURL is the web URL for this file # noqa: E501 + + :return: The html of this FileLinksResponse. # noqa: E501 + :rtype: str + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this FileLinksResponse. + + HTMLURL is the web URL for this file # noqa: E501 + + :param html: The html of this FileLinksResponse. # noqa: E501 + :type: str + """ + + self._html = html + + @property + def _self(self): + """Gets the _self of this FileLinksResponse. # noqa: E501 + + Self is the API URL for this file # noqa: E501 + + :return: The _self of this FileLinksResponse. # noqa: E501 + :rtype: str + """ + return self.__self + + @_self.setter + def _self(self, _self): + """Sets the _self of this FileLinksResponse. + + Self is the API URL for this file # noqa: E501 + + :param _self: The _self of this FileLinksResponse. # noqa: E501 + :type: str + """ + + self.__self = _self + + 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(FileLinksResponse, 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, FileLinksResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FileLinksResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/file_response.py b/swagger_client/models/file_response.py new file mode 100644 index 0000000..f90e87c --- /dev/null +++ b/swagger_client/models/file_response.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class FileResponse(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 = { + 'commit': 'FileCommitResponse', + 'content': 'ContentsResponse', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'commit': 'commit', + 'content': 'content', + 'verification': 'verification' + } + + def __init__(self, commit=None, content=None, verification=None, _configuration=None): # noqa: E501 + """FileResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._content = None + self._verification = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if content is not None: + self.content = content + if verification is not None: + self.verification = verification + + @property + def commit(self): + """Gets the commit of this FileResponse. # noqa: E501 + + + :return: The commit of this FileResponse. # noqa: E501 + :rtype: FileCommitResponse + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this FileResponse. + + + :param commit: The commit of this FileResponse. # noqa: E501 + :type: FileCommitResponse + """ + + self._commit = commit + + @property + def content(self): + """Gets the content of this FileResponse. # noqa: E501 + + + :return: The content of this FileResponse. # noqa: E501 + :rtype: ContentsResponse + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this FileResponse. + + + :param content: The content of this FileResponse. # noqa: E501 + :type: ContentsResponse + """ + + self._content = content + + @property + def verification(self): + """Gets the verification of this FileResponse. # noqa: E501 + + + :return: The verification of this FileResponse. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this FileResponse. + + + :param verification: The verification of this FileResponse. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(FileResponse, 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, FileResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FileResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/files_response.py b/swagger_client/models/files_response.py new file mode 100644 index 0000000..45ad033 --- /dev/null +++ b/swagger_client/models/files_response.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class FilesResponse(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 = { + 'commit': 'FileCommitResponse', + 'files': 'list[ContentsResponse]', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'commit': 'commit', + 'files': 'files', + 'verification': 'verification' + } + + def __init__(self, commit=None, files=None, verification=None, _configuration=None): # noqa: E501 + """FilesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._files = None + self._verification = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if files is not None: + self.files = files + if verification is not None: + self.verification = verification + + @property + def commit(self): + """Gets the commit of this FilesResponse. # noqa: E501 + + + :return: The commit of this FilesResponse. # noqa: E501 + :rtype: FileCommitResponse + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this FilesResponse. + + + :param commit: The commit of this FilesResponse. # noqa: E501 + :type: FileCommitResponse + """ + + self._commit = commit + + @property + def files(self): + """Gets the files of this FilesResponse. # noqa: E501 + + Files contains the list of file contents and metadata # noqa: E501 + + :return: The files of this FilesResponse. # noqa: E501 + :rtype: list[ContentsResponse] + """ + return self._files + + @files.setter + def files(self, files): + """Sets the files of this FilesResponse. + + Files contains the list of file contents and metadata # noqa: E501 + + :param files: The files of this FilesResponse. # noqa: E501 + :type: list[ContentsResponse] + """ + + self._files = files + + @property + def verification(self): + """Gets the verification of this FilesResponse. # noqa: E501 + + + :return: The verification of this FilesResponse. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this FilesResponse. + + + :param verification: The verification of this FilesResponse. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(FilesResponse, 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, FilesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FilesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/general_api_settings.py b/swagger_client/models/general_api_settings.py new file mode 100644 index 0000000..d924b84 --- /dev/null +++ b/swagger_client/models/general_api_settings.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GeneralAPISettings(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 = { + 'default_git_trees_per_page': 'int', + 'default_max_blob_size': 'int', + 'default_max_response_size': 'int', + 'default_paging_num': 'int', + 'max_response_items': 'int' + } + + attribute_map = { + 'default_git_trees_per_page': 'default_git_trees_per_page', + 'default_max_blob_size': 'default_max_blob_size', + 'default_max_response_size': 'default_max_response_size', + 'default_paging_num': 'default_paging_num', + 'max_response_items': 'max_response_items' + } + + def __init__(self, default_git_trees_per_page=None, default_max_blob_size=None, default_max_response_size=None, default_paging_num=None, max_response_items=None, _configuration=None): # noqa: E501 + """GeneralAPISettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._default_git_trees_per_page = None + self._default_max_blob_size = None + self._default_max_response_size = None + self._default_paging_num = None + self._max_response_items = None + self.discriminator = None + + if default_git_trees_per_page is not None: + self.default_git_trees_per_page = default_git_trees_per_page + if default_max_blob_size is not None: + self.default_max_blob_size = default_max_blob_size + if default_max_response_size is not None: + self.default_max_response_size = default_max_response_size + if default_paging_num is not None: + self.default_paging_num = default_paging_num + if max_response_items is not None: + self.max_response_items = max_response_items + + @property + def default_git_trees_per_page(self): + """Gets the default_git_trees_per_page of this GeneralAPISettings. # noqa: E501 + + DefaultGitTreesPerPage is the default number of Git tree items per page # noqa: E501 + + :return: The default_git_trees_per_page of this GeneralAPISettings. # noqa: E501 + :rtype: int + """ + return self._default_git_trees_per_page + + @default_git_trees_per_page.setter + def default_git_trees_per_page(self, default_git_trees_per_page): + """Sets the default_git_trees_per_page of this GeneralAPISettings. + + DefaultGitTreesPerPage is the default number of Git tree items per page # noqa: E501 + + :param default_git_trees_per_page: The default_git_trees_per_page of this GeneralAPISettings. # noqa: E501 + :type: int + """ + + self._default_git_trees_per_page = default_git_trees_per_page + + @property + def default_max_blob_size(self): + """Gets the default_max_blob_size of this GeneralAPISettings. # noqa: E501 + + DefaultMaxBlobSize is the default maximum blob size for API responses # noqa: E501 + + :return: The default_max_blob_size of this GeneralAPISettings. # noqa: E501 + :rtype: int + """ + return self._default_max_blob_size + + @default_max_blob_size.setter + def default_max_blob_size(self, default_max_blob_size): + """Sets the default_max_blob_size of this GeneralAPISettings. + + DefaultMaxBlobSize is the default maximum blob size for API responses # noqa: E501 + + :param default_max_blob_size: The default_max_blob_size of this GeneralAPISettings. # noqa: E501 + :type: int + """ + + self._default_max_blob_size = default_max_blob_size + + @property + def default_max_response_size(self): + """Gets the default_max_response_size of this GeneralAPISettings. # noqa: E501 + + DefaultMaxResponseSize is the default maximum response size # noqa: E501 + + :return: The default_max_response_size of this GeneralAPISettings. # noqa: E501 + :rtype: int + """ + return self._default_max_response_size + + @default_max_response_size.setter + def default_max_response_size(self, default_max_response_size): + """Sets the default_max_response_size of this GeneralAPISettings. + + DefaultMaxResponseSize is the default maximum response size # noqa: E501 + + :param default_max_response_size: The default_max_response_size of this GeneralAPISettings. # noqa: E501 + :type: int + """ + + self._default_max_response_size = default_max_response_size + + @property + def default_paging_num(self): + """Gets the default_paging_num of this GeneralAPISettings. # noqa: E501 + + DefaultPagingNum is the default number of items per page # noqa: E501 + + :return: The default_paging_num of this GeneralAPISettings. # noqa: E501 + :rtype: int + """ + return self._default_paging_num + + @default_paging_num.setter + def default_paging_num(self, default_paging_num): + """Sets the default_paging_num of this GeneralAPISettings. + + DefaultPagingNum is the default number of items per page # noqa: E501 + + :param default_paging_num: The default_paging_num of this GeneralAPISettings. # noqa: E501 + :type: int + """ + + self._default_paging_num = default_paging_num + + @property + def max_response_items(self): + """Gets the max_response_items of this GeneralAPISettings. # noqa: E501 + + MaxResponseItems is the maximum number of items returned in API responses # noqa: E501 + + :return: The max_response_items of this GeneralAPISettings. # noqa: E501 + :rtype: int + """ + return self._max_response_items + + @max_response_items.setter + def max_response_items(self, max_response_items): + """Sets the max_response_items of this GeneralAPISettings. + + MaxResponseItems is the maximum number of items returned in API responses # noqa: E501 + + :param max_response_items: The max_response_items of this GeneralAPISettings. # noqa: E501 + :type: int + """ + + self._max_response_items = max_response_items + + 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(GeneralAPISettings, 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, GeneralAPISettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GeneralAPISettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/general_attachment_settings.py b/swagger_client/models/general_attachment_settings.py new file mode 100644 index 0000000..b771149 --- /dev/null +++ b/swagger_client/models/general_attachment_settings.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GeneralAttachmentSettings(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 = { + 'allowed_types': 'str', + 'enabled': 'bool', + 'max_files': 'int', + 'max_size': 'int' + } + + attribute_map = { + 'allowed_types': 'allowed_types', + 'enabled': 'enabled', + 'max_files': 'max_files', + 'max_size': 'max_size' + } + + def __init__(self, allowed_types=None, enabled=None, max_files=None, max_size=None, _configuration=None): # noqa: E501 + """GeneralAttachmentSettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allowed_types = None + self._enabled = None + self._max_files = None + self._max_size = None + self.discriminator = None + + if allowed_types is not None: + self.allowed_types = allowed_types + if enabled is not None: + self.enabled = enabled + if max_files is not None: + self.max_files = max_files + if max_size is not None: + self.max_size = max_size + + @property + def allowed_types(self): + """Gets the allowed_types of this GeneralAttachmentSettings. # noqa: E501 + + AllowedTypes contains the allowed file types for attachments # noqa: E501 + + :return: The allowed_types of this GeneralAttachmentSettings. # noqa: E501 + :rtype: str + """ + return self._allowed_types + + @allowed_types.setter + def allowed_types(self, allowed_types): + """Sets the allowed_types of this GeneralAttachmentSettings. + + AllowedTypes contains the allowed file types for attachments # noqa: E501 + + :param allowed_types: The allowed_types of this GeneralAttachmentSettings. # noqa: E501 + :type: str + """ + + self._allowed_types = allowed_types + + @property + def enabled(self): + """Gets the enabled of this GeneralAttachmentSettings. # noqa: E501 + + Enabled indicates if file attachments are enabled # noqa: E501 + + :return: The enabled of this GeneralAttachmentSettings. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this GeneralAttachmentSettings. + + Enabled indicates if file attachments are enabled # noqa: E501 + + :param enabled: The enabled of this GeneralAttachmentSettings. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def max_files(self): + """Gets the max_files of this GeneralAttachmentSettings. # noqa: E501 + + MaxFiles is the maximum number of files per attachment # noqa: E501 + + :return: The max_files of this GeneralAttachmentSettings. # noqa: E501 + :rtype: int + """ + return self._max_files + + @max_files.setter + def max_files(self, max_files): + """Sets the max_files of this GeneralAttachmentSettings. + + MaxFiles is the maximum number of files per attachment # noqa: E501 + + :param max_files: The max_files of this GeneralAttachmentSettings. # noqa: E501 + :type: int + """ + + self._max_files = max_files + + @property + def max_size(self): + """Gets the max_size of this GeneralAttachmentSettings. # noqa: E501 + + MaxSize is the maximum size for individual attachments # noqa: E501 + + :return: The max_size of this GeneralAttachmentSettings. # noqa: E501 + :rtype: int + """ + return self._max_size + + @max_size.setter + def max_size(self, max_size): + """Sets the max_size of this GeneralAttachmentSettings. + + MaxSize is the maximum size for individual attachments # noqa: E501 + + :param max_size: The max_size of this GeneralAttachmentSettings. # noqa: E501 + :type: int + """ + + self._max_size = max_size + + 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(GeneralAttachmentSettings, 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, GeneralAttachmentSettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GeneralAttachmentSettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/general_repo_settings.py b/swagger_client/models/general_repo_settings.py new file mode 100644 index 0000000..3ea21da --- /dev/null +++ b/swagger_client/models/general_repo_settings.py @@ -0,0 +1,265 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GeneralRepoSettings(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 = { + 'http_git_disabled': 'bool', + 'lfs_disabled': 'bool', + 'migrations_disabled': 'bool', + 'mirrors_disabled': 'bool', + 'stars_disabled': 'bool', + 'time_tracking_disabled': 'bool' + } + + attribute_map = { + 'http_git_disabled': 'http_git_disabled', + 'lfs_disabled': 'lfs_disabled', + 'migrations_disabled': 'migrations_disabled', + 'mirrors_disabled': 'mirrors_disabled', + 'stars_disabled': 'stars_disabled', + 'time_tracking_disabled': 'time_tracking_disabled' + } + + def __init__(self, http_git_disabled=None, lfs_disabled=None, migrations_disabled=None, mirrors_disabled=None, stars_disabled=None, time_tracking_disabled=None, _configuration=None): # noqa: E501 + """GeneralRepoSettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._http_git_disabled = None + self._lfs_disabled = None + self._migrations_disabled = None + self._mirrors_disabled = None + self._stars_disabled = None + self._time_tracking_disabled = None + self.discriminator = None + + if http_git_disabled is not None: + self.http_git_disabled = http_git_disabled + if lfs_disabled is not None: + self.lfs_disabled = lfs_disabled + if migrations_disabled is not None: + self.migrations_disabled = migrations_disabled + if mirrors_disabled is not None: + self.mirrors_disabled = mirrors_disabled + if stars_disabled is not None: + self.stars_disabled = stars_disabled + if time_tracking_disabled is not None: + self.time_tracking_disabled = time_tracking_disabled + + @property + def http_git_disabled(self): + """Gets the http_git_disabled of this GeneralRepoSettings. # noqa: E501 + + HTTPGitDisabled indicates if HTTP Git operations are disabled # noqa: E501 + + :return: The http_git_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._http_git_disabled + + @http_git_disabled.setter + def http_git_disabled(self, http_git_disabled): + """Sets the http_git_disabled of this GeneralRepoSettings. + + HTTPGitDisabled indicates if HTTP Git operations are disabled # noqa: E501 + + :param http_git_disabled: The http_git_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._http_git_disabled = http_git_disabled + + @property + def lfs_disabled(self): + """Gets the lfs_disabled of this GeneralRepoSettings. # noqa: E501 + + LFSDisabled indicates if Git LFS support is disabled # noqa: E501 + + :return: The lfs_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._lfs_disabled + + @lfs_disabled.setter + def lfs_disabled(self, lfs_disabled): + """Sets the lfs_disabled of this GeneralRepoSettings. + + LFSDisabled indicates if Git LFS support is disabled # noqa: E501 + + :param lfs_disabled: The lfs_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._lfs_disabled = lfs_disabled + + @property + def migrations_disabled(self): + """Gets the migrations_disabled of this GeneralRepoSettings. # noqa: E501 + + MigrationsDisabled indicates if repository migrations are disabled # noqa: E501 + + :return: The migrations_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._migrations_disabled + + @migrations_disabled.setter + def migrations_disabled(self, migrations_disabled): + """Sets the migrations_disabled of this GeneralRepoSettings. + + MigrationsDisabled indicates if repository migrations are disabled # noqa: E501 + + :param migrations_disabled: The migrations_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._migrations_disabled = migrations_disabled + + @property + def mirrors_disabled(self): + """Gets the mirrors_disabled of this GeneralRepoSettings. # noqa: E501 + + MirrorsDisabled indicates if repository mirroring is disabled # noqa: E501 + + :return: The mirrors_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._mirrors_disabled + + @mirrors_disabled.setter + def mirrors_disabled(self, mirrors_disabled): + """Sets the mirrors_disabled of this GeneralRepoSettings. + + MirrorsDisabled indicates if repository mirroring is disabled # noqa: E501 + + :param mirrors_disabled: The mirrors_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._mirrors_disabled = mirrors_disabled + + @property + def stars_disabled(self): + """Gets the stars_disabled of this GeneralRepoSettings. # noqa: E501 + + StarsDisabled indicates if repository starring is disabled # noqa: E501 + + :return: The stars_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._stars_disabled + + @stars_disabled.setter + def stars_disabled(self, stars_disabled): + """Sets the stars_disabled of this GeneralRepoSettings. + + StarsDisabled indicates if repository starring is disabled # noqa: E501 + + :param stars_disabled: The stars_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._stars_disabled = stars_disabled + + @property + def time_tracking_disabled(self): + """Gets the time_tracking_disabled of this GeneralRepoSettings. # noqa: E501 + + TimeTrackingDisabled indicates if time tracking is disabled # noqa: E501 + + :return: The time_tracking_disabled of this GeneralRepoSettings. # noqa: E501 + :rtype: bool + """ + return self._time_tracking_disabled + + @time_tracking_disabled.setter + def time_tracking_disabled(self, time_tracking_disabled): + """Sets the time_tracking_disabled of this GeneralRepoSettings. + + TimeTrackingDisabled indicates if time tracking is disabled # noqa: E501 + + :param time_tracking_disabled: The time_tracking_disabled of this GeneralRepoSettings. # noqa: E501 + :type: bool + """ + + self._time_tracking_disabled = time_tracking_disabled + + 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(GeneralRepoSettings, 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, GeneralRepoSettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GeneralRepoSettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/general_ui_settings.py b/swagger_client/models/general_ui_settings.py new file mode 100644 index 0000000..718bd7f --- /dev/null +++ b/swagger_client/models/general_ui_settings.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GeneralUISettings(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 = { + 'allowed_reactions': 'list[str]', + 'custom_emojis': 'list[str]', + 'default_theme': 'str' + } + + attribute_map = { + 'allowed_reactions': 'allowed_reactions', + 'custom_emojis': 'custom_emojis', + 'default_theme': 'default_theme' + } + + def __init__(self, allowed_reactions=None, custom_emojis=None, default_theme=None, _configuration=None): # noqa: E501 + """GeneralUISettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allowed_reactions = None + self._custom_emojis = None + self._default_theme = None + self.discriminator = None + + if allowed_reactions is not None: + self.allowed_reactions = allowed_reactions + if custom_emojis is not None: + self.custom_emojis = custom_emojis + if default_theme is not None: + self.default_theme = default_theme + + @property + def allowed_reactions(self): + """Gets the allowed_reactions of this GeneralUISettings. # noqa: E501 + + AllowedReactions contains the list of allowed emoji reactions # noqa: E501 + + :return: The allowed_reactions of this GeneralUISettings. # noqa: E501 + :rtype: list[str] + """ + return self._allowed_reactions + + @allowed_reactions.setter + def allowed_reactions(self, allowed_reactions): + """Sets the allowed_reactions of this GeneralUISettings. + + AllowedReactions contains the list of allowed emoji reactions # noqa: E501 + + :param allowed_reactions: The allowed_reactions of this GeneralUISettings. # noqa: E501 + :type: list[str] + """ + + self._allowed_reactions = allowed_reactions + + @property + def custom_emojis(self): + """Gets the custom_emojis of this GeneralUISettings. # noqa: E501 + + CustomEmojis contains the list of custom emojis # noqa: E501 + + :return: The custom_emojis of this GeneralUISettings. # noqa: E501 + :rtype: list[str] + """ + return self._custom_emojis + + @custom_emojis.setter + def custom_emojis(self, custom_emojis): + """Sets the custom_emojis of this GeneralUISettings. + + CustomEmojis contains the list of custom emojis # noqa: E501 + + :param custom_emojis: The custom_emojis of this GeneralUISettings. # noqa: E501 + :type: list[str] + """ + + self._custom_emojis = custom_emojis + + @property + def default_theme(self): + """Gets the default_theme of this GeneralUISettings. # noqa: E501 + + DefaultTheme is the default UI theme # noqa: E501 + + :return: The default_theme of this GeneralUISettings. # noqa: E501 + :rtype: str + """ + return self._default_theme + + @default_theme.setter + def default_theme(self, default_theme): + """Sets the default_theme of this GeneralUISettings. + + DefaultTheme is the default UI theme # noqa: E501 + + :param default_theme: The default_theme of this GeneralUISettings. # noqa: E501 + :type: str + """ + + self._default_theme = default_theme + + 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(GeneralUISettings, 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, GeneralUISettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GeneralUISettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/generate_repo_option.py b/swagger_client/models/generate_repo_option.py new file mode 100644 index 0000000..ecfcffc --- /dev/null +++ b/swagger_client/models/generate_repo_option.py @@ -0,0 +1,433 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GenerateRepoOption(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 = { + 'avatar': 'bool', + 'default_branch': 'str', + 'description': 'str', + 'git_content': 'bool', + 'git_hooks': 'bool', + 'labels': 'bool', + 'name': 'str', + 'owner': 'str', + 'private': 'bool', + 'protected_branch': 'bool', + 'topics': 'bool', + 'webhooks': 'bool' + } + + attribute_map = { + 'avatar': 'avatar', + 'default_branch': 'default_branch', + 'description': 'description', + 'git_content': 'git_content', + 'git_hooks': 'git_hooks', + 'labels': 'labels', + 'name': 'name', + 'owner': 'owner', + 'private': 'private', + 'protected_branch': 'protected_branch', + 'topics': 'topics', + 'webhooks': 'webhooks' + } + + def __init__(self, avatar=None, default_branch=None, description=None, git_content=None, git_hooks=None, labels=None, name=None, owner=None, private=None, protected_branch=None, topics=None, webhooks=None, _configuration=None): # noqa: E501 + """GenerateRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._avatar = None + self._default_branch = None + self._description = None + self._git_content = None + self._git_hooks = None + self._labels = None + self._name = None + self._owner = None + self._private = None + self._protected_branch = None + self._topics = None + self._webhooks = None + self.discriminator = None + + if avatar is not None: + self.avatar = avatar + if default_branch is not None: + self.default_branch = default_branch + if description is not None: + self.description = description + if git_content is not None: + self.git_content = git_content + if git_hooks is not None: + self.git_hooks = git_hooks + if labels is not None: + self.labels = labels + self.name = name + self.owner = owner + if private is not None: + self.private = private + if protected_branch is not None: + self.protected_branch = protected_branch + if topics is not None: + self.topics = topics + if webhooks is not None: + self.webhooks = webhooks + + @property + def avatar(self): + """Gets the avatar of this GenerateRepoOption. # noqa: E501 + + include avatar of the template repo # noqa: E501 + + :return: The avatar of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._avatar + + @avatar.setter + def avatar(self, avatar): + """Sets the avatar of this GenerateRepoOption. + + include avatar of the template repo # noqa: E501 + + :param avatar: The avatar of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._avatar = avatar + + @property + def default_branch(self): + """Gets the default_branch of this GenerateRepoOption. # noqa: E501 + + Default branch of the new repository # noqa: E501 + + :return: The default_branch of this GenerateRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this GenerateRepoOption. + + Default branch of the new repository # noqa: E501 + + :param default_branch: The default_branch of this GenerateRepoOption. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @property + def description(self): + """Gets the description of this GenerateRepoOption. # noqa: E501 + + Description of the repository to create # noqa: E501 + + :return: The description of this GenerateRepoOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this GenerateRepoOption. + + Description of the repository to create # noqa: E501 + + :param description: The description of this GenerateRepoOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def git_content(self): + """Gets the git_content of this GenerateRepoOption. # noqa: E501 + + include git content of default branch in template repo # noqa: E501 + + :return: The git_content of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._git_content + + @git_content.setter + def git_content(self, git_content): + """Sets the git_content of this GenerateRepoOption. + + include git content of default branch in template repo # noqa: E501 + + :param git_content: The git_content of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._git_content = git_content + + @property + def git_hooks(self): + """Gets the git_hooks of this GenerateRepoOption. # noqa: E501 + + include git hooks in template repo # noqa: E501 + + :return: The git_hooks of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._git_hooks + + @git_hooks.setter + def git_hooks(self, git_hooks): + """Sets the git_hooks of this GenerateRepoOption. + + include git hooks in template repo # noqa: E501 + + :param git_hooks: The git_hooks of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._git_hooks = git_hooks + + @property + def labels(self): + """Gets the labels of this GenerateRepoOption. # noqa: E501 + + include labels in template repo # noqa: E501 + + :return: The labels of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this GenerateRepoOption. + + include labels in template repo # noqa: E501 + + :param labels: The labels of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._labels = labels + + @property + def name(self): + """Gets the name of this GenerateRepoOption. # noqa: E501 + + + :return: The name of this GenerateRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GenerateRepoOption. + + + :param name: The name of this GenerateRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def owner(self): + """Gets the owner of this GenerateRepoOption. # noqa: E501 + + the organization's name or individual user's name who will own the new repository # noqa: E501 + + :return: The owner of this GenerateRepoOption. # noqa: E501 + :rtype: str + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this GenerateRepoOption. + + the organization's name or individual user's name who will own the new repository # noqa: E501 + + :param owner: The owner of this GenerateRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and owner is None: + raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 + + self._owner = owner + + @property + def private(self): + """Gets the private of this GenerateRepoOption. # noqa: E501 + + Whether the repository is private # noqa: E501 + + :return: The private of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this GenerateRepoOption. + + Whether the repository is private # noqa: E501 + + :param private: The private of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def protected_branch(self): + """Gets the protected_branch of this GenerateRepoOption. # noqa: E501 + + include protected branches in template repo # noqa: E501 + + :return: The protected_branch of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._protected_branch + + @protected_branch.setter + def protected_branch(self, protected_branch): + """Sets the protected_branch of this GenerateRepoOption. + + include protected branches in template repo # noqa: E501 + + :param protected_branch: The protected_branch of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._protected_branch = protected_branch + + @property + def topics(self): + """Gets the topics of this GenerateRepoOption. # noqa: E501 + + include topics in template repo # noqa: E501 + + :return: The topics of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this GenerateRepoOption. + + include topics in template repo # noqa: E501 + + :param topics: The topics of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + self._topics = topics + + @property + def webhooks(self): + """Gets the webhooks of this GenerateRepoOption. # noqa: E501 + + include webhooks in template repo # noqa: E501 + + :return: The webhooks of this GenerateRepoOption. # noqa: E501 + :rtype: bool + """ + return self._webhooks + + @webhooks.setter + def webhooks(self, webhooks): + """Sets the webhooks of this GenerateRepoOption. + + include webhooks in template repo # noqa: E501 + + :param webhooks: The webhooks of this GenerateRepoOption. # noqa: E501 + :type: bool + """ + + 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(GenerateRepoOption, 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, GenerateRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GenerateRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/get_files_options.py b/swagger_client/models/get_files_options.py new file mode 100644 index 0000000..b39f9b7 --- /dev/null +++ b/swagger_client/models/get_files_options.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GetFilesOptions(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 = { + 'files': 'list[str]' + } + + attribute_map = { + 'files': 'files' + } + + def __init__(self, files=None, _configuration=None): # noqa: E501 + """GetFilesOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._files = None + self.discriminator = None + + if files is not None: + self.files = files + + @property + def files(self): + """Gets the files of this GetFilesOptions. # noqa: E501 + + Files is the list of file paths to retrieve # noqa: E501 + + :return: The files of this GetFilesOptions. # noqa: E501 + :rtype: list[str] + """ + return self._files + + @files.setter + def files(self, files): + """Sets the files of this GetFilesOptions. + + Files is the list of file paths to retrieve # noqa: E501 + + :param files: The files of this GetFilesOptions. # noqa: E501 + :type: list[str] + """ + + self._files = files + + 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(GetFilesOptions, 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, GetFilesOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetFilesOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/git_blob_response.py b/swagger_client/models/git_blob_response.py new file mode 100644 index 0000000..5b4df98 --- /dev/null +++ b/swagger_client/models/git_blob_response.py @@ -0,0 +1,293 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GitBlobResponse(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', + 'encoding': 'str', + 'lfs_oid': 'str', + 'lfs_size': 'int', + 'sha': 'str', + 'size': 'int', + 'url': 'str' + } + + attribute_map = { + 'content': 'content', + 'encoding': 'encoding', + 'lfs_oid': 'lfs_oid', + 'lfs_size': 'lfs_size', + 'sha': 'sha', + 'size': 'size', + 'url': 'url' + } + + def __init__(self, content=None, encoding=None, lfs_oid=None, lfs_size=None, sha=None, size=None, url=None, _configuration=None): # noqa: E501 + """GitBlobResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self._encoding = None + self._lfs_oid = None + self._lfs_size = None + self._sha = None + self._size = None + self._url = None + self.discriminator = None + + if content is not None: + self.content = content + if encoding is not None: + self.encoding = encoding + if lfs_oid is not None: + self.lfs_oid = lfs_oid + if lfs_size is not None: + self.lfs_size = lfs_size + if sha is not None: + self.sha = sha + if size is not None: + self.size = size + if url is not None: + self.url = url + + @property + def content(self): + """Gets the content of this GitBlobResponse. # noqa: E501 + + The content of the git blob (may be base64 encoded) # noqa: E501 + + :return: The content of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this GitBlobResponse. + + The content of the git blob (may be base64 encoded) # noqa: E501 + + :param content: The content of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def encoding(self): + """Gets the encoding of this GitBlobResponse. # noqa: E501 + + The encoding used for the content (e.g., \"base64\") # noqa: E501 + + :return: The encoding of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._encoding + + @encoding.setter + def encoding(self, encoding): + """Sets the encoding of this GitBlobResponse. + + The encoding used for the content (e.g., \"base64\") # noqa: E501 + + :param encoding: The encoding of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._encoding = encoding + + @property + def lfs_oid(self): + """Gets the lfs_oid of this GitBlobResponse. # noqa: E501 + + The LFS object ID if this blob is stored in LFS # noqa: E501 + + :return: The lfs_oid of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._lfs_oid + + @lfs_oid.setter + def lfs_oid(self, lfs_oid): + """Sets the lfs_oid of this GitBlobResponse. + + The LFS object ID if this blob is stored in LFS # noqa: E501 + + :param lfs_oid: The lfs_oid of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._lfs_oid = lfs_oid + + @property + def lfs_size(self): + """Gets the lfs_size of this GitBlobResponse. # noqa: E501 + + The size of the LFS object if this blob is stored in LFS # noqa: E501 + + :return: The lfs_size of this GitBlobResponse. # noqa: E501 + :rtype: int + """ + return self._lfs_size + + @lfs_size.setter + def lfs_size(self, lfs_size): + """Sets the lfs_size of this GitBlobResponse. + + The size of the LFS object if this blob is stored in LFS # noqa: E501 + + :param lfs_size: The lfs_size of this GitBlobResponse. # noqa: E501 + :type: int + """ + + self._lfs_size = lfs_size + + @property + def sha(self): + """Gets the sha of this GitBlobResponse. # noqa: E501 + + The SHA hash of the git blob # noqa: E501 + + :return: The sha of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitBlobResponse. + + The SHA hash of the git blob # noqa: E501 + + :param sha: The sha of this GitBlobResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def size(self): + """Gets the size of this GitBlobResponse. # noqa: E501 + + The size of the git blob in bytes # noqa: E501 + + :return: The size of this GitBlobResponse. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this GitBlobResponse. + + The size of the git blob in bytes # noqa: E501 + + :param size: The size of this GitBlobResponse. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def url(self): + """Gets the url of this GitBlobResponse. # noqa: E501 + + The URL to access this git blob # noqa: E501 + + :return: The url of this GitBlobResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitBlobResponse. + + The URL to access this git blob # noqa: E501 + + :param url: The url of this GitBlobResponse. # 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(GitBlobResponse, 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, GitBlobResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitBlobResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/git_entry.py b/swagger_client/models/git_entry.py new file mode 100644 index 0000000..1df8ff0 --- /dev/null +++ b/swagger_client/models/git_entry.py @@ -0,0 +1,265 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GitEntry(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 = { + 'mode': 'str', + 'path': 'str', + 'sha': 'str', + 'size': 'int', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'mode': 'mode', + 'path': 'path', + 'sha': 'sha', + 'size': 'size', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, mode=None, path=None, sha=None, size=None, type=None, url=None, _configuration=None): # noqa: E501 + """GitEntry - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._mode = None + self._path = None + self._sha = None + self._size = None + self._type = None + self._url = None + self.discriminator = None + + if mode is not None: + self.mode = mode + if path is not None: + self.path = path + if sha is not None: + self.sha = sha + if size is not None: + self.size = size + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def mode(self): + """Gets the mode of this GitEntry. # noqa: E501 + + Mode is the file mode (permissions) # noqa: E501 + + :return: The mode of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this GitEntry. + + Mode is the file mode (permissions) # noqa: E501 + + :param mode: The mode of this GitEntry. # noqa: E501 + :type: str + """ + + self._mode = mode + + @property + def path(self): + """Gets the path of this GitEntry. # noqa: E501 + + Path is the file or directory path # noqa: E501 + + :return: The path of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this GitEntry. + + Path is the file or directory path # noqa: E501 + + :param path: The path of this GitEntry. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def sha(self): + """Gets the sha of this GitEntry. # noqa: E501 + + SHA is the Git object SHA # noqa: E501 + + :return: The sha of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitEntry. + + SHA is the Git object SHA # noqa: E501 + + :param sha: The sha of this GitEntry. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def size(self): + """Gets the size of this GitEntry. # noqa: E501 + + Size is the file size in bytes # noqa: E501 + + :return: The size of this GitEntry. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this GitEntry. + + Size is the file size in bytes # noqa: E501 + + :param size: The size of this GitEntry. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def type(self): + """Gets the type of this GitEntry. # noqa: E501 + + Type indicates if this is a file, directory, or symlink # noqa: E501 + + :return: The type of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this GitEntry. + + Type indicates if this is a file, directory, or symlink # noqa: E501 + + :param type: The type of this GitEntry. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this GitEntry. # noqa: E501 + + URL is the API URL for this tree entry # noqa: E501 + + :return: The url of this GitEntry. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitEntry. + + URL is the API URL for this tree entry # noqa: E501 + + :param url: The url of this GitEntry. # 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(GitEntry, 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, GitEntry): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitEntry): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/git_hook.py b/swagger_client/models/git_hook.py new file mode 100644 index 0000000..43d46a8 --- /dev/null +++ b/swagger_client/models/git_hook.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GitHook(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', + 'is_active': 'bool', + 'name': 'str' + } + + attribute_map = { + 'content': 'content', + 'is_active': 'is_active', + 'name': 'name' + } + + def __init__(self, content=None, is_active=None, name=None, _configuration=None): # noqa: E501 + """GitHook - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self._is_active = None + self._name = None + self.discriminator = None + + if content is not None: + self.content = content + if is_active is not None: + self.is_active = is_active + if name is not None: + self.name = name + + @property + def content(self): + """Gets the content of this GitHook. # noqa: E501 + + Content contains the script content of the hook # noqa: E501 + + :return: The content of this GitHook. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this GitHook. + + Content contains the script content of the hook # noqa: E501 + + :param content: The content of this GitHook. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def is_active(self): + """Gets the is_active of this GitHook. # noqa: E501 + + IsActive indicates if the hook is active # noqa: E501 + + :return: The is_active of this GitHook. # noqa: E501 + :rtype: bool + """ + return self._is_active + + @is_active.setter + def is_active(self, is_active): + """Sets the is_active of this GitHook. + + IsActive indicates if the hook is active # noqa: E501 + + :param is_active: The is_active of this GitHook. # noqa: E501 + :type: bool + """ + + self._is_active = is_active + + @property + def name(self): + """Gets the name of this GitHook. # noqa: E501 + + Name is the name of the Git hook # noqa: E501 + + :return: The name of this GitHook. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GitHook. + + Name is the name of the Git hook # noqa: E501 + + :param name: The name of this GitHook. # 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(GitHook, 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, GitHook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitHook): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/git_object.py b/swagger_client/models/git_object.py new file mode 100644 index 0000000..e8cfc8b --- /dev/null +++ b/swagger_client/models/git_object.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GitObject(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 = { + 'sha': 'str', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'sha': 'sha', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, sha=None, type=None, url=None, _configuration=None): # noqa: E501 + """GitObject - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._sha = None + self._type = None + self._url = None + self.discriminator = None + + if sha is not None: + self.sha = sha + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def sha(self): + """Gets the sha of this GitObject. # noqa: E501 + + The SHA hash of the Git object # noqa: E501 + + :return: The sha of this GitObject. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitObject. + + The SHA hash of the Git object # noqa: E501 + + :param sha: The sha of this GitObject. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def type(self): + """Gets the type of this GitObject. # noqa: E501 + + The type of the Git object (e.g., commit, tag, tree, blob) # noqa: E501 + + :return: The type of this GitObject. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this GitObject. + + The type of the Git object (e.g., commit, tag, tree, blob) # noqa: E501 + + :param type: The type of this GitObject. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this GitObject. # noqa: E501 + + The URL to access this Git object # noqa: E501 + + :return: The url of this GitObject. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitObject. + + The URL to access this Git object # noqa: E501 + + :param url: The url of this GitObject. # 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(GitObject, 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, GitObject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/git_tree_response.py b/swagger_client/models/git_tree_response.py new file mode 100644 index 0000000..e6b3f25 --- /dev/null +++ b/swagger_client/models/git_tree_response.py @@ -0,0 +1,265 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GitTreeResponse(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 = { + 'page': 'int', + 'sha': 'str', + 'total_count': 'int', + 'tree': 'list[GitEntry]', + 'truncated': 'bool', + 'url': 'str' + } + + attribute_map = { + 'page': 'page', + 'sha': 'sha', + 'total_count': 'total_count', + 'tree': 'tree', + 'truncated': 'truncated', + 'url': 'url' + } + + def __init__(self, page=None, sha=None, total_count=None, tree=None, truncated=None, url=None, _configuration=None): # noqa: E501 + """GitTreeResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._page = None + self._sha = None + self._total_count = None + self._tree = None + self._truncated = None + self._url = None + self.discriminator = None + + if page is not None: + self.page = page + if sha is not None: + self.sha = sha + if total_count is not None: + self.total_count = total_count + if tree is not None: + self.tree = tree + if truncated is not None: + self.truncated = truncated + if url is not None: + self.url = url + + @property + def page(self): + """Gets the page of this GitTreeResponse. # noqa: E501 + + Page is the current page number for pagination # noqa: E501 + + :return: The page of this GitTreeResponse. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this GitTreeResponse. + + Page is the current page number for pagination # noqa: E501 + + :param page: The page of this GitTreeResponse. # noqa: E501 + :type: int + """ + + self._page = page + + @property + def sha(self): + """Gets the sha of this GitTreeResponse. # noqa: E501 + + SHA is the tree object SHA # noqa: E501 + + :return: The sha of this GitTreeResponse. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this GitTreeResponse. + + SHA is the tree object SHA # noqa: E501 + + :param sha: The sha of this GitTreeResponse. # noqa: E501 + :type: str + """ + + self._sha = sha + + @property + def total_count(self): + """Gets the total_count of this GitTreeResponse. # noqa: E501 + + TotalCount is the total number of entries in the tree # noqa: E501 + + :return: The total_count of this GitTreeResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this GitTreeResponse. + + TotalCount is the total number of entries in the tree # noqa: E501 + + :param total_count: The total_count of this GitTreeResponse. # noqa: E501 + :type: int + """ + + self._total_count = total_count + + @property + def tree(self): + """Gets the tree of this GitTreeResponse. # noqa: E501 + + Entries contains the tree entries (files and directories) # noqa: E501 + + :return: The tree of this GitTreeResponse. # noqa: E501 + :rtype: list[GitEntry] + """ + return self._tree + + @tree.setter + def tree(self, tree): + """Sets the tree of this GitTreeResponse. + + Entries contains the tree entries (files and directories) # noqa: E501 + + :param tree: The tree of this GitTreeResponse. # noqa: E501 + :type: list[GitEntry] + """ + + self._tree = tree + + @property + def truncated(self): + """Gets the truncated of this GitTreeResponse. # noqa: E501 + + Truncated indicates if the response was truncated due to size # noqa: E501 + + :return: The truncated of this GitTreeResponse. # noqa: E501 + :rtype: bool + """ + return self._truncated + + @truncated.setter + def truncated(self, truncated): + """Sets the truncated of this GitTreeResponse. + + Truncated indicates if the response was truncated due to size # noqa: E501 + + :param truncated: The truncated of this GitTreeResponse. # noqa: E501 + :type: bool + """ + + self._truncated = truncated + + @property + def url(self): + """Gets the url of this GitTreeResponse. # noqa: E501 + + URL is the API URL for this tree # noqa: E501 + + :return: The url of this GitTreeResponse. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GitTreeResponse. + + URL is the API URL for this tree # noqa: E501 + + :param url: The url of this GitTreeResponse. # 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(GitTreeResponse, 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, GitTreeResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitTreeResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/gitignore_template_info.py b/swagger_client/models/gitignore_template_info.py new file mode 100644 index 0000000..c452825 --- /dev/null +++ b/swagger_client/models/gitignore_template_info.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GitignoreTemplateInfo(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', + 'source': 'str' + } + + attribute_map = { + 'name': 'name', + 'source': 'source' + } + + def __init__(self, name=None, source=None, _configuration=None): # noqa: E501 + """GitignoreTemplateInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._source = None + self.discriminator = None + + if name is not None: + self.name = name + if source is not None: + self.source = source + + @property + def name(self): + """Gets the name of this GitignoreTemplateInfo. # noqa: E501 + + Name is the name of the gitignore template # noqa: E501 + + :return: The name of this GitignoreTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GitignoreTemplateInfo. + + Name is the name of the gitignore template # noqa: E501 + + :param name: The name of this GitignoreTemplateInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def source(self): + """Gets the source of this GitignoreTemplateInfo. # noqa: E501 + + Source contains the content of the gitignore template # noqa: E501 + + :return: The source of this GitignoreTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this GitignoreTemplateInfo. + + Source contains the content of the gitignore template # noqa: E501 + + :param source: The source of this GitignoreTemplateInfo. # noqa: E501 + :type: str + """ + + self._source = source + + 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(GitignoreTemplateInfo, 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, GitignoreTemplateInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GitignoreTemplateInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/gpg_key.py b/swagger_client/models/gpg_key.py new file mode 100644 index 0000000..6fc588d --- /dev/null +++ b/swagger_client/models/gpg_key.py @@ -0,0 +1,457 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GPGKey(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 = { + 'can_certify': 'bool', + 'can_encrypt_comms': 'bool', + 'can_encrypt_storage': 'bool', + 'can_sign': 'bool', + 'created_at': 'datetime', + 'emails': 'list[GPGKeyEmail]', + 'expires_at': 'datetime', + 'id': 'int', + 'key_id': 'str', + 'primary_key_id': 'str', + 'public_key': 'str', + 'subkeys': 'list[GPGKey]', + 'verified': 'bool' + } + + attribute_map = { + 'can_certify': 'can_certify', + 'can_encrypt_comms': 'can_encrypt_comms', + 'can_encrypt_storage': 'can_encrypt_storage', + 'can_sign': 'can_sign', + 'created_at': 'created_at', + 'emails': 'emails', + 'expires_at': 'expires_at', + 'id': 'id', + 'key_id': 'key_id', + 'primary_key_id': 'primary_key_id', + 'public_key': 'public_key', + 'subkeys': 'subkeys', + 'verified': 'verified' + } + + def __init__(self, can_certify=None, can_encrypt_comms=None, can_encrypt_storage=None, can_sign=None, created_at=None, emails=None, expires_at=None, id=None, key_id=None, primary_key_id=None, public_key=None, subkeys=None, verified=None, _configuration=None): # noqa: E501 + """GPGKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._can_certify = None + self._can_encrypt_comms = None + self._can_encrypt_storage = None + self._can_sign = None + self._created_at = None + self._emails = None + self._expires_at = None + self._id = None + self._key_id = None + self._primary_key_id = None + self._public_key = None + self._subkeys = None + self._verified = None + self.discriminator = None + + if can_certify is not None: + self.can_certify = can_certify + if can_encrypt_comms is not None: + self.can_encrypt_comms = can_encrypt_comms + if can_encrypt_storage is not None: + self.can_encrypt_storage = can_encrypt_storage + if can_sign is not None: + self.can_sign = can_sign + if created_at is not None: + self.created_at = created_at + if emails is not None: + self.emails = emails + if expires_at is not None: + self.expires_at = expires_at + if id is not None: + self.id = id + if key_id is not None: + self.key_id = key_id + if primary_key_id is not None: + self.primary_key_id = primary_key_id + if public_key is not None: + self.public_key = public_key + if subkeys is not None: + self.subkeys = subkeys + if verified is not None: + self.verified = verified + + @property + def can_certify(self): + """Gets the can_certify of this GPGKey. # noqa: E501 + + Whether the key can be used for certification # noqa: E501 + + :return: The can_certify of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_certify + + @can_certify.setter + def can_certify(self, can_certify): + """Sets the can_certify of this GPGKey. + + Whether the key can be used for certification # noqa: E501 + + :param can_certify: The can_certify of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_certify = can_certify + + @property + def can_encrypt_comms(self): + """Gets the can_encrypt_comms of this GPGKey. # noqa: E501 + + Whether the key can be used for encrypting communications # noqa: E501 + + :return: The can_encrypt_comms of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_encrypt_comms + + @can_encrypt_comms.setter + def can_encrypt_comms(self, can_encrypt_comms): + """Sets the can_encrypt_comms of this GPGKey. + + Whether the key can be used for encrypting communications # noqa: E501 + + :param can_encrypt_comms: The can_encrypt_comms of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_encrypt_comms = can_encrypt_comms + + @property + def can_encrypt_storage(self): + """Gets the can_encrypt_storage of this GPGKey. # noqa: E501 + + Whether the key can be used for encrypting storage # noqa: E501 + + :return: The can_encrypt_storage of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_encrypt_storage + + @can_encrypt_storage.setter + def can_encrypt_storage(self, can_encrypt_storage): + """Sets the can_encrypt_storage of this GPGKey. + + Whether the key can be used for encrypting storage # noqa: E501 + + :param can_encrypt_storage: The can_encrypt_storage of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_encrypt_storage = can_encrypt_storage + + @property + def can_sign(self): + """Gets the can_sign of this GPGKey. # noqa: E501 + + Whether the key can be used for signing # noqa: E501 + + :return: The can_sign of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._can_sign + + @can_sign.setter + def can_sign(self, can_sign): + """Sets the can_sign of this GPGKey. + + Whether the key can be used for signing # noqa: E501 + + :param can_sign: The can_sign of this GPGKey. # noqa: E501 + :type: bool + """ + + self._can_sign = can_sign + + @property + def created_at(self): + """Gets the created_at of this GPGKey. # noqa: E501 + + + :return: The created_at of this GPGKey. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this GPGKey. + + + :param created_at: The created_at of this GPGKey. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def emails(self): + """Gets the emails of this GPGKey. # noqa: E501 + + List of email addresses associated with this GPG key # noqa: E501 + + :return: The emails of this GPGKey. # noqa: E501 + :rtype: list[GPGKeyEmail] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this GPGKey. + + List of email addresses associated with this GPG key # noqa: E501 + + :param emails: The emails of this GPGKey. # noqa: E501 + :type: list[GPGKeyEmail] + """ + + self._emails = emails + + @property + def expires_at(self): + """Gets the expires_at of this GPGKey. # noqa: E501 + + + :return: The expires_at of this GPGKey. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this GPGKey. + + + :param expires_at: The expires_at of this GPGKey. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + + @property + def id(self): + """Gets the id of this GPGKey. # noqa: E501 + + The unique identifier of the GPG key # noqa: E501 + + :return: The id of this GPGKey. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this GPGKey. + + The unique identifier of the GPG key # noqa: E501 + + :param id: The id of this GPGKey. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def key_id(self): + """Gets the key_id of this GPGKey. # noqa: E501 + + The key ID of the GPG key # noqa: E501 + + :return: The key_id of this GPGKey. # noqa: E501 + :rtype: str + """ + return self._key_id + + @key_id.setter + def key_id(self, key_id): + """Sets the key_id of this GPGKey. + + The key ID of the GPG key # noqa: E501 + + :param key_id: The key_id of this GPGKey. # noqa: E501 + :type: str + """ + + self._key_id = key_id + + @property + def primary_key_id(self): + """Gets the primary_key_id of this GPGKey. # noqa: E501 + + The primary key ID of the GPG key # noqa: E501 + + :return: The primary_key_id of this GPGKey. # noqa: E501 + :rtype: str + """ + return self._primary_key_id + + @primary_key_id.setter + def primary_key_id(self, primary_key_id): + """Sets the primary_key_id of this GPGKey. + + The primary key ID of the GPG key # noqa: E501 + + :param primary_key_id: The primary_key_id of this GPGKey. # noqa: E501 + :type: str + """ + + self._primary_key_id = primary_key_id + + @property + def public_key(self): + """Gets the public_key of this GPGKey. # noqa: E501 + + The public key content in armored format # noqa: E501 + + :return: The public_key of this GPGKey. # noqa: E501 + :rtype: str + """ + return self._public_key + + @public_key.setter + def public_key(self, public_key): + """Sets the public_key of this GPGKey. + + The public key content in armored format # noqa: E501 + + :param public_key: The public_key of this GPGKey. # noqa: E501 + :type: str + """ + + self._public_key = public_key + + @property + def subkeys(self): + """Gets the subkeys of this GPGKey. # noqa: E501 + + List of subkeys of this GPG key # noqa: E501 + + :return: The subkeys of this GPGKey. # noqa: E501 + :rtype: list[GPGKey] + """ + return self._subkeys + + @subkeys.setter + def subkeys(self, subkeys): + """Sets the subkeys of this GPGKey. + + List of subkeys of this GPG key # noqa: E501 + + :param subkeys: The subkeys of this GPGKey. # noqa: E501 + :type: list[GPGKey] + """ + + self._subkeys = subkeys + + @property + def verified(self): + """Gets the verified of this GPGKey. # noqa: E501 + + Whether the GPG key has been verified # noqa: E501 + + :return: The verified of this GPGKey. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this GPGKey. + + Whether the GPG key has been verified # noqa: E501 + + :param verified: The verified of this GPGKey. # noqa: E501 + :type: bool + """ + + self._verified = verified + + 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(GPGKey, 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, GPGKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GPGKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/gpg_key_email.py b/swagger_client/models/gpg_key_email.py new file mode 100644 index 0000000..94a4b4f --- /dev/null +++ b/swagger_client/models/gpg_key_email.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class GPGKeyEmail(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 = { + 'email': 'str', + 'verified': 'bool' + } + + attribute_map = { + 'email': 'email', + 'verified': 'verified' + } + + def __init__(self, email=None, verified=None, _configuration=None): # noqa: E501 + """GPGKeyEmail - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self._verified = None + self.discriminator = None + + if email is not None: + self.email = email + if verified is not None: + self.verified = verified + + @property + def email(self): + """Gets the email of this GPGKeyEmail. # noqa: E501 + + The email address associated with the GPG key # noqa: E501 + + :return: The email of this GPGKeyEmail. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this GPGKeyEmail. + + The email address associated with the GPG key # noqa: E501 + + :param email: The email of this GPGKeyEmail. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def verified(self): + """Gets the verified of this GPGKeyEmail. # noqa: E501 + + Whether the email address has been verified # noqa: E501 + + :return: The verified of this GPGKeyEmail. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this GPGKeyEmail. + + Whether the email address has been verified # noqa: E501 + + :param verified: The verified of this GPGKeyEmail. # noqa: E501 + :type: bool + """ + + self._verified = verified + + 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(GPGKeyEmail, 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, GPGKeyEmail): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GPGKeyEmail): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/hook.py b/swagger_client/models/hook.py new file mode 100644 index 0000000..efba3c6 --- /dev/null +++ b/swagger_client/models/hook.py @@ -0,0 +1,345 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Hook(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 = { + 'active': 'bool', + 'authorization_header': 'str', + 'branch_filter': 'str', + 'config': 'dict(str, str)', + 'created_at': 'datetime', + 'events': 'list[str]', + 'id': 'int', + 'type': 'str', + 'updated_at': 'datetime' + } + + attribute_map = { + 'active': 'active', + 'authorization_header': 'authorization_header', + 'branch_filter': 'branch_filter', + 'config': 'config', + 'created_at': 'created_at', + 'events': 'events', + 'id': 'id', + 'type': 'type', + 'updated_at': 'updated_at' + } + + def __init__(self, active=None, authorization_header=None, branch_filter=None, config=None, created_at=None, events=None, id=None, type=None, updated_at=None, _configuration=None): # noqa: E501 + """Hook - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._authorization_header = None + self._branch_filter = None + self._config = None + self._created_at = None + self._events = None + self._id = None + self._type = None + self._updated_at = None + self.discriminator = None + + if active is not None: + self.active = active + if authorization_header is not None: + self.authorization_header = authorization_header + if branch_filter is not None: + self.branch_filter = branch_filter + if config is not None: + self.config = config + if created_at is not None: + self.created_at = created_at + if events is not None: + self.events = events + if id is not None: + self.id = id + if type is not None: + self.type = type + if updated_at is not None: + self.updated_at = updated_at + + @property + def active(self): + """Gets the active of this Hook. # noqa: E501 + + Whether the webhook is active and will be triggered # noqa: E501 + + :return: The active of this Hook. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this Hook. + + Whether the webhook is active and will be triggered # noqa: E501 + + :param active: The active of this Hook. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def authorization_header(self): + """Gets the authorization_header of this Hook. # noqa: E501 + + Authorization header to include in webhook requests # noqa: E501 + + :return: The authorization_header of this Hook. # noqa: E501 + :rtype: str + """ + return self._authorization_header + + @authorization_header.setter + def authorization_header(self, authorization_header): + """Sets the authorization_header of this Hook. + + Authorization header to include in webhook requests # noqa: E501 + + :param authorization_header: The authorization_header of this Hook. # noqa: E501 + :type: str + """ + + self._authorization_header = authorization_header + + @property + def branch_filter(self): + """Gets the branch_filter of this Hook. # noqa: E501 + + Branch filter pattern to determine which branches trigger the webhook # noqa: E501 + + :return: The branch_filter of this Hook. # noqa: E501 + :rtype: str + """ + return self._branch_filter + + @branch_filter.setter + def branch_filter(self, branch_filter): + """Sets the branch_filter of this Hook. + + Branch filter pattern to determine which branches trigger the webhook # noqa: E501 + + :param branch_filter: The branch_filter of this Hook. # noqa: E501 + :type: str + """ + + self._branch_filter = branch_filter + + @property + def config(self): + """Gets the config of this Hook. # noqa: E501 + + Configuration settings for the webhook # noqa: E501 + + :return: The config of this Hook. # noqa: E501 + :rtype: dict(str, str) + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this Hook. + + Configuration settings for the webhook # noqa: E501 + + :param config: The config of this Hook. # noqa: E501 + :type: dict(str, str) + """ + + self._config = config + + @property + def created_at(self): + """Gets the created_at of this Hook. # noqa: E501 + + + :return: The created_at of this Hook. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Hook. + + + :param created_at: The created_at of this Hook. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def events(self): + """Gets the events of this Hook. # noqa: E501 + + List of events that trigger this webhook # noqa: E501 + + :return: The events of this Hook. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this Hook. + + List of events that trigger this webhook # noqa: E501 + + :param events: The events of this Hook. # noqa: E501 + :type: list[str] + """ + + self._events = events + + @property + def id(self): + """Gets the id of this Hook. # noqa: E501 + + The unique identifier of the webhook # noqa: E501 + + :return: The id of this Hook. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Hook. + + The unique identifier of the webhook # noqa: E501 + + :param id: The id of this Hook. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def type(self): + """Gets the type of this Hook. # noqa: E501 + + The type of the webhook (e.g., gitea, slack, discord) # noqa: E501 + + :return: The type of this Hook. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Hook. + + The type of the webhook (e.g., gitea, slack, discord) # noqa: E501 + + :param type: The type of this Hook. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def updated_at(self): + """Gets the updated_at of this Hook. # noqa: E501 + + + :return: The updated_at of this Hook. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Hook. + + + :param updated_at: The updated_at of this Hook. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_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(Hook, 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, Hook): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Hook): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/identity.py b/swagger_client/models/identity.py new file mode 100644 index 0000000..455a38a --- /dev/null +++ b/swagger_client/models/identity.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Identity(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 = { + 'email': 'str', + 'name': 'str' + } + + attribute_map = { + 'email': 'email', + 'name': 'name' + } + + def __init__(self, email=None, name=None, _configuration=None): # noqa: E501 + """Identity - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self._name = None + self.discriminator = None + + if email is not None: + self.email = email + if name is not None: + self.name = name + + @property + def email(self): + """Gets the email of this Identity. # noqa: E501 + + + :return: The email of this Identity. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Identity. + + + :param email: The email of this Identity. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this Identity. # noqa: E501 + + Name is the person's name # noqa: E501 + + :return: The name of this Identity. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Identity. + + Name is the person's name # noqa: E501 + + :param name: The name of this Identity. # 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(Identity, 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, Identity): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Identity): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/inline_response200.py b/swagger_client/models/inline_response200.py new file mode 100644 index 0000000..055ff5f --- /dev/null +++ b/swagger_client/models/inline_response200.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class InlineResponse200(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 = { + 'data': 'list[Team]', + 'ok': 'bool' + } + + attribute_map = { + 'data': 'data', + 'ok': 'ok' + } + + def __init__(self, data=None, ok=None, _configuration=None): # noqa: E501 + """InlineResponse200 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data = None + self._ok = None + self.discriminator = None + + if data is not None: + self.data = data + if ok is not None: + self.ok = ok + + @property + def data(self): + """Gets the data of this InlineResponse200. # noqa: E501 + + + :return: The data of this InlineResponse200. # noqa: E501 + :rtype: list[Team] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this InlineResponse200. + + + :param data: The data of this InlineResponse200. # noqa: E501 + :type: list[Team] + """ + + self._data = data + + @property + def ok(self): + """Gets the ok of this InlineResponse200. # noqa: E501 + + + :return: The ok of this InlineResponse200. # noqa: E501 + :rtype: bool + """ + return self._ok + + @ok.setter + def ok(self, ok): + """Sets the ok of this InlineResponse200. + + + :param ok: The ok of this InlineResponse200. # noqa: E501 + :type: bool + """ + + self._ok = ok + + 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(InlineResponse200, 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, InlineResponse200): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineResponse200): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/inline_response2001.py b/swagger_client/models/inline_response2001.py new file mode 100644 index 0000000..02cf033 --- /dev/null +++ b/swagger_client/models/inline_response2001.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class InlineResponse2001(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 = { + 'data': 'list[User]', + 'ok': 'bool' + } + + attribute_map = { + 'data': 'data', + 'ok': 'ok' + } + + def __init__(self, data=None, ok=None, _configuration=None): # noqa: E501 + """InlineResponse2001 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data = None + self._ok = None + self.discriminator = None + + if data is not None: + self.data = data + if ok is not None: + self.ok = ok + + @property + def data(self): + """Gets the data of this InlineResponse2001. # noqa: E501 + + + :return: The data of this InlineResponse2001. # noqa: E501 + :rtype: list[User] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this InlineResponse2001. + + + :param data: The data of this InlineResponse2001. # noqa: E501 + :type: list[User] + """ + + self._data = data + + @property + def ok(self): + """Gets the ok of this InlineResponse2001. # noqa: E501 + + + :return: The ok of this InlineResponse2001. # noqa: E501 + :rtype: bool + """ + return self._ok + + @ok.setter + def ok(self, ok): + """Sets the ok of this InlineResponse2001. + + + :param ok: The ok of this InlineResponse2001. # noqa: E501 + :type: bool + """ + + self._ok = ok + + 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(InlineResponse2001, 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, InlineResponse2001): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineResponse2001): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/internal_tracker.py b/swagger_client/models/internal_tracker.py new file mode 100644 index 0000000..c1494aa --- /dev/null +++ b/swagger_client/models/internal_tracker.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class InternalTracker(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 = { + 'allow_only_contributors_to_track_time': 'bool', + 'enable_issue_dependencies': 'bool', + 'enable_time_tracker': 'bool' + } + + attribute_map = { + 'allow_only_contributors_to_track_time': 'allow_only_contributors_to_track_time', + 'enable_issue_dependencies': 'enable_issue_dependencies', + 'enable_time_tracker': 'enable_time_tracker' + } + + def __init__(self, allow_only_contributors_to_track_time=None, enable_issue_dependencies=None, enable_time_tracker=None, _configuration=None): # noqa: E501 + """InternalTracker - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allow_only_contributors_to_track_time = None + self._enable_issue_dependencies = None + self._enable_time_tracker = None + self.discriminator = None + + if allow_only_contributors_to_track_time is not None: + self.allow_only_contributors_to_track_time = allow_only_contributors_to_track_time + if enable_issue_dependencies is not None: + self.enable_issue_dependencies = enable_issue_dependencies + if enable_time_tracker is not None: + self.enable_time_tracker = enable_time_tracker + + @property + def allow_only_contributors_to_track_time(self): + """Gets the allow_only_contributors_to_track_time of this InternalTracker. # noqa: E501 + + Let only contributors track time (Built-in issue tracker) # noqa: E501 + + :return: The allow_only_contributors_to_track_time of this InternalTracker. # noqa: E501 + :rtype: bool + """ + return self._allow_only_contributors_to_track_time + + @allow_only_contributors_to_track_time.setter + def allow_only_contributors_to_track_time(self, allow_only_contributors_to_track_time): + """Sets the allow_only_contributors_to_track_time of this InternalTracker. + + Let only contributors track time (Built-in issue tracker) # noqa: E501 + + :param allow_only_contributors_to_track_time: The allow_only_contributors_to_track_time of this InternalTracker. # noqa: E501 + :type: bool + """ + + self._allow_only_contributors_to_track_time = allow_only_contributors_to_track_time + + @property + def enable_issue_dependencies(self): + """Gets the enable_issue_dependencies of this InternalTracker. # noqa: E501 + + Enable dependencies for issues and pull requests (Built-in issue tracker) # noqa: E501 + + :return: The enable_issue_dependencies of this InternalTracker. # noqa: E501 + :rtype: bool + """ + return self._enable_issue_dependencies + + @enable_issue_dependencies.setter + def enable_issue_dependencies(self, enable_issue_dependencies): + """Sets the enable_issue_dependencies of this InternalTracker. + + Enable dependencies for issues and pull requests (Built-in issue tracker) # noqa: E501 + + :param enable_issue_dependencies: The enable_issue_dependencies of this InternalTracker. # noqa: E501 + :type: bool + """ + + self._enable_issue_dependencies = enable_issue_dependencies + + @property + def enable_time_tracker(self): + """Gets the enable_time_tracker of this InternalTracker. # noqa: E501 + + Enable time tracking (Built-in issue tracker) # noqa: E501 + + :return: The enable_time_tracker of this InternalTracker. # noqa: E501 + :rtype: bool + """ + return self._enable_time_tracker + + @enable_time_tracker.setter + def enable_time_tracker(self, enable_time_tracker): + """Sets the enable_time_tracker of this InternalTracker. + + Enable time tracking (Built-in issue tracker) # noqa: E501 + + :param enable_time_tracker: The enable_time_tracker of this InternalTracker. # noqa: E501 + :type: bool + """ + + self._enable_time_tracker = enable_time_tracker + + 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(InternalTracker, 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, InternalTracker): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InternalTracker): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue.py b/swagger_client/models/issue.py new file mode 100644 index 0000000..2a5f31c --- /dev/null +++ b/swagger_client/models/issue.py @@ -0,0 +1,773 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Issue(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 = { + 'assets': 'list[Attachment]', + 'assignee': 'User', + 'assignees': 'list[User]', + 'body': 'str', + 'closed_at': 'datetime', + 'comments': 'int', + 'created_at': 'datetime', + 'due_date': 'datetime', + 'html_url': 'str', + 'id': 'int', + 'is_locked': 'bool', + 'labels': 'list[Label]', + 'milestone': 'Milestone', + 'number': 'int', + 'original_author': 'str', + 'original_author_id': 'int', + 'pin_order': 'int', + 'pull_request': 'PullRequestMeta', + 'ref': 'str', + 'repository': 'RepositoryMeta', + 'state': 'StateType', + 'time_estimate': 'int', + 'title': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'assets': 'assets', + 'assignee': 'assignee', + 'assignees': 'assignees', + 'body': 'body', + 'closed_at': 'closed_at', + 'comments': 'comments', + 'created_at': 'created_at', + 'due_date': 'due_date', + 'html_url': 'html_url', + 'id': 'id', + 'is_locked': 'is_locked', + 'labels': 'labels', + 'milestone': 'milestone', + 'number': 'number', + 'original_author': 'original_author', + 'original_author_id': 'original_author_id', + 'pin_order': 'pin_order', + 'pull_request': 'pull_request', + 'ref': 'ref', + 'repository': 'repository', + 'state': 'state', + 'time_estimate': 'time_estimate', + 'title': 'title', + 'updated_at': 'updated_at', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, assets=None, assignee=None, assignees=None, body=None, closed_at=None, comments=None, created_at=None, due_date=None, html_url=None, id=None, is_locked=None, labels=None, milestone=None, number=None, original_author=None, original_author_id=None, pin_order=None, pull_request=None, ref=None, repository=None, state=None, time_estimate=None, title=None, updated_at=None, url=None, user=None, _configuration=None): # noqa: E501 + """Issue - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assets = None + self._assignee = None + self._assignees = None + self._body = None + self._closed_at = None + self._comments = None + self._created_at = None + self._due_date = None + self._html_url = None + self._id = None + self._is_locked = None + self._labels = None + self._milestone = None + self._number = None + self._original_author = None + self._original_author_id = None + self._pin_order = None + self._pull_request = None + self._ref = None + self._repository = None + self._state = None + self._time_estimate = None + self._title = None + self._updated_at = None + self._url = None + self._user = None + self.discriminator = None + + if assets is not None: + self.assets = assets + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if closed_at is not None: + self.closed_at = closed_at + if comments is not None: + self.comments = comments + if created_at is not None: + self.created_at = created_at + if due_date is not None: + self.due_date = due_date + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if is_locked is not None: + self.is_locked = is_locked + if labels is not None: + self.labels = labels + if milestone is not None: + self.milestone = milestone + if number is not None: + self.number = number + if original_author is not None: + self.original_author = original_author + if original_author_id is not None: + self.original_author_id = original_author_id + if pin_order is not None: + self.pin_order = pin_order + if pull_request is not None: + self.pull_request = pull_request + if ref is not None: + self.ref = ref + if repository is not None: + self.repository = repository + if state is not None: + self.state = state + if time_estimate is not None: + self.time_estimate = time_estimate + if title is not None: + self.title = title + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if user is not None: + self.user = user + + @property + def assets(self): + """Gets the assets of this Issue. # noqa: E501 + + + :return: The assets of this Issue. # noqa: E501 + :rtype: list[Attachment] + """ + return self._assets + + @assets.setter + def assets(self, assets): + """Sets the assets of this Issue. + + + :param assets: The assets of this Issue. # noqa: E501 + :type: list[Attachment] + """ + + self._assets = assets + + @property + def assignee(self): + """Gets the assignee of this Issue. # noqa: E501 + + + :return: The assignee of this Issue. # noqa: E501 + :rtype: User + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this Issue. + + + :param assignee: The assignee of this Issue. # noqa: E501 + :type: User + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this Issue. # noqa: E501 + + + :return: The assignees of this Issue. # noqa: E501 + :rtype: list[User] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this Issue. + + + :param assignees: The assignees of this Issue. # noqa: E501 + :type: list[User] + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this Issue. # noqa: E501 + + + :return: The body of this Issue. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Issue. + + + :param body: The body of this Issue. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def closed_at(self): + """Gets the closed_at of this Issue. # noqa: E501 + + + :return: The closed_at of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._closed_at + + @closed_at.setter + def closed_at(self, closed_at): + """Sets the closed_at of this Issue. + + + :param closed_at: The closed_at of this Issue. # noqa: E501 + :type: datetime + """ + + self._closed_at = closed_at + + @property + def comments(self): + """Gets the comments of this Issue. # noqa: E501 + + + :return: The comments of this Issue. # noqa: E501 + :rtype: int + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this Issue. + + + :param comments: The comments of this Issue. # noqa: E501 + :type: int + """ + + self._comments = comments + + @property + def created_at(self): + """Gets the created_at of this Issue. # noqa: E501 + + + :return: The created_at of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Issue. + + + :param created_at: The created_at of this Issue. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def due_date(self): + """Gets the due_date of this Issue. # noqa: E501 + + + :return: The due_date of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this Issue. + + + :param due_date: The due_date of this Issue. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def html_url(self): + """Gets the html_url of this Issue. # noqa: E501 + + + :return: The html_url of this Issue. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Issue. + + + :param html_url: The html_url of this Issue. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Issue. # noqa: E501 + + + :return: The id of this Issue. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Issue. + + + :param id: The id of this Issue. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def is_locked(self): + """Gets the is_locked of this Issue. # noqa: E501 + + + :return: The is_locked of this Issue. # noqa: E501 + :rtype: bool + """ + return self._is_locked + + @is_locked.setter + def is_locked(self, is_locked): + """Sets the is_locked of this Issue. + + + :param is_locked: The is_locked of this Issue. # noqa: E501 + :type: bool + """ + + self._is_locked = is_locked + + @property + def labels(self): + """Gets the labels of this Issue. # noqa: E501 + + + :return: The labels of this Issue. # noqa: E501 + :rtype: list[Label] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this Issue. + + + :param labels: The labels of this Issue. # noqa: E501 + :type: list[Label] + """ + + self._labels = labels + + @property + def milestone(self): + """Gets the milestone of this Issue. # noqa: E501 + + + :return: The milestone of this Issue. # noqa: E501 + :rtype: Milestone + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this Issue. + + + :param milestone: The milestone of this Issue. # noqa: E501 + :type: Milestone + """ + + self._milestone = milestone + + @property + def number(self): + """Gets the number of this Issue. # noqa: E501 + + + :return: The number of this Issue. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this Issue. + + + :param number: The number of this Issue. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def original_author(self): + """Gets the original_author of this Issue. # noqa: E501 + + + :return: The original_author of this Issue. # noqa: E501 + :rtype: str + """ + return self._original_author + + @original_author.setter + def original_author(self, original_author): + """Sets the original_author of this Issue. + + + :param original_author: The original_author of this Issue. # noqa: E501 + :type: str + """ + + self._original_author = original_author + + @property + def original_author_id(self): + """Gets the original_author_id of this Issue. # noqa: E501 + + + :return: The original_author_id of this Issue. # noqa: E501 + :rtype: int + """ + return self._original_author_id + + @original_author_id.setter + def original_author_id(self, original_author_id): + """Sets the original_author_id of this Issue. + + + :param original_author_id: The original_author_id of this Issue. # noqa: E501 + :type: int + """ + + self._original_author_id = original_author_id + + @property + def pin_order(self): + """Gets the pin_order of this Issue. # noqa: E501 + + + :return: The pin_order of this Issue. # noqa: E501 + :rtype: int + """ + return self._pin_order + + @pin_order.setter + def pin_order(self, pin_order): + """Sets the pin_order of this Issue. + + + :param pin_order: The pin_order of this Issue. # noqa: E501 + :type: int + """ + + self._pin_order = pin_order + + @property + def pull_request(self): + """Gets the pull_request of this Issue. # noqa: E501 + + + :return: The pull_request of this Issue. # noqa: E501 + :rtype: PullRequestMeta + """ + return self._pull_request + + @pull_request.setter + def pull_request(self, pull_request): + """Sets the pull_request of this Issue. + + + :param pull_request: The pull_request of this Issue. # noqa: E501 + :type: PullRequestMeta + """ + + self._pull_request = pull_request + + @property + def ref(self): + """Gets the ref of this Issue. # noqa: E501 + + + :return: The ref of this Issue. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this Issue. + + + :param ref: The ref of this Issue. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def repository(self): + """Gets the repository of this Issue. # noqa: E501 + + + :return: The repository of this Issue. # noqa: E501 + :rtype: RepositoryMeta + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this Issue. + + + :param repository: The repository of this Issue. # noqa: E501 + :type: RepositoryMeta + """ + + self._repository = repository + + @property + def state(self): + """Gets the state of this Issue. # noqa: E501 + + + :return: The state of this Issue. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this Issue. + + + :param state: The state of this Issue. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def time_estimate(self): + """Gets the time_estimate of this Issue. # noqa: E501 + + + :return: The time_estimate of this Issue. # noqa: E501 + :rtype: int + """ + return self._time_estimate + + @time_estimate.setter + def time_estimate(self, time_estimate): + """Sets the time_estimate of this Issue. + + + :param time_estimate: The time_estimate of this Issue. # noqa: E501 + :type: int + """ + + self._time_estimate = time_estimate + + @property + def title(self): + """Gets the title of this Issue. # noqa: E501 + + + :return: The title of this Issue. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this Issue. + + + :param title: The title of this Issue. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def updated_at(self): + """Gets the updated_at of this Issue. # noqa: E501 + + + :return: The updated_at of this Issue. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Issue. + + + :param updated_at: The updated_at of this Issue. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this Issue. # noqa: E501 + + + :return: The url of this Issue. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Issue. + + + :param url: The url of this Issue. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this Issue. # noqa: E501 + + + :return: The user of this Issue. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Issue. + + + :param user: The user of this Issue. # noqa: E501 + :type: User + """ + + 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(Issue, 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, Issue): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Issue): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_config.py b/swagger_client/models/issue_config.py new file mode 100644 index 0000000..b953b53 --- /dev/null +++ b/swagger_client/models/issue_config.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueConfig(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 = { + 'blank_issues_enabled': 'bool', + 'contact_links': 'list[IssueConfigContactLink]' + } + + attribute_map = { + 'blank_issues_enabled': 'blank_issues_enabled', + 'contact_links': 'contact_links' + } + + def __init__(self, blank_issues_enabled=None, contact_links=None, _configuration=None): # noqa: E501 + """IssueConfig - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._blank_issues_enabled = None + self._contact_links = None + self.discriminator = None + + if blank_issues_enabled is not None: + self.blank_issues_enabled = blank_issues_enabled + if contact_links is not None: + self.contact_links = contact_links + + @property + def blank_issues_enabled(self): + """Gets the blank_issues_enabled of this IssueConfig. # noqa: E501 + + + :return: The blank_issues_enabled of this IssueConfig. # noqa: E501 + :rtype: bool + """ + return self._blank_issues_enabled + + @blank_issues_enabled.setter + def blank_issues_enabled(self, blank_issues_enabled): + """Sets the blank_issues_enabled of this IssueConfig. + + + :param blank_issues_enabled: The blank_issues_enabled of this IssueConfig. # noqa: E501 + :type: bool + """ + + self._blank_issues_enabled = blank_issues_enabled + + @property + def contact_links(self): + """Gets the contact_links of this IssueConfig. # noqa: E501 + + + :return: The contact_links of this IssueConfig. # noqa: E501 + :rtype: list[IssueConfigContactLink] + """ + return self._contact_links + + @contact_links.setter + def contact_links(self, contact_links): + """Sets the contact_links of this IssueConfig. + + + :param contact_links: The contact_links of this IssueConfig. # noqa: E501 + :type: list[IssueConfigContactLink] + """ + + self._contact_links = contact_links + + 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(IssueConfig, 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, IssueConfig): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueConfig): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_config_contact_link.py b/swagger_client/models/issue_config_contact_link.py new file mode 100644 index 0000000..7990e12 --- /dev/null +++ b/swagger_client/models/issue_config_contact_link.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueConfigContactLink(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 = { + 'about': 'str', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'about': 'about', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, about=None, name=None, url=None, _configuration=None): # noqa: E501 + """IssueConfigContactLink - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._about = None + self._name = None + self._url = None + self.discriminator = None + + if about is not None: + self.about = about + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def about(self): + """Gets the about of this IssueConfigContactLink. # noqa: E501 + + + :return: The about of this IssueConfigContactLink. # noqa: E501 + :rtype: str + """ + return self._about + + @about.setter + def about(self, about): + """Sets the about of this IssueConfigContactLink. + + + :param about: The about of this IssueConfigContactLink. # noqa: E501 + :type: str + """ + + self._about = about + + @property + def name(self): + """Gets the name of this IssueConfigContactLink. # noqa: E501 + + + :return: The name of this IssueConfigContactLink. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this IssueConfigContactLink. + + + :param name: The name of this IssueConfigContactLink. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this IssueConfigContactLink. # noqa: E501 + + + :return: The url of this IssueConfigContactLink. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this IssueConfigContactLink. + + + :param url: The url of this IssueConfigContactLink. # 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(IssueConfigContactLink, 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, IssueConfigContactLink): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueConfigContactLink): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_config_validation.py b/swagger_client/models/issue_config_validation.py new file mode 100644 index 0000000..b1a9083 --- /dev/null +++ b/swagger_client/models/issue_config_validation.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueConfigValidation(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 = { + 'message': 'str', + 'valid': 'bool' + } + + attribute_map = { + 'message': 'message', + 'valid': 'valid' + } + + def __init__(self, message=None, valid=None, _configuration=None): # noqa: E501 + """IssueConfigValidation - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._message = None + self._valid = None + self.discriminator = None + + if message is not None: + self.message = message + if valid is not None: + self.valid = valid + + @property + def message(self): + """Gets the message of this IssueConfigValidation. # noqa: E501 + + + :return: The message of this IssueConfigValidation. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this IssueConfigValidation. + + + :param message: The message of this IssueConfigValidation. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def valid(self): + """Gets the valid of this IssueConfigValidation. # noqa: E501 + + + :return: The valid of this IssueConfigValidation. # noqa: E501 + :rtype: bool + """ + return self._valid + + @valid.setter + def valid(self, valid): + """Sets the valid of this IssueConfigValidation. + + + :param valid: The valid of this IssueConfigValidation. # noqa: E501 + :type: bool + """ + + self._valid = valid + + 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(IssueConfigValidation, 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, IssueConfigValidation): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueConfigValidation): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_deadline.py b/swagger_client/models/issue_deadline.py new file mode 100644 index 0000000..123067c --- /dev/null +++ b/swagger_client/models/issue_deadline.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueDeadline(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 = { + 'due_date': 'datetime' + } + + attribute_map = { + 'due_date': 'due_date' + } + + def __init__(self, due_date=None, _configuration=None): # noqa: E501 + """IssueDeadline - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._due_date = None + self.discriminator = None + + if due_date is not None: + self.due_date = due_date + + @property + def due_date(self): + """Gets the due_date of this IssueDeadline. # noqa: E501 + + + :return: The due_date of this IssueDeadline. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this IssueDeadline. + + + :param due_date: The due_date of this IssueDeadline. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + 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(IssueDeadline, 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, IssueDeadline): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueDeadline): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_form_field.py b/swagger_client/models/issue_form_field.py new file mode 100644 index 0000000..88899b5 --- /dev/null +++ b/swagger_client/models/issue_form_field.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueFormField(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 = { + 'attributes': 'dict(str, object)', + 'id': 'str', + 'type': 'IssueFormFieldType', + 'validations': 'dict(str, object)', + 'visible': 'list[IssueFormFieldVisible]' + } + + attribute_map = { + 'attributes': 'attributes', + 'id': 'id', + 'type': 'type', + 'validations': 'validations', + 'visible': 'visible' + } + + def __init__(self, attributes=None, id=None, type=None, validations=None, visible=None, _configuration=None): # noqa: E501 + """IssueFormField - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._attributes = None + self._id = None + self._type = None + self._validations = None + self._visible = None + self.discriminator = None + + if attributes is not None: + self.attributes = attributes + if id is not None: + self.id = id + if type is not None: + self.type = type + if validations is not None: + self.validations = validations + if visible is not None: + self.visible = visible + + @property + def attributes(self): + """Gets the attributes of this IssueFormField. # noqa: E501 + + + :return: The attributes of this IssueFormField. # noqa: E501 + :rtype: dict(str, object) + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """Sets the attributes of this IssueFormField. + + + :param attributes: The attributes of this IssueFormField. # noqa: E501 + :type: dict(str, object) + """ + + self._attributes = attributes + + @property + def id(self): + """Gets the id of this IssueFormField. # noqa: E501 + + + :return: The id of this IssueFormField. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this IssueFormField. + + + :param id: The id of this IssueFormField. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def type(self): + """Gets the type of this IssueFormField. # noqa: E501 + + + :return: The type of this IssueFormField. # noqa: E501 + :rtype: IssueFormFieldType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this IssueFormField. + + + :param type: The type of this IssueFormField. # noqa: E501 + :type: IssueFormFieldType + """ + + self._type = type + + @property + def validations(self): + """Gets the validations of this IssueFormField. # noqa: E501 + + + :return: The validations of this IssueFormField. # noqa: E501 + :rtype: dict(str, object) + """ + return self._validations + + @validations.setter + def validations(self, validations): + """Sets the validations of this IssueFormField. + + + :param validations: The validations of this IssueFormField. # noqa: E501 + :type: dict(str, object) + """ + + self._validations = validations + + @property + def visible(self): + """Gets the visible of this IssueFormField. # noqa: E501 + + + :return: The visible of this IssueFormField. # noqa: E501 + :rtype: list[IssueFormFieldVisible] + """ + return self._visible + + @visible.setter + def visible(self, visible): + """Sets the visible of this IssueFormField. + + + :param visible: The visible of this IssueFormField. # noqa: E501 + :type: list[IssueFormFieldVisible] + """ + + self._visible = visible + + 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(IssueFormField, 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, IssueFormField): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueFormField): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_form_field_type.py b/swagger_client/models/issue_form_field_type.py new file mode 100644 index 0000000..90764d6 --- /dev/null +++ b/swagger_client/models/issue_form_field_type.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueFormFieldType(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, _configuration=None): # noqa: E501 + """IssueFormFieldType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(IssueFormFieldType, 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, IssueFormFieldType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueFormFieldType): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_form_field_visible.py b/swagger_client/models/issue_form_field_visible.py new file mode 100644 index 0000000..0e4e553 --- /dev/null +++ b/swagger_client/models/issue_form_field_visible.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueFormFieldVisible(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, _configuration=None): # noqa: E501 + """IssueFormFieldVisible - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(IssueFormFieldVisible, 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, IssueFormFieldVisible): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueFormFieldVisible): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_labels_option.py b/swagger_client/models/issue_labels_option.py new file mode 100644 index 0000000..734a250 --- /dev/null +++ b/swagger_client/models/issue_labels_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueLabelsOption(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 = { + 'labels': 'list[object]' + } + + attribute_map = { + 'labels': 'labels' + } + + def __init__(self, labels=None, _configuration=None): # noqa: E501 + """IssueLabelsOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._labels = None + self.discriminator = None + + if labels is not None: + self.labels = labels + + @property + def labels(self): + """Gets the labels of this IssueLabelsOption. # noqa: E501 + + Labels can be a list of integers representing label IDs or a list of strings representing label names # noqa: E501 + + :return: The labels of this IssueLabelsOption. # noqa: E501 + :rtype: list[object] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this IssueLabelsOption. + + Labels can be a list of integers representing label IDs or a list of strings representing label names # noqa: E501 + + :param labels: The labels of this IssueLabelsOption. # noqa: E501 + :type: list[object] + """ + + self._labels = labels + + 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(IssueLabelsOption, 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, IssueLabelsOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueLabelsOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_meta.py b/swagger_client/models/issue_meta.py new file mode 100644 index 0000000..1396449 --- /dev/null +++ b/swagger_client/models/issue_meta.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueMeta(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 = { + 'index': 'int', + 'owner': 'str', + 'repo': 'str' + } + + attribute_map = { + 'index': 'index', + 'owner': 'owner', + 'repo': 'repo' + } + + def __init__(self, index=None, owner=None, repo=None, _configuration=None): # noqa: E501 + """IssueMeta - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._index = None + self._owner = None + self._repo = None + self.discriminator = None + + if index is not None: + self.index = index + if owner is not None: + self.owner = owner + if repo is not None: + self.repo = repo + + @property + def index(self): + """Gets the index of this IssueMeta. # noqa: E501 + + + :return: The index of this IssueMeta. # noqa: E501 + :rtype: int + """ + return self._index + + @index.setter + def index(self, index): + """Sets the index of this IssueMeta. + + + :param index: The index of this IssueMeta. # noqa: E501 + :type: int + """ + + self._index = index + + @property + def owner(self): + """Gets the owner of this IssueMeta. # noqa: E501 + + owner of the issue's repo # noqa: E501 + + :return: The owner of this IssueMeta. # noqa: E501 + :rtype: str + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this IssueMeta. + + owner of the issue's repo # noqa: E501 + + :param owner: The owner of this IssueMeta. # noqa: E501 + :type: str + """ + + self._owner = owner + + @property + def repo(self): + """Gets the repo of this IssueMeta. # noqa: E501 + + + :return: The repo of this IssueMeta. # noqa: E501 + :rtype: str + """ + return self._repo + + @repo.setter + def repo(self, repo): + """Sets the repo of this IssueMeta. + + + :param repo: The repo of this IssueMeta. # noqa: E501 + :type: str + """ + + self._repo = repo + + 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(IssueMeta, 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, IssueMeta): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueMeta): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_template.py b/swagger_client/models/issue_template.py new file mode 100644 index 0000000..710189a --- /dev/null +++ b/swagger_client/models/issue_template.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueTemplate(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 = { + 'about': 'str', + 'assignees': 'IssueTemplateStringSlice', + 'body': 'list[IssueFormField]', + 'content': 'str', + 'file_name': 'str', + 'labels': 'IssueTemplateStringSlice', + 'name': 'str', + 'ref': 'str', + 'title': 'str' + } + + attribute_map = { + 'about': 'about', + 'assignees': 'assignees', + 'body': 'body', + 'content': 'content', + 'file_name': 'file_name', + 'labels': 'labels', + 'name': 'name', + 'ref': 'ref', + 'title': 'title' + } + + def __init__(self, about=None, assignees=None, body=None, content=None, file_name=None, labels=None, name=None, ref=None, title=None, _configuration=None): # noqa: E501 + """IssueTemplate - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._about = None + self._assignees = None + self._body = None + self._content = None + self._file_name = None + self._labels = None + self._name = None + self._ref = None + self._title = None + self.discriminator = None + + if about is not None: + self.about = about + if assignees is not None: + self.assignees = assignees + if body is not None: + self.body = body + if content is not None: + self.content = content + if file_name is not None: + self.file_name = file_name + if labels is not None: + self.labels = labels + if name is not None: + self.name = name + if ref is not None: + self.ref = ref + if title is not None: + self.title = title + + @property + def about(self): + """Gets the about of this IssueTemplate. # noqa: E501 + + + :return: The about of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._about + + @about.setter + def about(self, about): + """Sets the about of this IssueTemplate. + + + :param about: The about of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._about = about + + @property + def assignees(self): + """Gets the assignees of this IssueTemplate. # noqa: E501 + + + :return: The assignees of this IssueTemplate. # noqa: E501 + :rtype: IssueTemplateStringSlice + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this IssueTemplate. + + + :param assignees: The assignees of this IssueTemplate. # noqa: E501 + :type: IssueTemplateStringSlice + """ + + self._assignees = assignees + + @property + def body(self): + """Gets the body of this IssueTemplate. # noqa: E501 + + + :return: The body of this IssueTemplate. # noqa: E501 + :rtype: list[IssueFormField] + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this IssueTemplate. + + + :param body: The body of this IssueTemplate. # noqa: E501 + :type: list[IssueFormField] + """ + + self._body = body + + @property + def content(self): + """Gets the content of this IssueTemplate. # noqa: E501 + + + :return: The content of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this IssueTemplate. + + + :param content: The content of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def file_name(self): + """Gets the file_name of this IssueTemplate. # noqa: E501 + + + :return: The file_name of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._file_name + + @file_name.setter + def file_name(self, file_name): + """Sets the file_name of this IssueTemplate. + + + :param file_name: The file_name of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._file_name = file_name + + @property + def labels(self): + """Gets the labels of this IssueTemplate. # noqa: E501 + + + :return: The labels of this IssueTemplate. # noqa: E501 + :rtype: IssueTemplateStringSlice + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this IssueTemplate. + + + :param labels: The labels of this IssueTemplate. # noqa: E501 + :type: IssueTemplateStringSlice + """ + + self._labels = labels + + @property + def name(self): + """Gets the name of this IssueTemplate. # noqa: E501 + + + :return: The name of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this IssueTemplate. + + + :param name: The name of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def ref(self): + """Gets the ref of this IssueTemplate. # noqa: E501 + + + :return: The ref of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this IssueTemplate. + + + :param ref: The ref of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def title(self): + """Gets the title of this IssueTemplate. # noqa: E501 + + + :return: The title of this IssueTemplate. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this IssueTemplate. + + + :param title: The title of this IssueTemplate. # noqa: E501 + :type: str + """ + + self._title = title + + 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(IssueTemplate, 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, IssueTemplate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueTemplate): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/issue_template_string_slice.py b/swagger_client/models/issue_template_string_slice.py new file mode 100644 index 0000000..d53ad5d --- /dev/null +++ b/swagger_client/models/issue_template_string_slice.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class IssueTemplateStringSlice(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, _configuration=None): # noqa: E501 + """IssueTemplateStringSlice - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(IssueTemplateStringSlice, 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, IssueTemplateStringSlice): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IssueTemplateStringSlice): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/label.py b/swagger_client/models/label.py new file mode 100644 index 0000000..0024d20 --- /dev/null +++ b/swagger_client/models/label.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Label(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 = { + 'color': 'str', + 'description': 'str', + 'exclusive': 'bool', + 'id': 'int', + 'is_archived': 'bool', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'exclusive': 'exclusive', + 'id': 'id', + 'is_archived': 'is_archived', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, color=None, description=None, exclusive=None, id=None, is_archived=None, name=None, url=None, _configuration=None): # noqa: E501 + """Label - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._color = None + self._description = None + self._exclusive = None + self._id = None + self._is_archived = None + self._name = None + self._url = None + self.discriminator = None + + if color is not None: + self.color = color + if description is not None: + self.description = description + if exclusive is not None: + self.exclusive = exclusive + if id is not None: + self.id = id + if is_archived is not None: + self.is_archived = is_archived + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def color(self): + """Gets the color of this Label. # noqa: E501 + + + :return: The color of this Label. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this Label. + + + :param color: The color of this Label. # noqa: E501 + :type: str + """ + + self._color = color + + @property + def description(self): + """Gets the description of this Label. # noqa: E501 + + Description provides additional context about the label's purpose # noqa: E501 + + :return: The description of this Label. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Label. + + Description provides additional context about the label's purpose # noqa: E501 + + :param description: The description of this Label. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def exclusive(self): + """Gets the exclusive of this Label. # noqa: E501 + + + :return: The exclusive of this Label. # noqa: E501 + :rtype: bool + """ + return self._exclusive + + @exclusive.setter + def exclusive(self, exclusive): + """Sets the exclusive of this Label. + + + :param exclusive: The exclusive of this Label. # noqa: E501 + :type: bool + """ + + self._exclusive = exclusive + + @property + def id(self): + """Gets the id of this Label. # noqa: E501 + + ID is the unique identifier for the label # noqa: E501 + + :return: The id of this Label. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Label. + + ID is the unique identifier for the label # noqa: E501 + + :param id: The id of this Label. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def is_archived(self): + """Gets the is_archived of this Label. # noqa: E501 + + + :return: The is_archived of this Label. # noqa: E501 + :rtype: bool + """ + return self._is_archived + + @is_archived.setter + def is_archived(self, is_archived): + """Sets the is_archived of this Label. + + + :param is_archived: The is_archived of this Label. # noqa: E501 + :type: bool + """ + + self._is_archived = is_archived + + @property + def name(self): + """Gets the name of this Label. # noqa: E501 + + Name is the display name of the label # noqa: E501 + + :return: The name of this Label. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Label. + + Name is the display name of the label # noqa: E501 + + :param name: The name of this Label. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this Label. # noqa: E501 + + URL is the API endpoint for accessing this label # noqa: E501 + + :return: The url of this Label. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Label. + + URL is the API endpoint for accessing this label # noqa: E501 + + :param url: The url of this Label. # 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(Label, 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, Label): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Label): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/label_template.py b/swagger_client/models/label_template.py new file mode 100644 index 0000000..2a90a3d --- /dev/null +++ b/swagger_client/models/label_template.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class LabelTemplate(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 = { + 'color': 'str', + 'description': 'str', + 'exclusive': 'bool', + 'name': 'str' + } + + attribute_map = { + 'color': 'color', + 'description': 'description', + 'exclusive': 'exclusive', + 'name': 'name' + } + + def __init__(self, color=None, description=None, exclusive=None, name=None, _configuration=None): # noqa: E501 + """LabelTemplate - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._color = None + self._description = None + self._exclusive = None + self._name = None + self.discriminator = None + + if color is not None: + self.color = color + if description is not None: + self.description = description + if exclusive is not None: + self.exclusive = exclusive + if name is not None: + self.name = name + + @property + def color(self): + """Gets the color of this LabelTemplate. # noqa: E501 + + + :return: The color of this LabelTemplate. # noqa: E501 + :rtype: str + """ + return self._color + + @color.setter + def color(self, color): + """Sets the color of this LabelTemplate. + + + :param color: The color of this LabelTemplate. # noqa: E501 + :type: str + """ + + self._color = color + + @property + def description(self): + """Gets the description of this LabelTemplate. # noqa: E501 + + Description provides additional context about the label template's purpose # noqa: E501 + + :return: The description of this LabelTemplate. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this LabelTemplate. + + Description provides additional context about the label template's purpose # noqa: E501 + + :param description: The description of this LabelTemplate. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def exclusive(self): + """Gets the exclusive of this LabelTemplate. # noqa: E501 + + + :return: The exclusive of this LabelTemplate. # noqa: E501 + :rtype: bool + """ + return self._exclusive + + @exclusive.setter + def exclusive(self, exclusive): + """Sets the exclusive of this LabelTemplate. + + + :param exclusive: The exclusive of this LabelTemplate. # noqa: E501 + :type: bool + """ + + self._exclusive = exclusive + + @property + def name(self): + """Gets the name of this LabelTemplate. # noqa: E501 + + Name is the display name of the label template # noqa: E501 + + :return: The name of this LabelTemplate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this LabelTemplate. + + Name is the display name of the label template # noqa: E501 + + :param name: The name of this LabelTemplate. # 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(LabelTemplate, 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, LabelTemplate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LabelTemplate): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/license_template_info.py b/swagger_client/models/license_template_info.py new file mode 100644 index 0000000..33a30dc --- /dev/null +++ b/swagger_client/models/license_template_info.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class LicenseTemplateInfo(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 = { + 'body': 'str', + 'implementation': 'str', + 'key': 'str', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'body': 'body', + 'implementation': 'implementation', + 'key': 'key', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, body=None, implementation=None, key=None, name=None, url=None, _configuration=None): # noqa: E501 + """LicenseTemplateInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._implementation = None + self._key = None + self._name = None + self._url = None + self.discriminator = None + + if body is not None: + self.body = body + if implementation is not None: + self.implementation = implementation + if key is not None: + self.key = key + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def body(self): + """Gets the body of this LicenseTemplateInfo. # noqa: E501 + + Body contains the full text of the license # noqa: E501 + + :return: The body of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this LicenseTemplateInfo. + + Body contains the full text of the license # noqa: E501 + + :param body: The body of this LicenseTemplateInfo. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def implementation(self): + """Gets the implementation of this LicenseTemplateInfo. # noqa: E501 + + Implementation contains license implementation details # noqa: E501 + + :return: The implementation of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._implementation + + @implementation.setter + def implementation(self, implementation): + """Sets the implementation of this LicenseTemplateInfo. + + Implementation contains license implementation details # noqa: E501 + + :param implementation: The implementation of this LicenseTemplateInfo. # noqa: E501 + :type: str + """ + + self._implementation = implementation + + @property + def key(self): + """Gets the key of this LicenseTemplateInfo. # noqa: E501 + + Key is the unique identifier for the license template # noqa: E501 + + :return: The key of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this LicenseTemplateInfo. + + Key is the unique identifier for the license template # noqa: E501 + + :param key: The key of this LicenseTemplateInfo. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def name(self): + """Gets the name of this LicenseTemplateInfo. # noqa: E501 + + Name is the display name of the license # noqa: E501 + + :return: The name of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this LicenseTemplateInfo. + + Name is the display name of the license # noqa: E501 + + :param name: The name of this LicenseTemplateInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this LicenseTemplateInfo. # noqa: E501 + + URL is the reference URL for the license # noqa: E501 + + :return: The url of this LicenseTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this LicenseTemplateInfo. + + URL is the reference URL for the license # noqa: E501 + + :param url: The url of this LicenseTemplateInfo. # 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(LicenseTemplateInfo, 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, LicenseTemplateInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LicenseTemplateInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/licenses_template_list_entry.py b/swagger_client/models/licenses_template_list_entry.py new file mode 100644 index 0000000..eef37bd --- /dev/null +++ b/swagger_client/models/licenses_template_list_entry.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class LicensesTemplateListEntry(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 = { + 'key': 'str', + 'name': 'str', + 'url': 'str' + } + + attribute_map = { + 'key': 'key', + 'name': 'name', + 'url': 'url' + } + + def __init__(self, key=None, name=None, url=None, _configuration=None): # noqa: E501 + """LicensesTemplateListEntry - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._key = None + self._name = None + self._url = None + self.discriminator = None + + if key is not None: + self.key = key + if name is not None: + self.name = name + if url is not None: + self.url = url + + @property + def key(self): + """Gets the key of this LicensesTemplateListEntry. # noqa: E501 + + Key is the unique identifier for the license template # noqa: E501 + + :return: The key of this LicensesTemplateListEntry. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this LicensesTemplateListEntry. + + Key is the unique identifier for the license template # noqa: E501 + + :param key: The key of this LicensesTemplateListEntry. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def name(self): + """Gets the name of this LicensesTemplateListEntry. # noqa: E501 + + Name is the display name of the license # noqa: E501 + + :return: The name of this LicensesTemplateListEntry. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this LicensesTemplateListEntry. + + Name is the display name of the license # noqa: E501 + + :param name: The name of this LicensesTemplateListEntry. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def url(self): + """Gets the url of this LicensesTemplateListEntry. # noqa: E501 + + URL is the reference URL for the license # noqa: E501 + + :return: The url of this LicensesTemplateListEntry. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this LicensesTemplateListEntry. + + URL is the reference URL for the license # noqa: E501 + + :param url: The url of this LicensesTemplateListEntry. # 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(LicensesTemplateListEntry, 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, LicensesTemplateListEntry): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LicensesTemplateListEntry): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/lock_issue_option.py b/swagger_client/models/lock_issue_option.py new file mode 100644 index 0000000..dda66f3 --- /dev/null +++ b/swagger_client/models/lock_issue_option.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class LockIssueOption(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 = { + 'lock_reason': 'str' + } + + attribute_map = { + 'lock_reason': 'lock_reason' + } + + def __init__(self, lock_reason=None, _configuration=None): # noqa: E501 + """LockIssueOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._lock_reason = None + self.discriminator = None + + if lock_reason is not None: + self.lock_reason = lock_reason + + @property + def lock_reason(self): + """Gets the lock_reason of this LockIssueOption. # noqa: E501 + + + :return: The lock_reason of this LockIssueOption. # noqa: E501 + :rtype: str + """ + return self._lock_reason + + @lock_reason.setter + def lock_reason(self, lock_reason): + """Sets the lock_reason of this LockIssueOption. + + + :param lock_reason: The lock_reason of this LockIssueOption. # noqa: E501 + :type: str + """ + + self._lock_reason = lock_reason + + 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(LockIssueOption, 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, LockIssueOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LockIssueOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/markdown_option.py b/swagger_client/models/markdown_option.py new file mode 100644 index 0000000..645331b --- /dev/null +++ b/swagger_client/models/markdown_option.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class MarkdownOption(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 = { + 'context': 'str', + 'mode': 'str', + 'text': 'str', + 'wiki': 'bool' + } + + attribute_map = { + 'context': 'Context', + 'mode': 'Mode', + 'text': 'Text', + 'wiki': 'Wiki' + } + + def __init__(self, context=None, mode=None, text=None, wiki=None, _configuration=None): # noqa: E501 + """MarkdownOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._context = None + self._mode = None + self._text = None + self._wiki = None + self.discriminator = None + + if context is not None: + self.context = context + if mode is not None: + self.mode = mode + if text is not None: + self.text = text + if wiki is not None: + self.wiki = wiki + + @property + def context(self): + """Gets the context of this MarkdownOption. # noqa: E501 + + URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} in: body # noqa: E501 + + :return: The context of this MarkdownOption. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this MarkdownOption. + + URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} in: body # noqa: E501 + + :param context: The context of this MarkdownOption. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def mode(self): + """Gets the mode of this MarkdownOption. # noqa: E501 + + Mode to render (markdown, comment, wiki, file) in: body # noqa: E501 + + :return: The mode of this MarkdownOption. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this MarkdownOption. + + Mode to render (markdown, comment, wiki, file) in: body # noqa: E501 + + :param mode: The mode of this MarkdownOption. # noqa: E501 + :type: str + """ + + self._mode = mode + + @property + def text(self): + """Gets the text of this MarkdownOption. # noqa: E501 + + Text markdown to render in: body # noqa: E501 + + :return: The text of this MarkdownOption. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this MarkdownOption. + + Text markdown to render in: body # noqa: E501 + + :param text: The text of this MarkdownOption. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def wiki(self): + """Gets the wiki of this MarkdownOption. # noqa: E501 + + Is it a wiki page? (use mode=wiki instead) Deprecated: true in: body # noqa: E501 + + :return: The wiki of this MarkdownOption. # noqa: E501 + :rtype: bool + """ + return self._wiki + + @wiki.setter + def wiki(self, wiki): + """Sets the wiki of this MarkdownOption. + + Is it a wiki page? (use mode=wiki instead) Deprecated: true in: body # noqa: E501 + + :param wiki: The wiki of this MarkdownOption. # noqa: E501 + :type: bool + """ + + self._wiki = wiki + + 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(MarkdownOption, 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, MarkdownOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarkdownOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/markup_option.py b/swagger_client/models/markup_option.py new file mode 100644 index 0000000..4d24186 --- /dev/null +++ b/swagger_client/models/markup_option.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class MarkupOption(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 = { + 'context': 'str', + 'file_path': 'str', + 'mode': 'str', + 'text': 'str', + 'wiki': 'bool' + } + + attribute_map = { + 'context': 'Context', + 'file_path': 'FilePath', + 'mode': 'Mode', + 'text': 'Text', + 'wiki': 'Wiki' + } + + def __init__(self, context=None, file_path=None, mode=None, text=None, wiki=None, _configuration=None): # noqa: E501 + """MarkupOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._context = None + self._file_path = None + self._mode = None + self._text = None + self._wiki = None + self.discriminator = None + + if context is not None: + self.context = context + if file_path is not None: + self.file_path = file_path + if mode is not None: + self.mode = mode + if text is not None: + self.text = text + if wiki is not None: + self.wiki = wiki + + @property + def context(self): + """Gets the context of this MarkupOption. # noqa: E501 + + URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} in: body # noqa: E501 + + :return: The context of this MarkupOption. # noqa: E501 + :rtype: str + """ + return self._context + + @context.setter + def context(self, context): + """Sets the context of this MarkupOption. + + URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir} in: body # noqa: E501 + + :param context: The context of this MarkupOption. # noqa: E501 + :type: str + """ + + self._context = context + + @property + def file_path(self): + """Gets the file_path of this MarkupOption. # noqa: E501 + + File path for detecting extension in file mode in: body # noqa: E501 + + :return: The file_path of this MarkupOption. # noqa: E501 + :rtype: str + """ + return self._file_path + + @file_path.setter + def file_path(self, file_path): + """Sets the file_path of this MarkupOption. + + File path for detecting extension in file mode in: body # noqa: E501 + + :param file_path: The file_path of this MarkupOption. # noqa: E501 + :type: str + """ + + self._file_path = file_path + + @property + def mode(self): + """Gets the mode of this MarkupOption. # noqa: E501 + + Mode to render (markdown, comment, wiki, file) in: body # noqa: E501 + + :return: The mode of this MarkupOption. # noqa: E501 + :rtype: str + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this MarkupOption. + + Mode to render (markdown, comment, wiki, file) in: body # noqa: E501 + + :param mode: The mode of this MarkupOption. # noqa: E501 + :type: str + """ + + self._mode = mode + + @property + def text(self): + """Gets the text of this MarkupOption. # noqa: E501 + + Text markup to render in: body # noqa: E501 + + :return: The text of this MarkupOption. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this MarkupOption. + + Text markup to render in: body # noqa: E501 + + :param text: The text of this MarkupOption. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def wiki(self): + """Gets the wiki of this MarkupOption. # noqa: E501 + + Is it a wiki page? (use mode=wiki instead) Deprecated: true in: body # noqa: E501 + + :return: The wiki of this MarkupOption. # noqa: E501 + :rtype: bool + """ + return self._wiki + + @wiki.setter + def wiki(self, wiki): + """Sets the wiki of this MarkupOption. + + Is it a wiki page? (use mode=wiki instead) Deprecated: true in: body # noqa: E501 + + :param wiki: The wiki of this MarkupOption. # noqa: E501 + :type: bool + """ + + self._wiki = wiki + + 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(MarkupOption, 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, MarkupOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MarkupOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/merge_pull_request_option.py b/swagger_client/models/merge_pull_request_option.py new file mode 100644 index 0000000..000a13d --- /dev/null +++ b/swagger_client/models/merge_pull_request_option.py @@ -0,0 +1,313 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class MergePullRequestOption(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 = { + 'do': 'str', + 'merge_commit_id': 'str', + 'merge_message_field': 'str', + 'merge_title_field': 'str', + 'delete_branch_after_merge': 'bool', + 'force_merge': 'bool', + 'head_commit_id': 'str', + 'merge_when_checks_succeed': 'bool' + } + + attribute_map = { + 'do': 'Do', + 'merge_commit_id': 'MergeCommitID', + 'merge_message_field': 'MergeMessageField', + 'merge_title_field': 'MergeTitleField', + 'delete_branch_after_merge': 'delete_branch_after_merge', + 'force_merge': 'force_merge', + 'head_commit_id': 'head_commit_id', + 'merge_when_checks_succeed': 'merge_when_checks_succeed' + } + + def __init__(self, do=None, merge_commit_id=None, merge_message_field=None, merge_title_field=None, delete_branch_after_merge=None, force_merge=None, head_commit_id=None, merge_when_checks_succeed=None, _configuration=None): # noqa: E501 + """MergePullRequestOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._do = None + self._merge_commit_id = None + self._merge_message_field = None + self._merge_title_field = None + self._delete_branch_after_merge = None + self._force_merge = None + self._head_commit_id = None + self._merge_when_checks_succeed = None + self.discriminator = None + + self.do = do + if merge_commit_id is not None: + self.merge_commit_id = merge_commit_id + if merge_message_field is not None: + self.merge_message_field = merge_message_field + if merge_title_field is not None: + self.merge_title_field = merge_title_field + if delete_branch_after_merge is not None: + self.delete_branch_after_merge = delete_branch_after_merge + if force_merge is not None: + self.force_merge = force_merge + if head_commit_id is not None: + self.head_commit_id = head_commit_id + if merge_when_checks_succeed is not None: + self.merge_when_checks_succeed = merge_when_checks_succeed + + @property + def do(self): + """Gets the do of this MergePullRequestOption. # noqa: E501 + + + :return: The do of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._do + + @do.setter + def do(self, do): + """Sets the do of this MergePullRequestOption. + + + :param do: The do of this MergePullRequestOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and do is None: + raise ValueError("Invalid value for `do`, must not be `None`") # noqa: E501 + allowed_values = ["merge", "rebase", "rebase-merge", "squash", "fast-forward-only", "manually-merged"] # noqa: E501 + if (self._configuration.client_side_validation and + do not in allowed_values): + raise ValueError( + "Invalid value for `do` ({0}), must be one of {1}" # noqa: E501 + .format(do, allowed_values) + ) + + self._do = do + + @property + def merge_commit_id(self): + """Gets the merge_commit_id of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_commit_id of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._merge_commit_id + + @merge_commit_id.setter + def merge_commit_id(self, merge_commit_id): + """Sets the merge_commit_id of this MergePullRequestOption. + + + :param merge_commit_id: The merge_commit_id of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + self._merge_commit_id = merge_commit_id + + @property + def merge_message_field(self): + """Gets the merge_message_field of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_message_field of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._merge_message_field + + @merge_message_field.setter + def merge_message_field(self, merge_message_field): + """Sets the merge_message_field of this MergePullRequestOption. + + + :param merge_message_field: The merge_message_field of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + self._merge_message_field = merge_message_field + + @property + def merge_title_field(self): + """Gets the merge_title_field of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_title_field of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._merge_title_field + + @merge_title_field.setter + def merge_title_field(self, merge_title_field): + """Sets the merge_title_field of this MergePullRequestOption. + + + :param merge_title_field: The merge_title_field of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + self._merge_title_field = merge_title_field + + @property + def delete_branch_after_merge(self): + """Gets the delete_branch_after_merge of this MergePullRequestOption. # noqa: E501 + + + :return: The delete_branch_after_merge of this MergePullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._delete_branch_after_merge + + @delete_branch_after_merge.setter + def delete_branch_after_merge(self, delete_branch_after_merge): + """Sets the delete_branch_after_merge of this MergePullRequestOption. + + + :param delete_branch_after_merge: The delete_branch_after_merge of this MergePullRequestOption. # noqa: E501 + :type: bool + """ + + self._delete_branch_after_merge = delete_branch_after_merge + + @property + def force_merge(self): + """Gets the force_merge of this MergePullRequestOption. # noqa: E501 + + + :return: The force_merge of this MergePullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._force_merge + + @force_merge.setter + def force_merge(self, force_merge): + """Sets the force_merge of this MergePullRequestOption. + + + :param force_merge: The force_merge of this MergePullRequestOption. # noqa: E501 + :type: bool + """ + + self._force_merge = force_merge + + @property + def head_commit_id(self): + """Gets the head_commit_id of this MergePullRequestOption. # noqa: E501 + + + :return: The head_commit_id of this MergePullRequestOption. # noqa: E501 + :rtype: str + """ + return self._head_commit_id + + @head_commit_id.setter + def head_commit_id(self, head_commit_id): + """Sets the head_commit_id of this MergePullRequestOption. + + + :param head_commit_id: The head_commit_id of this MergePullRequestOption. # noqa: E501 + :type: str + """ + + self._head_commit_id = head_commit_id + + @property + def merge_when_checks_succeed(self): + """Gets the merge_when_checks_succeed of this MergePullRequestOption. # noqa: E501 + + + :return: The merge_when_checks_succeed of this MergePullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._merge_when_checks_succeed + + @merge_when_checks_succeed.setter + def merge_when_checks_succeed(self, merge_when_checks_succeed): + """Sets the merge_when_checks_succeed of this MergePullRequestOption. + + + :param merge_when_checks_succeed: The merge_when_checks_succeed of this MergePullRequestOption. # noqa: E501 + :type: bool + """ + + self._merge_when_checks_succeed = merge_when_checks_succeed + + 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(MergePullRequestOption, 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, MergePullRequestOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MergePullRequestOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/merge_upstream_request.py b/swagger_client/models/merge_upstream_request.py new file mode 100644 index 0000000..811ef29 --- /dev/null +++ b/swagger_client/models/merge_upstream_request.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class MergeUpstreamRequest(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 = { + 'branch': 'str', + 'ff_only': 'bool' + } + + attribute_map = { + 'branch': 'branch', + 'ff_only': 'ff_only' + } + + def __init__(self, branch=None, ff_only=None, _configuration=None): # noqa: E501 + """MergeUpstreamRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._branch = None + self._ff_only = None + self.discriminator = None + + if branch is not None: + self.branch = branch + if ff_only is not None: + self.ff_only = ff_only + + @property + def branch(self): + """Gets the branch of this MergeUpstreamRequest. # noqa: E501 + + + :return: The branch of this MergeUpstreamRequest. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this MergeUpstreamRequest. + + + :param branch: The branch of this MergeUpstreamRequest. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def ff_only(self): + """Gets the ff_only of this MergeUpstreamRequest. # noqa: E501 + + + :return: The ff_only of this MergeUpstreamRequest. # noqa: E501 + :rtype: bool + """ + return self._ff_only + + @ff_only.setter + def ff_only(self, ff_only): + """Sets the ff_only of this MergeUpstreamRequest. + + + :param ff_only: The ff_only of this MergeUpstreamRequest. # noqa: E501 + :type: bool + """ + + self._ff_only = ff_only + + 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(MergeUpstreamRequest, 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, MergeUpstreamRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MergeUpstreamRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/merge_upstream_response.py b/swagger_client/models/merge_upstream_response.py new file mode 100644 index 0000000..5a1a08c --- /dev/null +++ b/swagger_client/models/merge_upstream_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class MergeUpstreamResponse(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 = { + 'merge_type': 'str' + } + + attribute_map = { + 'merge_type': 'merge_type' + } + + def __init__(self, merge_type=None, _configuration=None): # noqa: E501 + """MergeUpstreamResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._merge_type = None + self.discriminator = None + + if merge_type is not None: + self.merge_type = merge_type + + @property + def merge_type(self): + """Gets the merge_type of this MergeUpstreamResponse. # noqa: E501 + + + :return: The merge_type of this MergeUpstreamResponse. # noqa: E501 + :rtype: str + """ + return self._merge_type + + @merge_type.setter + def merge_type(self, merge_type): + """Sets the merge_type of this MergeUpstreamResponse. + + + :param merge_type: The merge_type of this MergeUpstreamResponse. # noqa: E501 + :type: str + """ + + self._merge_type = merge_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(MergeUpstreamResponse, 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, MergeUpstreamResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MergeUpstreamResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/migrate_repo_options.py b/swagger_client/models/migrate_repo_options.py new file mode 100644 index 0000000..b0fc3c0 --- /dev/null +++ b/swagger_client/models/migrate_repo_options.py @@ -0,0 +1,682 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class MigrateRepoOptions(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 = { + 'auth_password': 'str', + 'auth_token': 'str', + 'auth_username': 'str', + 'aws_access_key_id': 'str', + 'aws_secret_access_key': 'str', + 'clone_addr': 'str', + 'description': 'str', + 'issues': 'bool', + 'labels': 'bool', + 'lfs': 'bool', + 'lfs_endpoint': 'str', + 'milestones': 'bool', + 'mirror': 'bool', + 'mirror_interval': 'str', + 'private': 'bool', + 'pull_requests': 'bool', + 'releases': 'bool', + 'repo_name': 'str', + 'repo_owner': 'str', + 'service': 'str', + 'uid': 'int', + 'wiki': 'bool' + } + + attribute_map = { + 'auth_password': 'auth_password', + 'auth_token': 'auth_token', + 'auth_username': 'auth_username', + 'aws_access_key_id': 'aws_access_key_id', + 'aws_secret_access_key': 'aws_secret_access_key', + 'clone_addr': 'clone_addr', + 'description': 'description', + 'issues': 'issues', + 'labels': 'labels', + 'lfs': 'lfs', + 'lfs_endpoint': 'lfs_endpoint', + 'milestones': 'milestones', + 'mirror': 'mirror', + 'mirror_interval': 'mirror_interval', + 'private': 'private', + 'pull_requests': 'pull_requests', + 'releases': 'releases', + 'repo_name': 'repo_name', + 'repo_owner': 'repo_owner', + 'service': 'service', + 'uid': 'uid', + 'wiki': 'wiki' + } + + def __init__(self, auth_password=None, auth_token=None, auth_username=None, aws_access_key_id=None, aws_secret_access_key=None, clone_addr=None, description=None, issues=None, labels=None, lfs=None, lfs_endpoint=None, milestones=None, mirror=None, mirror_interval=None, private=None, pull_requests=None, releases=None, repo_name=None, repo_owner=None, service=None, uid=None, wiki=None, _configuration=None): # noqa: E501 + """MigrateRepoOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._auth_password = None + self._auth_token = None + self._auth_username = None + self._aws_access_key_id = None + self._aws_secret_access_key = None + self._clone_addr = None + self._description = None + self._issues = None + self._labels = None + self._lfs = None + self._lfs_endpoint = None + self._milestones = None + self._mirror = None + self._mirror_interval = None + self._private = None + self._pull_requests = None + self._releases = None + self._repo_name = None + self._repo_owner = None + self._service = None + self._uid = None + self._wiki = None + self.discriminator = None + + if auth_password is not None: + self.auth_password = auth_password + if auth_token is not None: + self.auth_token = auth_token + if auth_username is not None: + self.auth_username = auth_username + if aws_access_key_id is not None: + self.aws_access_key_id = aws_access_key_id + if aws_secret_access_key is not None: + self.aws_secret_access_key = aws_secret_access_key + self.clone_addr = clone_addr + if description is not None: + self.description = description + if issues is not None: + self.issues = issues + if labels is not None: + self.labels = labels + if lfs is not None: + self.lfs = lfs + if lfs_endpoint is not None: + self.lfs_endpoint = lfs_endpoint + if milestones is not None: + self.milestones = milestones + if mirror is not None: + self.mirror = mirror + if mirror_interval is not None: + self.mirror_interval = mirror_interval + if private is not None: + self.private = private + if pull_requests is not None: + self.pull_requests = pull_requests + if releases is not None: + self.releases = releases + self.repo_name = repo_name + if repo_owner is not None: + self.repo_owner = repo_owner + if service is not None: + self.service = service + if uid is not None: + self.uid = uid + if wiki is not None: + self.wiki = wiki + + @property + def auth_password(self): + """Gets the auth_password of this MigrateRepoOptions. # noqa: E501 + + + :return: The auth_password of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._auth_password + + @auth_password.setter + def auth_password(self, auth_password): + """Sets the auth_password of this MigrateRepoOptions. + + + :param auth_password: The auth_password of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._auth_password = auth_password + + @property + def auth_token(self): + """Gets the auth_token of this MigrateRepoOptions. # noqa: E501 + + + :return: The auth_token of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._auth_token + + @auth_token.setter + def auth_token(self, auth_token): + """Sets the auth_token of this MigrateRepoOptions. + + + :param auth_token: The auth_token of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._auth_token = auth_token + + @property + def auth_username(self): + """Gets the auth_username of this MigrateRepoOptions. # noqa: E501 + + + :return: The auth_username of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._auth_username + + @auth_username.setter + def auth_username(self, auth_username): + """Sets the auth_username of this MigrateRepoOptions. + + + :param auth_username: The auth_username of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._auth_username = auth_username + + @property + def aws_access_key_id(self): + """Gets the aws_access_key_id of this MigrateRepoOptions. # noqa: E501 + + + :return: The aws_access_key_id of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._aws_access_key_id + + @aws_access_key_id.setter + def aws_access_key_id(self, aws_access_key_id): + """Sets the aws_access_key_id of this MigrateRepoOptions. + + + :param aws_access_key_id: The aws_access_key_id of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._aws_access_key_id = aws_access_key_id + + @property + def aws_secret_access_key(self): + """Gets the aws_secret_access_key of this MigrateRepoOptions. # noqa: E501 + + + :return: The aws_secret_access_key of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._aws_secret_access_key + + @aws_secret_access_key.setter + def aws_secret_access_key(self, aws_secret_access_key): + """Sets the aws_secret_access_key of this MigrateRepoOptions. + + + :param aws_secret_access_key: The aws_secret_access_key of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._aws_secret_access_key = aws_secret_access_key + + @property + def clone_addr(self): + """Gets the clone_addr of this MigrateRepoOptions. # noqa: E501 + + + :return: The clone_addr of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._clone_addr + + @clone_addr.setter + def clone_addr(self, clone_addr): + """Sets the clone_addr of this MigrateRepoOptions. + + + :param clone_addr: The clone_addr of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and clone_addr is None: + raise ValueError("Invalid value for `clone_addr`, must not be `None`") # noqa: E501 + + self._clone_addr = clone_addr + + @property + def description(self): + """Gets the description of this MigrateRepoOptions. # noqa: E501 + + + :return: The description of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this MigrateRepoOptions. + + + :param description: The description of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def issues(self): + """Gets the issues of this MigrateRepoOptions. # noqa: E501 + + + :return: The issues of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._issues + + @issues.setter + def issues(self, issues): + """Sets the issues of this MigrateRepoOptions. + + + :param issues: The issues of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._issues = issues + + @property + def labels(self): + """Gets the labels of this MigrateRepoOptions. # noqa: E501 + + + :return: The labels of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this MigrateRepoOptions. + + + :param labels: The labels of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._labels = labels + + @property + def lfs(self): + """Gets the lfs of this MigrateRepoOptions. # noqa: E501 + + + :return: The lfs of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._lfs + + @lfs.setter + def lfs(self, lfs): + """Sets the lfs of this MigrateRepoOptions. + + + :param lfs: The lfs of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._lfs = lfs + + @property + def lfs_endpoint(self): + """Gets the lfs_endpoint of this MigrateRepoOptions. # noqa: E501 + + + :return: The lfs_endpoint of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._lfs_endpoint + + @lfs_endpoint.setter + def lfs_endpoint(self, lfs_endpoint): + """Sets the lfs_endpoint of this MigrateRepoOptions. + + + :param lfs_endpoint: The lfs_endpoint of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._lfs_endpoint = lfs_endpoint + + @property + def milestones(self): + """Gets the milestones of this MigrateRepoOptions. # noqa: E501 + + + :return: The milestones of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._milestones + + @milestones.setter + def milestones(self, milestones): + """Sets the milestones of this MigrateRepoOptions. + + + :param milestones: The milestones of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._milestones = milestones + + @property + def mirror(self): + """Gets the mirror of this MigrateRepoOptions. # noqa: E501 + + + :return: The mirror of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._mirror + + @mirror.setter + def mirror(self, mirror): + """Sets the mirror of this MigrateRepoOptions. + + + :param mirror: The mirror of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._mirror = mirror + + @property + def mirror_interval(self): + """Gets the mirror_interval of this MigrateRepoOptions. # noqa: E501 + + + :return: The mirror_interval of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._mirror_interval + + @mirror_interval.setter + def mirror_interval(self, mirror_interval): + """Sets the mirror_interval of this MigrateRepoOptions. + + + :param mirror_interval: The mirror_interval of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._mirror_interval = mirror_interval + + @property + def private(self): + """Gets the private of this MigrateRepoOptions. # noqa: E501 + + + :return: The private of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this MigrateRepoOptions. + + + :param private: The private of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def pull_requests(self): + """Gets the pull_requests of this MigrateRepoOptions. # noqa: E501 + + + :return: The pull_requests of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._pull_requests + + @pull_requests.setter + def pull_requests(self, pull_requests): + """Sets the pull_requests of this MigrateRepoOptions. + + + :param pull_requests: The pull_requests of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._pull_requests = pull_requests + + @property + def releases(self): + """Gets the releases of this MigrateRepoOptions. # noqa: E501 + + + :return: The releases of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._releases + + @releases.setter + def releases(self, releases): + """Sets the releases of this MigrateRepoOptions. + + + :param releases: The releases of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._releases = releases + + @property + def repo_name(self): + """Gets the repo_name of this MigrateRepoOptions. # noqa: E501 + + + :return: The repo_name of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._repo_name + + @repo_name.setter + def repo_name(self, repo_name): + """Sets the repo_name of this MigrateRepoOptions. + + + :param repo_name: The repo_name of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and repo_name is None: + raise ValueError("Invalid value for `repo_name`, must not be `None`") # noqa: E501 + + self._repo_name = repo_name + + @property + def repo_owner(self): + """Gets the repo_owner of this MigrateRepoOptions. # noqa: E501 + + the organization's name or individual user's name who will own the migrated repository # noqa: E501 + + :return: The repo_owner of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._repo_owner + + @repo_owner.setter + def repo_owner(self, repo_owner): + """Sets the repo_owner of this MigrateRepoOptions. + + the organization's name or individual user's name who will own the migrated repository # noqa: E501 + + :param repo_owner: The repo_owner of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + + self._repo_owner = repo_owner + + @property + def service(self): + """Gets the service of this MigrateRepoOptions. # noqa: E501 + + + :return: The service of this MigrateRepoOptions. # noqa: E501 + :rtype: str + """ + return self._service + + @service.setter + def service(self, service): + """Sets the service of this MigrateRepoOptions. + + + :param service: The service of this MigrateRepoOptions. # noqa: E501 + :type: str + """ + allowed_values = ["git", "github", "gitea", "gitlab", "gogs", "onedev", "gitbucket", "codebase", "codecommit"] # noqa: E501 + if (self._configuration.client_side_validation and + service not in allowed_values): + raise ValueError( + "Invalid value for `service` ({0}), must be one of {1}" # noqa: E501 + .format(service, allowed_values) + ) + + self._service = service + + @property + def uid(self): + """Gets the uid of this MigrateRepoOptions. # noqa: E501 + + deprecated (only for backwards compatibility, use repo_owner instead) # noqa: E501 + + :return: The uid of this MigrateRepoOptions. # noqa: E501 + :rtype: int + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this MigrateRepoOptions. + + deprecated (only for backwards compatibility, use repo_owner instead) # noqa: E501 + + :param uid: The uid of this MigrateRepoOptions. # noqa: E501 + :type: int + """ + + self._uid = uid + + @property + def wiki(self): + """Gets the wiki of this MigrateRepoOptions. # noqa: E501 + + + :return: The wiki of this MigrateRepoOptions. # noqa: E501 + :rtype: bool + """ + return self._wiki + + @wiki.setter + def wiki(self, wiki): + """Sets the wiki of this MigrateRepoOptions. + + + :param wiki: The wiki of this MigrateRepoOptions. # noqa: E501 + :type: bool + """ + + self._wiki = wiki + + 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(MigrateRepoOptions, 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, MigrateRepoOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MigrateRepoOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/milestone.py b/swagger_client/models/milestone.py new file mode 100644 index 0000000..9b2613a --- /dev/null +++ b/swagger_client/models/milestone.py @@ -0,0 +1,367 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Milestone(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 = { + 'closed_at': 'datetime', + 'closed_issues': 'int', + 'created_at': 'datetime', + 'description': 'str', + 'due_on': 'datetime', + 'id': 'int', + 'open_issues': 'int', + 'state': 'StateType', + 'title': 'str', + 'updated_at': 'datetime' + } + + attribute_map = { + 'closed_at': 'closed_at', + 'closed_issues': 'closed_issues', + 'created_at': 'created_at', + 'description': 'description', + 'due_on': 'due_on', + 'id': 'id', + 'open_issues': 'open_issues', + 'state': 'state', + 'title': 'title', + 'updated_at': 'updated_at' + } + + def __init__(self, closed_at=None, closed_issues=None, created_at=None, description=None, due_on=None, id=None, open_issues=None, state=None, title=None, updated_at=None, _configuration=None): # noqa: E501 + """Milestone - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._closed_at = None + self._closed_issues = None + self._created_at = None + self._description = None + self._due_on = None + self._id = None + self._open_issues = None + self._state = None + self._title = None + self._updated_at = None + self.discriminator = None + + if closed_at is not None: + self.closed_at = closed_at + if closed_issues is not None: + self.closed_issues = closed_issues + if created_at is not None: + self.created_at = created_at + if description is not None: + self.description = description + if due_on is not None: + self.due_on = due_on + if id is not None: + self.id = id + if open_issues is not None: + self.open_issues = open_issues + if state is not None: + self.state = state + if title is not None: + self.title = title + if updated_at is not None: + self.updated_at = updated_at + + @property + def closed_at(self): + """Gets the closed_at of this Milestone. # noqa: E501 + + + :return: The closed_at of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._closed_at + + @closed_at.setter + def closed_at(self, closed_at): + """Sets the closed_at of this Milestone. + + + :param closed_at: The closed_at of this Milestone. # noqa: E501 + :type: datetime + """ + + self._closed_at = closed_at + + @property + def closed_issues(self): + """Gets the closed_issues of this Milestone. # noqa: E501 + + ClosedIssues is the number of closed issues in this milestone # noqa: E501 + + :return: The closed_issues of this Milestone. # noqa: E501 + :rtype: int + """ + return self._closed_issues + + @closed_issues.setter + def closed_issues(self, closed_issues): + """Sets the closed_issues of this Milestone. + + ClosedIssues is the number of closed issues in this milestone # noqa: E501 + + :param closed_issues: The closed_issues of this Milestone. # noqa: E501 + :type: int + """ + + self._closed_issues = closed_issues + + @property + def created_at(self): + """Gets the created_at of this Milestone. # noqa: E501 + + + :return: The created_at of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Milestone. + + + :param created_at: The created_at of this Milestone. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def description(self): + """Gets the description of this Milestone. # noqa: E501 + + Description provides details about the milestone # noqa: E501 + + :return: The description of this Milestone. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Milestone. + + Description provides details about the milestone # noqa: E501 + + :param description: The description of this Milestone. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def due_on(self): + """Gets the due_on of this Milestone. # noqa: E501 + + + :return: The due_on of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._due_on + + @due_on.setter + def due_on(self, due_on): + """Sets the due_on of this Milestone. + + + :param due_on: The due_on of this Milestone. # noqa: E501 + :type: datetime + """ + + self._due_on = due_on + + @property + def id(self): + """Gets the id of this Milestone. # noqa: E501 + + ID is the unique identifier for the milestone # noqa: E501 + + :return: The id of this Milestone. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Milestone. + + ID is the unique identifier for the milestone # noqa: E501 + + :param id: The id of this Milestone. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def open_issues(self): + """Gets the open_issues of this Milestone. # noqa: E501 + + OpenIssues is the number of open issues in this milestone # noqa: E501 + + :return: The open_issues of this Milestone. # noqa: E501 + :rtype: int + """ + return self._open_issues + + @open_issues.setter + def open_issues(self, open_issues): + """Sets the open_issues of this Milestone. + + OpenIssues is the number of open issues in this milestone # noqa: E501 + + :param open_issues: The open_issues of this Milestone. # noqa: E501 + :type: int + """ + + self._open_issues = open_issues + + @property + def state(self): + """Gets the state of this Milestone. # noqa: E501 + + + :return: The state of this Milestone. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this Milestone. + + + :param state: The state of this Milestone. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this Milestone. # noqa: E501 + + Title is the title of the milestone # noqa: E501 + + :return: The title of this Milestone. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this Milestone. + + Title is the title of the milestone # noqa: E501 + + :param title: The title of this Milestone. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def updated_at(self): + """Gets the updated_at of this Milestone. # noqa: E501 + + + :return: The updated_at of this Milestone. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Milestone. + + + :param updated_at: The updated_at of this Milestone. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_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(Milestone, 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, Milestone): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Milestone): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/new_issue_pins_allowed.py b/swagger_client/models/new_issue_pins_allowed.py new file mode 100644 index 0000000..eceb39c --- /dev/null +++ b/swagger_client/models/new_issue_pins_allowed.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NewIssuePinsAllowed(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 = { + 'issues': 'bool', + 'pull_requests': 'bool' + } + + attribute_map = { + 'issues': 'issues', + 'pull_requests': 'pull_requests' + } + + def __init__(self, issues=None, pull_requests=None, _configuration=None): # noqa: E501 + """NewIssuePinsAllowed - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._issues = None + self._pull_requests = None + self.discriminator = None + + if issues is not None: + self.issues = issues + if pull_requests is not None: + self.pull_requests = pull_requests + + @property + def issues(self): + """Gets the issues of this NewIssuePinsAllowed. # noqa: E501 + + + :return: The issues of this NewIssuePinsAllowed. # noqa: E501 + :rtype: bool + """ + return self._issues + + @issues.setter + def issues(self, issues): + """Sets the issues of this NewIssuePinsAllowed. + + + :param issues: The issues of this NewIssuePinsAllowed. # noqa: E501 + :type: bool + """ + + self._issues = issues + + @property + def pull_requests(self): + """Gets the pull_requests of this NewIssuePinsAllowed. # noqa: E501 + + + :return: The pull_requests of this NewIssuePinsAllowed. # noqa: E501 + :rtype: bool + """ + return self._pull_requests + + @pull_requests.setter + def pull_requests(self, pull_requests): + """Sets the pull_requests of this NewIssuePinsAllowed. + + + :param pull_requests: The pull_requests of this NewIssuePinsAllowed. # noqa: E501 + :type: bool + """ + + self._pull_requests = pull_requests + + 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(NewIssuePinsAllowed, 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, NewIssuePinsAllowed): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NewIssuePinsAllowed): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/node_info.py b/swagger_client/models/node_info.py new file mode 100644 index 0000000..6f95382 --- /dev/null +++ b/swagger_client/models/node_info.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NodeInfo(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 = { + 'metadata': 'object', + 'open_registrations': 'bool', + 'protocols': 'list[str]', + 'services': 'NodeInfoServices', + 'software': 'NodeInfoSoftware', + 'usage': 'NodeInfoUsage', + 'version': 'str' + } + + attribute_map = { + 'metadata': 'metadata', + 'open_registrations': 'openRegistrations', + 'protocols': 'protocols', + 'services': 'services', + 'software': 'software', + 'usage': 'usage', + 'version': 'version' + } + + def __init__(self, metadata=None, open_registrations=None, protocols=None, services=None, software=None, usage=None, version=None, _configuration=None): # noqa: E501 + """NodeInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._metadata = None + self._open_registrations = None + self._protocols = None + self._services = None + self._software = None + self._usage = None + self._version = None + self.discriminator = None + + if metadata is not None: + self.metadata = metadata + if open_registrations is not None: + self.open_registrations = open_registrations + if protocols is not None: + self.protocols = protocols + if services is not None: + self.services = services + if software is not None: + self.software = software + if usage is not None: + self.usage = usage + if version is not None: + self.version = version + + @property + def metadata(self): + """Gets the metadata of this NodeInfo. # noqa: E501 + + Metadata contains free form key value pairs for software specific values # noqa: E501 + + :return: The metadata of this NodeInfo. # noqa: E501 + :rtype: object + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this NodeInfo. + + Metadata contains free form key value pairs for software specific values # noqa: E501 + + :param metadata: The metadata of this NodeInfo. # noqa: E501 + :type: object + """ + + self._metadata = metadata + + @property + def open_registrations(self): + """Gets the open_registrations of this NodeInfo. # noqa: E501 + + OpenRegistrations indicates if new user registrations are accepted # noqa: E501 + + :return: The open_registrations of this NodeInfo. # noqa: E501 + :rtype: bool + """ + return self._open_registrations + + @open_registrations.setter + def open_registrations(self, open_registrations): + """Sets the open_registrations of this NodeInfo. + + OpenRegistrations indicates if new user registrations are accepted # noqa: E501 + + :param open_registrations: The open_registrations of this NodeInfo. # noqa: E501 + :type: bool + """ + + self._open_registrations = open_registrations + + @property + def protocols(self): + """Gets the protocols of this NodeInfo. # noqa: E501 + + Protocols lists the protocols supported by this server # noqa: E501 + + :return: The protocols of this NodeInfo. # noqa: E501 + :rtype: list[str] + """ + return self._protocols + + @protocols.setter + def protocols(self, protocols): + """Sets the protocols of this NodeInfo. + + Protocols lists the protocols supported by this server # noqa: E501 + + :param protocols: The protocols of this NodeInfo. # noqa: E501 + :type: list[str] + """ + + self._protocols = protocols + + @property + def services(self): + """Gets the services of this NodeInfo. # noqa: E501 + + + :return: The services of this NodeInfo. # noqa: E501 + :rtype: NodeInfoServices + """ + return self._services + + @services.setter + def services(self, services): + """Sets the services of this NodeInfo. + + + :param services: The services of this NodeInfo. # noqa: E501 + :type: NodeInfoServices + """ + + self._services = services + + @property + def software(self): + """Gets the software of this NodeInfo. # noqa: E501 + + + :return: The software of this NodeInfo. # noqa: E501 + :rtype: NodeInfoSoftware + """ + return self._software + + @software.setter + def software(self, software): + """Sets the software of this NodeInfo. + + + :param software: The software of this NodeInfo. # noqa: E501 + :type: NodeInfoSoftware + """ + + self._software = software + + @property + def usage(self): + """Gets the usage of this NodeInfo. # noqa: E501 + + + :return: The usage of this NodeInfo. # noqa: E501 + :rtype: NodeInfoUsage + """ + return self._usage + + @usage.setter + def usage(self, usage): + """Sets the usage of this NodeInfo. + + + :param usage: The usage of this NodeInfo. # noqa: E501 + :type: NodeInfoUsage + """ + + self._usage = usage + + @property + def version(self): + """Gets the version of this NodeInfo. # noqa: E501 + + Version specifies the schema version # noqa: E501 + + :return: The version of this NodeInfo. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this NodeInfo. + + Version specifies the schema version # noqa: E501 + + :param version: The version of this NodeInfo. # 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(NodeInfo, 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, NodeInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/node_info_services.py b/swagger_client/models/node_info_services.py new file mode 100644 index 0000000..db27b77 --- /dev/null +++ b/swagger_client/models/node_info_services.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NodeInfoServices(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 = { + 'inbound': 'list[str]', + 'outbound': 'list[str]' + } + + attribute_map = { + 'inbound': 'inbound', + 'outbound': 'outbound' + } + + def __init__(self, inbound=None, outbound=None, _configuration=None): # noqa: E501 + """NodeInfoServices - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._inbound = None + self._outbound = None + self.discriminator = None + + if inbound is not None: + self.inbound = inbound + if outbound is not None: + self.outbound = outbound + + @property + def inbound(self): + """Gets the inbound of this NodeInfoServices. # noqa: E501 + + Inbound lists services that can deliver content to this server # noqa: E501 + + :return: The inbound of this NodeInfoServices. # noqa: E501 + :rtype: list[str] + """ + return self._inbound + + @inbound.setter + def inbound(self, inbound): + """Sets the inbound of this NodeInfoServices. + + Inbound lists services that can deliver content to this server # noqa: E501 + + :param inbound: The inbound of this NodeInfoServices. # noqa: E501 + :type: list[str] + """ + + self._inbound = inbound + + @property + def outbound(self): + """Gets the outbound of this NodeInfoServices. # noqa: E501 + + Outbound lists services this server can deliver content to # noqa: E501 + + :return: The outbound of this NodeInfoServices. # noqa: E501 + :rtype: list[str] + """ + return self._outbound + + @outbound.setter + def outbound(self, outbound): + """Sets the outbound of this NodeInfoServices. + + Outbound lists services this server can deliver content to # noqa: E501 + + :param outbound: The outbound of this NodeInfoServices. # noqa: E501 + :type: list[str] + """ + + self._outbound = outbound + + 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(NodeInfoServices, 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, NodeInfoServices): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfoServices): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/node_info_software.py b/swagger_client/models/node_info_software.py new file mode 100644 index 0000000..735ef27 --- /dev/null +++ b/swagger_client/models/node_info_software.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NodeInfoSoftware(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 = { + 'homepage': 'str', + 'name': 'str', + 'repository': 'str', + 'version': 'str' + } + + attribute_map = { + 'homepage': 'homepage', + 'name': 'name', + 'repository': 'repository', + 'version': 'version' + } + + def __init__(self, homepage=None, name=None, repository=None, version=None, _configuration=None): # noqa: E501 + """NodeInfoSoftware - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._homepage = None + self._name = None + self._repository = None + self._version = None + self.discriminator = None + + if homepage is not None: + self.homepage = homepage + if name is not None: + self.name = name + if repository is not None: + self.repository = repository + if version is not None: + self.version = version + + @property + def homepage(self): + """Gets the homepage of this NodeInfoSoftware. # noqa: E501 + + Homepage is the URL to the homepage of this server software # noqa: E501 + + :return: The homepage of this NodeInfoSoftware. # noqa: E501 + :rtype: str + """ + return self._homepage + + @homepage.setter + def homepage(self, homepage): + """Sets the homepage of this NodeInfoSoftware. + + Homepage is the URL to the homepage of this server software # noqa: E501 + + :param homepage: The homepage of this NodeInfoSoftware. # noqa: E501 + :type: str + """ + + self._homepage = homepage + + @property + def name(self): + """Gets the name of this NodeInfoSoftware. # noqa: E501 + + Name is the canonical name of this server software # noqa: E501 + + :return: The name of this NodeInfoSoftware. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NodeInfoSoftware. + + Name is the canonical name of this server software # noqa: E501 + + :param name: The name of this NodeInfoSoftware. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def repository(self): + """Gets the repository of this NodeInfoSoftware. # noqa: E501 + + Repository is the URL to the source code repository # noqa: E501 + + :return: The repository of this NodeInfoSoftware. # noqa: E501 + :rtype: str + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this NodeInfoSoftware. + + Repository is the URL to the source code repository # noqa: E501 + + :param repository: The repository of this NodeInfoSoftware. # noqa: E501 + :type: str + """ + + self._repository = repository + + @property + def version(self): + """Gets the version of this NodeInfoSoftware. # noqa: E501 + + Version is the version of this server software # noqa: E501 + + :return: The version of this NodeInfoSoftware. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this NodeInfoSoftware. + + Version is the version of this server software # noqa: E501 + + :param version: The version of this NodeInfoSoftware. # 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(NodeInfoSoftware, 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, NodeInfoSoftware): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfoSoftware): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/node_info_usage.py b/swagger_client/models/node_info_usage.py new file mode 100644 index 0000000..4f2c4fb --- /dev/null +++ b/swagger_client/models/node_info_usage.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NodeInfoUsage(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 = { + 'local_comments': 'int', + 'local_posts': 'int', + 'users': 'NodeInfoUsageUsers' + } + + attribute_map = { + 'local_comments': 'localComments', + 'local_posts': 'localPosts', + 'users': 'users' + } + + def __init__(self, local_comments=None, local_posts=None, users=None, _configuration=None): # noqa: E501 + """NodeInfoUsage - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._local_comments = None + self._local_posts = None + self._users = None + self.discriminator = None + + if local_comments is not None: + self.local_comments = local_comments + if local_posts is not None: + self.local_posts = local_posts + if users is not None: + self.users = users + + @property + def local_comments(self): + """Gets the local_comments of this NodeInfoUsage. # noqa: E501 + + LocalComments is the total amount of comments made by users local to this server # noqa: E501 + + :return: The local_comments of this NodeInfoUsage. # noqa: E501 + :rtype: int + """ + return self._local_comments + + @local_comments.setter + def local_comments(self, local_comments): + """Sets the local_comments of this NodeInfoUsage. + + LocalComments is the total amount of comments made by users local to this server # noqa: E501 + + :param local_comments: The local_comments of this NodeInfoUsage. # noqa: E501 + :type: int + """ + + self._local_comments = local_comments + + @property + def local_posts(self): + """Gets the local_posts of this NodeInfoUsage. # noqa: E501 + + LocalPosts is the total amount of posts made by users local to this server # noqa: E501 + + :return: The local_posts of this NodeInfoUsage. # noqa: E501 + :rtype: int + """ + return self._local_posts + + @local_posts.setter + def local_posts(self, local_posts): + """Sets the local_posts of this NodeInfoUsage. + + LocalPosts is the total amount of posts made by users local to this server # noqa: E501 + + :param local_posts: The local_posts of this NodeInfoUsage. # noqa: E501 + :type: int + """ + + self._local_posts = local_posts + + @property + def users(self): + """Gets the users of this NodeInfoUsage. # noqa: E501 + + + :return: The users of this NodeInfoUsage. # noqa: E501 + :rtype: NodeInfoUsageUsers + """ + return self._users + + @users.setter + def users(self, users): + """Sets the users of this NodeInfoUsage. + + + :param users: The users of this NodeInfoUsage. # noqa: E501 + :type: NodeInfoUsageUsers + """ + + 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(NodeInfoUsage, 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, NodeInfoUsage): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfoUsage): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/node_info_usage_users.py b/swagger_client/models/node_info_usage_users.py new file mode 100644 index 0000000..72c9974 --- /dev/null +++ b/swagger_client/models/node_info_usage_users.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NodeInfoUsageUsers(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 = { + 'active_halfyear': 'int', + 'active_month': 'int', + 'total': 'int' + } + + attribute_map = { + 'active_halfyear': 'activeHalfyear', + 'active_month': 'activeMonth', + 'total': 'total' + } + + def __init__(self, active_halfyear=None, active_month=None, total=None, _configuration=None): # noqa: E501 + """NodeInfoUsageUsers - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active_halfyear = None + self._active_month = None + self._total = None + self.discriminator = None + + if active_halfyear is not None: + self.active_halfyear = active_halfyear + if active_month is not None: + self.active_month = active_month + if total is not None: + self.total = total + + @property + def active_halfyear(self): + """Gets the active_halfyear of this NodeInfoUsageUsers. # noqa: E501 + + ActiveHalfyear is the amount of users that signed in at least once in the last 180 days # noqa: E501 + + :return: The active_halfyear of this NodeInfoUsageUsers. # noqa: E501 + :rtype: int + """ + return self._active_halfyear + + @active_halfyear.setter + def active_halfyear(self, active_halfyear): + """Sets the active_halfyear of this NodeInfoUsageUsers. + + ActiveHalfyear is the amount of users that signed in at least once in the last 180 days # noqa: E501 + + :param active_halfyear: The active_halfyear of this NodeInfoUsageUsers. # noqa: E501 + :type: int + """ + + self._active_halfyear = active_halfyear + + @property + def active_month(self): + """Gets the active_month of this NodeInfoUsageUsers. # noqa: E501 + + ActiveMonth is the amount of users that signed in at least once in the last 30 days # noqa: E501 + + :return: The active_month of this NodeInfoUsageUsers. # noqa: E501 + :rtype: int + """ + return self._active_month + + @active_month.setter + def active_month(self, active_month): + """Sets the active_month of this NodeInfoUsageUsers. + + ActiveMonth is the amount of users that signed in at least once in the last 30 days # noqa: E501 + + :param active_month: The active_month of this NodeInfoUsageUsers. # noqa: E501 + :type: int + """ + + self._active_month = active_month + + @property + def total(self): + """Gets the total of this NodeInfoUsageUsers. # noqa: E501 + + Total is the total amount of users on this server # noqa: E501 + + :return: The total of this NodeInfoUsageUsers. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this NodeInfoUsageUsers. + + Total is the total amount of users on this server # noqa: E501 + + :param total: The total of this NodeInfoUsageUsers. # noqa: E501 + :type: int + """ + + self._total = total + + 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(NodeInfoUsageUsers, 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, NodeInfoUsageUsers): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NodeInfoUsageUsers): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/note.py b/swagger_client/models/note.py new file mode 100644 index 0000000..da67707 --- /dev/null +++ b/swagger_client/models/note.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Note(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 = { + 'commit': 'Commit', + 'message': 'str' + } + + attribute_map = { + 'commit': 'commit', + 'message': 'message' + } + + def __init__(self, commit=None, message=None, _configuration=None): # noqa: E501 + """Note - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._message = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if message is not None: + self.message = message + + @property + def commit(self): + """Gets the commit of this Note. # noqa: E501 + + + :return: The commit of this Note. # noqa: E501 + :rtype: Commit + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Note. + + + :param commit: The commit of this Note. # noqa: E501 + :type: Commit + """ + + self._commit = commit + + @property + def message(self): + """Gets the message of this Note. # noqa: E501 + + The content message of the git note # noqa: E501 + + :return: The message of this Note. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Note. + + The content message of the git note # noqa: E501 + + :param message: The message of this Note. # noqa: E501 + :type: str + """ + + self._message = message + + 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(Note, 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, Note): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Note): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/notification_count.py b/swagger_client/models/notification_count.py new file mode 100644 index 0000000..d2354ef --- /dev/null +++ b/swagger_client/models/notification_count.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NotificationCount(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 = { + 'new': 'int' + } + + attribute_map = { + 'new': 'new' + } + + def __init__(self, new=None, _configuration=None): # noqa: E501 + """NotificationCount - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._new = None + self.discriminator = None + + if new is not None: + self.new = new + + @property + def new(self): + """Gets the new of this NotificationCount. # noqa: E501 + + New is the number of unread notifications # noqa: E501 + + :return: The new of this NotificationCount. # noqa: E501 + :rtype: int + """ + return self._new + + @new.setter + def new(self, new): + """Sets the new of this NotificationCount. + + New is the number of unread notifications # noqa: E501 + + :param new: The new of this NotificationCount. # noqa: E501 + :type: int + """ + + self._new = new + + 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(NotificationCount, 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, NotificationCount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NotificationCount): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/notification_subject.py b/swagger_client/models/notification_subject.py new file mode 100644 index 0000000..266fbbd --- /dev/null +++ b/swagger_client/models/notification_subject.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NotificationSubject(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 = { + 'html_url': 'str', + 'latest_comment_html_url': 'str', + 'latest_comment_url': 'str', + 'state': 'StateType', + 'title': 'str', + 'type': 'NotifySubjectType', + 'url': 'str' + } + + attribute_map = { + 'html_url': 'html_url', + 'latest_comment_html_url': 'latest_comment_html_url', + 'latest_comment_url': 'latest_comment_url', + 'state': 'state', + 'title': 'title', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, html_url=None, latest_comment_html_url=None, latest_comment_url=None, state=None, title=None, type=None, url=None, _configuration=None): # noqa: E501 + """NotificationSubject - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._html_url = None + self._latest_comment_html_url = None + self._latest_comment_url = None + self._state = None + self._title = None + self._type = None + self._url = None + self.discriminator = None + + if html_url is not None: + self.html_url = html_url + if latest_comment_html_url is not None: + self.latest_comment_html_url = latest_comment_html_url + if latest_comment_url is not None: + self.latest_comment_url = latest_comment_url + if state is not None: + self.state = state + if title is not None: + self.title = title + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def html_url(self): + """Gets the html_url of this NotificationSubject. # noqa: E501 + + HTMLURL is the web URL for the notification subject # noqa: E501 + + :return: The html_url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this NotificationSubject. + + HTMLURL is the web URL for the notification subject # noqa: E501 + + :param html_url: The html_url of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def latest_comment_html_url(self): + """Gets the latest_comment_html_url of this NotificationSubject. # noqa: E501 + + LatestCommentHTMLURL is the web URL for the latest comment # noqa: E501 + + :return: The latest_comment_html_url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._latest_comment_html_url + + @latest_comment_html_url.setter + def latest_comment_html_url(self, latest_comment_html_url): + """Sets the latest_comment_html_url of this NotificationSubject. + + LatestCommentHTMLURL is the web URL for the latest comment # noqa: E501 + + :param latest_comment_html_url: The latest_comment_html_url of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._latest_comment_html_url = latest_comment_html_url + + @property + def latest_comment_url(self): + """Gets the latest_comment_url of this NotificationSubject. # noqa: E501 + + LatestCommentURL is the API URL for the latest comment # noqa: E501 + + :return: The latest_comment_url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._latest_comment_url + + @latest_comment_url.setter + def latest_comment_url(self, latest_comment_url): + """Sets the latest_comment_url of this NotificationSubject. + + LatestCommentURL is the API URL for the latest comment # noqa: E501 + + :param latest_comment_url: The latest_comment_url of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._latest_comment_url = latest_comment_url + + @property + def state(self): + """Gets the state of this NotificationSubject. # noqa: E501 + + + :return: The state of this NotificationSubject. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this NotificationSubject. + + + :param state: The state of this NotificationSubject. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this NotificationSubject. # noqa: E501 + + Title is the title of the notification subject # noqa: E501 + + :return: The title of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this NotificationSubject. + + Title is the title of the notification subject # noqa: E501 + + :param title: The title of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def type(self): + """Gets the type of this NotificationSubject. # noqa: E501 + + + :return: The type of this NotificationSubject. # noqa: E501 + :rtype: NotifySubjectType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this NotificationSubject. + + + :param type: The type of this NotificationSubject. # noqa: E501 + :type: NotifySubjectType + """ + + self._type = type + + @property + def url(self): + """Gets the url of this NotificationSubject. # noqa: E501 + + URL is the API URL for the notification subject # noqa: E501 + + :return: The url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this NotificationSubject. + + URL is the API URL for the notification subject # noqa: E501 + + :param url: The url of this NotificationSubject. # 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(NotificationSubject, 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, NotificationSubject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NotificationSubject): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/notification_thread.py b/swagger_client/models/notification_thread.py new file mode 100644 index 0000000..4224a38 --- /dev/null +++ b/swagger_client/models/notification_thread.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NotificationThread(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', + 'pinned': 'bool', + 'repository': 'Repository', + 'subject': 'NotificationSubject', + 'unread': 'bool', + 'updated_at': 'datetime', + 'url': 'str' + } + + attribute_map = { + 'id': 'id', + 'pinned': 'pinned', + 'repository': 'repository', + 'subject': 'subject', + 'unread': 'unread', + 'updated_at': 'updated_at', + 'url': 'url' + } + + def __init__(self, id=None, pinned=None, repository=None, subject=None, unread=None, updated_at=None, url=None, _configuration=None): # noqa: E501 + """NotificationThread - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._pinned = None + self._repository = None + self._subject = None + self._unread = None + self._updated_at = None + self._url = None + self.discriminator = None + + if id is not None: + self.id = id + if pinned is not None: + self.pinned = pinned + if repository is not None: + self.repository = repository + if subject is not None: + self.subject = subject + if unread is not None: + self.unread = unread + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + + @property + def id(self): + """Gets the id of this NotificationThread. # noqa: E501 + + ID is the unique identifier for the notification thread # noqa: E501 + + :return: The id of this NotificationThread. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationThread. + + ID is the unique identifier for the notification thread # noqa: E501 + + :param id: The id of this NotificationThread. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def pinned(self): + """Gets the pinned of this NotificationThread. # noqa: E501 + + Pinned indicates if the notification is pinned # noqa: E501 + + :return: The pinned of this NotificationThread. # noqa: E501 + :rtype: bool + """ + return self._pinned + + @pinned.setter + def pinned(self, pinned): + """Sets the pinned of this NotificationThread. + + Pinned indicates if the notification is pinned # noqa: E501 + + :param pinned: The pinned of this NotificationThread. # noqa: E501 + :type: bool + """ + + self._pinned = pinned + + @property + def repository(self): + """Gets the repository of this NotificationThread. # noqa: E501 + + + :return: The repository of this NotificationThread. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this NotificationThread. + + + :param repository: The repository of this NotificationThread. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def subject(self): + """Gets the subject of this NotificationThread. # noqa: E501 + + + :return: The subject of this NotificationThread. # noqa: E501 + :rtype: NotificationSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this NotificationThread. + + + :param subject: The subject of this NotificationThread. # noqa: E501 + :type: NotificationSubject + """ + + self._subject = subject + + @property + def unread(self): + """Gets the unread of this NotificationThread. # noqa: E501 + + Unread indicates if the notification has been read # noqa: E501 + + :return: The unread of this NotificationThread. # noqa: E501 + :rtype: bool + """ + return self._unread + + @unread.setter + def unread(self, unread): + """Sets the unread of this NotificationThread. + + Unread indicates if the notification has been read # noqa: E501 + + :param unread: The unread of this NotificationThread. # noqa: E501 + :type: bool + """ + + self._unread = unread + + @property + def updated_at(self): + """Gets the updated_at of this NotificationThread. # noqa: E501 + + UpdatedAt is the time when the notification was last updated # noqa: E501 + + :return: The updated_at of this NotificationThread. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this NotificationThread. + + UpdatedAt is the time when the notification was last updated # noqa: E501 + + :param updated_at: The updated_at of this NotificationThread. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this NotificationThread. # noqa: E501 + + URL is the API URL for this notification thread # noqa: E501 + + :return: The url of this NotificationThread. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this NotificationThread. + + URL is the API URL for this notification thread # noqa: E501 + + :param url: The url of this NotificationThread. # 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(NotificationThread, 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, NotificationThread): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NotificationThread): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/notify_subject_type.py b/swagger_client/models/notify_subject_type.py new file mode 100644 index 0000000..54b361b --- /dev/null +++ b/swagger_client/models/notify_subject_type.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class NotifySubjectType(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, _configuration=None): # noqa: E501 + """NotifySubjectType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(NotifySubjectType, 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, NotifySubjectType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NotifySubjectType): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/o_auth2_application.py b/swagger_client/models/o_auth2_application.py new file mode 100644 index 0000000..2e795b1 --- /dev/null +++ b/swagger_client/models/o_auth2_application.py @@ -0,0 +1,321 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class OAuth2Application(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 = { + 'client_id': 'str', + 'client_secret': 'str', + 'confidential_client': 'bool', + 'created': 'datetime', + 'id': 'int', + 'name': 'str', + 'redirect_uris': 'list[str]', + 'skip_secondary_authorization': 'bool' + } + + attribute_map = { + 'client_id': 'client_id', + 'client_secret': 'client_secret', + 'confidential_client': 'confidential_client', + 'created': 'created', + 'id': 'id', + 'name': 'name', + 'redirect_uris': 'redirect_uris', + 'skip_secondary_authorization': 'skip_secondary_authorization' + } + + def __init__(self, client_id=None, client_secret=None, confidential_client=None, created=None, id=None, name=None, redirect_uris=None, skip_secondary_authorization=None, _configuration=None): # noqa: E501 + """OAuth2Application - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._client_id = None + self._client_secret = None + self._confidential_client = None + self._created = None + self._id = None + self._name = None + self._redirect_uris = None + self._skip_secondary_authorization = None + self.discriminator = None + + if client_id is not None: + self.client_id = client_id + if client_secret is not None: + self.client_secret = client_secret + if confidential_client is not None: + self.confidential_client = confidential_client + if created is not None: + self.created = created + if id is not None: + self.id = id + if name is not None: + self.name = name + if redirect_uris is not None: + self.redirect_uris = redirect_uris + if skip_secondary_authorization is not None: + self.skip_secondary_authorization = skip_secondary_authorization + + @property + def client_id(self): + """Gets the client_id of this OAuth2Application. # noqa: E501 + + The client ID of the OAuth2 application # noqa: E501 + + :return: The client_id of this OAuth2Application. # noqa: E501 + :rtype: str + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """Sets the client_id of this OAuth2Application. + + The client ID of the OAuth2 application # noqa: E501 + + :param client_id: The client_id of this OAuth2Application. # noqa: E501 + :type: str + """ + + self._client_id = client_id + + @property + def client_secret(self): + """Gets the client_secret of this OAuth2Application. # noqa: E501 + + The client secret of the OAuth2 application # noqa: E501 + + :return: The client_secret of this OAuth2Application. # noqa: E501 + :rtype: str + """ + return self._client_secret + + @client_secret.setter + def client_secret(self, client_secret): + """Sets the client_secret of this OAuth2Application. + + The client secret of the OAuth2 application # noqa: E501 + + :param client_secret: The client_secret of this OAuth2Application. # noqa: E501 + :type: str + """ + + self._client_secret = client_secret + + @property + def confidential_client(self): + """Gets the confidential_client of this OAuth2Application. # noqa: E501 + + Whether the client is confidential # noqa: E501 + + :return: The confidential_client of this OAuth2Application. # noqa: E501 + :rtype: bool + """ + return self._confidential_client + + @confidential_client.setter + def confidential_client(self, confidential_client): + """Sets the confidential_client of this OAuth2Application. + + Whether the client is confidential # noqa: E501 + + :param confidential_client: The confidential_client of this OAuth2Application. # noqa: E501 + :type: bool + """ + + self._confidential_client = confidential_client + + @property + def created(self): + """Gets the created of this OAuth2Application. # noqa: E501 + + The timestamp when the application was created # noqa: E501 + + :return: The created of this OAuth2Application. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this OAuth2Application. + + The timestamp when the application was created # noqa: E501 + + :param created: The created of this OAuth2Application. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this OAuth2Application. # noqa: E501 + + The unique identifier of the OAuth2 application # noqa: E501 + + :return: The id of this OAuth2Application. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OAuth2Application. + + The unique identifier of the OAuth2 application # noqa: E501 + + :param id: The id of this OAuth2Application. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this OAuth2Application. # noqa: E501 + + The name of the OAuth2 application # noqa: E501 + + :return: The name of this OAuth2Application. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OAuth2Application. + + The name of the OAuth2 application # noqa: E501 + + :param name: The name of this OAuth2Application. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def redirect_uris(self): + """Gets the redirect_uris of this OAuth2Application. # noqa: E501 + + The list of allowed redirect URIs # noqa: E501 + + :return: The redirect_uris of this OAuth2Application. # noqa: E501 + :rtype: list[str] + """ + return self._redirect_uris + + @redirect_uris.setter + def redirect_uris(self, redirect_uris): + """Sets the redirect_uris of this OAuth2Application. + + The list of allowed redirect URIs # noqa: E501 + + :param redirect_uris: The redirect_uris of this OAuth2Application. # noqa: E501 + :type: list[str] + """ + + self._redirect_uris = redirect_uris + + @property + def skip_secondary_authorization(self): + """Gets the skip_secondary_authorization of this OAuth2Application. # noqa: E501 + + Whether to skip secondary authorization # noqa: E501 + + :return: The skip_secondary_authorization of this OAuth2Application. # noqa: E501 + :rtype: bool + """ + return self._skip_secondary_authorization + + @skip_secondary_authorization.setter + def skip_secondary_authorization(self, skip_secondary_authorization): + """Sets the skip_secondary_authorization of this OAuth2Application. + + Whether to skip secondary authorization # noqa: E501 + + :param skip_secondary_authorization: The skip_secondary_authorization of this OAuth2Application. # noqa: E501 + :type: bool + """ + + self._skip_secondary_authorization = skip_secondary_authorization + + 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(OAuth2Application, 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, OAuth2Application): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OAuth2Application): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/organization.py b/swagger_client/models/organization.py new file mode 100644 index 0000000..c8bb653 --- /dev/null +++ b/swagger_client/models/organization.py @@ -0,0 +1,405 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Organization(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 = { + 'avatar_url': 'str', + 'description': 'str', + 'email': 'str', + 'full_name': 'str', + 'id': 'int', + 'location': 'str', + 'name': 'str', + 'repo_admin_change_team_access': 'bool', + 'username': 'str', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'avatar_url': 'avatar_url', + 'description': 'description', + 'email': 'email', + 'full_name': 'full_name', + 'id': 'id', + 'location': 'location', + 'name': 'name', + 'repo_admin_change_team_access': 'repo_admin_change_team_access', + 'username': 'username', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, avatar_url=None, description=None, email=None, full_name=None, id=None, location=None, name=None, repo_admin_change_team_access=None, username=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """Organization - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._avatar_url = None + self._description = None + self._email = None + self._full_name = None + self._id = None + self._location = None + self._name = None + self._repo_admin_change_team_access = None + self._username = None + self._visibility = None + self._website = None + self.discriminator = None + + if avatar_url is not None: + self.avatar_url = avatar_url + if description is not None: + self.description = description + if email is not None: + self.email = email + if full_name is not None: + self.full_name = full_name + if id is not None: + self.id = id + if location is not None: + self.location = location + if name is not None: + self.name = name + if repo_admin_change_team_access is not None: + self.repo_admin_change_team_access = repo_admin_change_team_access + if username is not None: + self.username = username + if visibility is not None: + self.visibility = visibility + if website is not None: + self.website = website + + @property + def avatar_url(self): + """Gets the avatar_url of this Organization. # noqa: E501 + + The URL of the organization's avatar # noqa: E501 + + :return: The avatar_url of this Organization. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this Organization. + + The URL of the organization's avatar # noqa: E501 + + :param avatar_url: The avatar_url of this Organization. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def description(self): + """Gets the description of this Organization. # noqa: E501 + + The description of the organization # noqa: E501 + + :return: The description of this Organization. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Organization. + + The description of the organization # noqa: E501 + + :param description: The description of this Organization. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def email(self): + """Gets the email of this Organization. # noqa: E501 + + The email address of the organization # noqa: E501 + + :return: The email of this Organization. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Organization. + + The email address of the organization # noqa: E501 + + :param email: The email of this Organization. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def full_name(self): + """Gets the full_name of this Organization. # noqa: E501 + + The full display name of the organization # noqa: E501 + + :return: The full_name of this Organization. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this Organization. + + The full display name of the organization # noqa: E501 + + :param full_name: The full_name of this Organization. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def id(self): + """Gets the id of this Organization. # noqa: E501 + + The unique identifier of the organization # noqa: E501 + + :return: The id of this Organization. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Organization. + + The unique identifier of the organization # noqa: E501 + + :param id: The id of this Organization. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def location(self): + """Gets the location of this Organization. # noqa: E501 + + The location of the organization # noqa: E501 + + :return: The location of this Organization. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this Organization. + + The location of the organization # noqa: E501 + + :param location: The location of this Organization. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def name(self): + """Gets the name of this Organization. # noqa: E501 + + The name of the organization # noqa: E501 + + :return: The name of this Organization. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Organization. + + The name of the organization # noqa: E501 + + :param name: The name of this Organization. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def repo_admin_change_team_access(self): + """Gets the repo_admin_change_team_access of this Organization. # noqa: E501 + + Whether repository administrators can change team access # noqa: E501 + + :return: The repo_admin_change_team_access of this Organization. # noqa: E501 + :rtype: bool + """ + return self._repo_admin_change_team_access + + @repo_admin_change_team_access.setter + def repo_admin_change_team_access(self, repo_admin_change_team_access): + """Sets the repo_admin_change_team_access of this Organization. + + Whether repository administrators can change team access # noqa: E501 + + :param repo_admin_change_team_access: The repo_admin_change_team_access of this Organization. # noqa: E501 + :type: bool + """ + + self._repo_admin_change_team_access = repo_admin_change_team_access + + @property + def username(self): + """Gets the username of this Organization. # noqa: E501 + + username of the organization deprecated # noqa: E501 + + :return: The username of this Organization. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this Organization. + + username of the organization deprecated # noqa: E501 + + :param username: The username of this Organization. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def visibility(self): + """Gets the visibility of this Organization. # noqa: E501 + + The visibility level of the organization (public, limited, private) # noqa: E501 + + :return: The visibility of this Organization. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this Organization. + + The visibility level of the organization (public, limited, private) # noqa: E501 + + :param visibility: The visibility of this Organization. # noqa: E501 + :type: str + """ + + self._visibility = visibility + + @property + def website(self): + """Gets the website of this Organization. # noqa: E501 + + The website URL of the organization # noqa: E501 + + :return: The website of this Organization. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this Organization. + + The website URL of the organization # noqa: E501 + + :param website: The website of this Organization. # noqa: E501 + :type: str + """ + + self._website = website + + 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(Organization, 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, Organization): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Organization): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/organization_permissions.py b/swagger_client/models/organization_permissions.py new file mode 100644 index 0000000..17bb0d4 --- /dev/null +++ b/swagger_client/models/organization_permissions.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class OrganizationPermissions(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 = { + 'can_create_repository': 'bool', + 'can_read': 'bool', + 'can_write': 'bool', + 'is_admin': 'bool', + 'is_owner': 'bool' + } + + attribute_map = { + 'can_create_repository': 'can_create_repository', + 'can_read': 'can_read', + 'can_write': 'can_write', + 'is_admin': 'is_admin', + 'is_owner': 'is_owner' + } + + def __init__(self, can_create_repository=None, can_read=None, can_write=None, is_admin=None, is_owner=None, _configuration=None): # noqa: E501 + """OrganizationPermissions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._can_create_repository = None + self._can_read = None + self._can_write = None + self._is_admin = None + self._is_owner = None + self.discriminator = None + + if can_create_repository is not None: + self.can_create_repository = can_create_repository + if can_read is not None: + self.can_read = can_read + if can_write is not None: + self.can_write = can_write + if is_admin is not None: + self.is_admin = is_admin + if is_owner is not None: + self.is_owner = is_owner + + @property + def can_create_repository(self): + """Gets the can_create_repository of this OrganizationPermissions. # noqa: E501 + + Whether the user can create repositories in the organization # noqa: E501 + + :return: The can_create_repository of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._can_create_repository + + @can_create_repository.setter + def can_create_repository(self, can_create_repository): + """Sets the can_create_repository of this OrganizationPermissions. + + Whether the user can create repositories in the organization # noqa: E501 + + :param can_create_repository: The can_create_repository of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._can_create_repository = can_create_repository + + @property + def can_read(self): + """Gets the can_read of this OrganizationPermissions. # noqa: E501 + + Whether the user can read the organization # noqa: E501 + + :return: The can_read of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._can_read + + @can_read.setter + def can_read(self, can_read): + """Sets the can_read of this OrganizationPermissions. + + Whether the user can read the organization # noqa: E501 + + :param can_read: The can_read of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._can_read = can_read + + @property + def can_write(self): + """Gets the can_write of this OrganizationPermissions. # noqa: E501 + + Whether the user can write to the organization # noqa: E501 + + :return: The can_write of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._can_write + + @can_write.setter + def can_write(self, can_write): + """Sets the can_write of this OrganizationPermissions. + + Whether the user can write to the organization # noqa: E501 + + :param can_write: The can_write of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._can_write = can_write + + @property + def is_admin(self): + """Gets the is_admin of this OrganizationPermissions. # noqa: E501 + + Whether the user is an admin of the organization # noqa: E501 + + :return: The is_admin of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._is_admin + + @is_admin.setter + def is_admin(self, is_admin): + """Sets the is_admin of this OrganizationPermissions. + + Whether the user is an admin of the organization # noqa: E501 + + :param is_admin: The is_admin of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._is_admin = is_admin + + @property + def is_owner(self): + """Gets the is_owner of this OrganizationPermissions. # noqa: E501 + + Whether the user is an owner of the organization # noqa: E501 + + :return: The is_owner of this OrganizationPermissions. # noqa: E501 + :rtype: bool + """ + return self._is_owner + + @is_owner.setter + def is_owner(self, is_owner): + """Sets the is_owner of this OrganizationPermissions. + + Whether the user is an owner of the organization # noqa: E501 + + :param is_owner: The is_owner of this OrganizationPermissions. # noqa: E501 + :type: bool + """ + + self._is_owner = is_owner + + 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(OrganizationPermissions, 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, OrganizationPermissions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrganizationPermissions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/package.py b/swagger_client/models/package.py new file mode 100644 index 0000000..6f224d9 --- /dev/null +++ b/swagger_client/models/package.py @@ -0,0 +1,341 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Package(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 = { + 'created_at': 'datetime', + 'creator': 'User', + 'html_url': 'str', + 'id': 'int', + 'name': 'str', + 'owner': 'User', + 'repository': 'Repository', + 'type': 'str', + 'version': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'creator': 'creator', + 'html_url': 'html_url', + 'id': 'id', + 'name': 'name', + 'owner': 'owner', + 'repository': 'repository', + 'type': 'type', + 'version': 'version' + } + + def __init__(self, created_at=None, creator=None, html_url=None, id=None, name=None, owner=None, repository=None, type=None, version=None, _configuration=None): # noqa: E501 + """Package - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._creator = None + self._html_url = None + self._id = None + self._name = None + self._owner = None + self._repository = None + self._type = None + self._version = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if creator is not None: + self.creator = creator + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if name is not None: + self.name = name + if owner is not None: + self.owner = owner + if repository is not None: + self.repository = repository + if type is not None: + self.type = type + if version is not None: + self.version = version + + @property + def created_at(self): + """Gets the created_at of this Package. # noqa: E501 + + + :return: The created_at of this Package. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Package. + + + :param created_at: The created_at of this Package. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def creator(self): + """Gets the creator of this Package. # noqa: E501 + + + :return: The creator of this Package. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Package. + + + :param creator: The creator of this Package. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def html_url(self): + """Gets the html_url of this Package. # noqa: E501 + + The HTML URL to view the package # noqa: E501 + + :return: The html_url of this Package. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Package. + + The HTML URL to view the package # noqa: E501 + + :param html_url: The html_url of this Package. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Package. # noqa: E501 + + The unique identifier of the package # noqa: E501 + + :return: The id of this Package. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Package. + + The unique identifier of the package # noqa: E501 + + :param id: The id of this Package. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Package. # noqa: E501 + + The name of the package # noqa: E501 + + :return: The name of this Package. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Package. + + The name of the package # noqa: E501 + + :param name: The name of this Package. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def owner(self): + """Gets the owner of this Package. # noqa: E501 + + + :return: The owner of this Package. # noqa: E501 + :rtype: User + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this Package. + + + :param owner: The owner of this Package. # noqa: E501 + :type: User + """ + + self._owner = owner + + @property + def repository(self): + """Gets the repository of this Package. # noqa: E501 + + + :return: The repository of this Package. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this Package. + + + :param repository: The repository of this Package. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def type(self): + """Gets the type of this Package. # noqa: E501 + + The type of the package (e.g., npm, maven, docker) # noqa: E501 + + :return: The type of this Package. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Package. + + The type of the package (e.g., npm, maven, docker) # noqa: E501 + + :param type: The type of this Package. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def version(self): + """Gets the version of this Package. # noqa: E501 + + The version of the package # noqa: E501 + + :return: The version of this Package. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this Package. + + The version of the package # noqa: E501 + + :param version: The version of this Package. # 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(Package, 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, Package): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Package): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/package_file.py b/swagger_client/models/package_file.py new file mode 100644 index 0000000..b69a395 --- /dev/null +++ b/swagger_client/models/package_file.py @@ -0,0 +1,293 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PackageFile(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', + 'md5': 'str', + 'name': 'str', + 'sha1': 'str', + 'sha256': 'str', + 'sha512': 'str', + 'size': 'int' + } + + attribute_map = { + 'id': 'id', + 'md5': 'md5', + 'name': 'name', + 'sha1': 'sha1', + 'sha256': 'sha256', + 'sha512': 'sha512', + 'size': 'size' + } + + def __init__(self, id=None, md5=None, name=None, sha1=None, sha256=None, sha512=None, size=None, _configuration=None): # noqa: E501 + """PackageFile - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._md5 = None + self._name = None + self._sha1 = None + self._sha256 = None + self._sha512 = None + self._size = None + self.discriminator = None + + if id is not None: + self.id = id + if md5 is not None: + self.md5 = md5 + if name is not None: + self.name = name + if sha1 is not None: + self.sha1 = sha1 + if sha256 is not None: + self.sha256 = sha256 + if sha512 is not None: + self.sha512 = sha512 + if size is not None: + self.size = size + + @property + def id(self): + """Gets the id of this PackageFile. # noqa: E501 + + The unique identifier of the package file # noqa: E501 + + :return: The id of this PackageFile. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PackageFile. + + The unique identifier of the package file # noqa: E501 + + :param id: The id of this PackageFile. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def md5(self): + """Gets the md5 of this PackageFile. # noqa: E501 + + The MD5 hash of the package file # noqa: E501 + + :return: The md5 of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._md5 + + @md5.setter + def md5(self, md5): + """Sets the md5 of this PackageFile. + + The MD5 hash of the package file # noqa: E501 + + :param md5: The md5 of this PackageFile. # noqa: E501 + :type: str + """ + + self._md5 = md5 + + @property + def name(self): + """Gets the name of this PackageFile. # noqa: E501 + + The name of the package file # noqa: E501 + + :return: The name of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PackageFile. + + The name of the package file # noqa: E501 + + :param name: The name of this PackageFile. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def sha1(self): + """Gets the sha1 of this PackageFile. # noqa: E501 + + The SHA1 hash of the package file # noqa: E501 + + :return: The sha1 of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._sha1 + + @sha1.setter + def sha1(self, sha1): + """Sets the sha1 of this PackageFile. + + The SHA1 hash of the package file # noqa: E501 + + :param sha1: The sha1 of this PackageFile. # noqa: E501 + :type: str + """ + + self._sha1 = sha1 + + @property + def sha256(self): + """Gets the sha256 of this PackageFile. # noqa: E501 + + The SHA256 hash of the package file # noqa: E501 + + :return: The sha256 of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._sha256 + + @sha256.setter + def sha256(self, sha256): + """Sets the sha256 of this PackageFile. + + The SHA256 hash of the package file # noqa: E501 + + :param sha256: The sha256 of this PackageFile. # noqa: E501 + :type: str + """ + + self._sha256 = sha256 + + @property + def sha512(self): + """Gets the sha512 of this PackageFile. # noqa: E501 + + The SHA512 hash of the package file # noqa: E501 + + :return: The sha512 of this PackageFile. # noqa: E501 + :rtype: str + """ + return self._sha512 + + @sha512.setter + def sha512(self, sha512): + """Sets the sha512 of this PackageFile. + + The SHA512 hash of the package file # noqa: E501 + + :param sha512: The sha512 of this PackageFile. # noqa: E501 + :type: str + """ + + self._sha512 = sha512 + + @property + def size(self): + """Gets the size of this PackageFile. # noqa: E501 + + The size of the package file in bytes # noqa: E501 + + :return: The size of this PackageFile. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PackageFile. + + The size of the package file in bytes # noqa: E501 + + :param size: The size of this PackageFile. # noqa: E501 + :type: int + """ + + self._size = size + + 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(PackageFile, 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, PackageFile): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PackageFile): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/payload_commit.py b/swagger_client/models/payload_commit.py new file mode 100644 index 0000000..30a9492 --- /dev/null +++ b/swagger_client/models/payload_commit.py @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PayloadCommit(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 = { + 'added': 'list[str]', + 'author': 'PayloadUser', + 'committer': 'PayloadUser', + 'id': 'str', + 'message': 'str', + 'modified': 'list[str]', + 'removed': 'list[str]', + 'timestamp': 'datetime', + 'url': 'str', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'added': 'added', + 'author': 'author', + 'committer': 'committer', + 'id': 'id', + 'message': 'message', + 'modified': 'modified', + 'removed': 'removed', + 'timestamp': 'timestamp', + 'url': 'url', + 'verification': 'verification' + } + + def __init__(self, added=None, author=None, committer=None, id=None, message=None, modified=None, removed=None, timestamp=None, url=None, verification=None, _configuration=None): # noqa: E501 + """PayloadCommit - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._added = None + self._author = None + self._committer = None + self._id = None + self._message = None + self._modified = None + self._removed = None + self._timestamp = None + self._url = None + self._verification = None + self.discriminator = None + + if added is not None: + self.added = added + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + if id is not None: + self.id = id + if message is not None: + self.message = message + if modified is not None: + self.modified = modified + if removed is not None: + self.removed = removed + if timestamp is not None: + self.timestamp = timestamp + if url is not None: + self.url = url + if verification is not None: + self.verification = verification + + @property + def added(self): + """Gets the added of this PayloadCommit. # noqa: E501 + + List of files added in this commit # noqa: E501 + + :return: The added of this PayloadCommit. # noqa: E501 + :rtype: list[str] + """ + return self._added + + @added.setter + def added(self, added): + """Sets the added of this PayloadCommit. + + List of files added in this commit # noqa: E501 + + :param added: The added of this PayloadCommit. # noqa: E501 + :type: list[str] + """ + + self._added = added + + @property + def author(self): + """Gets the author of this PayloadCommit. # noqa: E501 + + + :return: The author of this PayloadCommit. # noqa: E501 + :rtype: PayloadUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this PayloadCommit. + + + :param author: The author of this PayloadCommit. # noqa: E501 + :type: PayloadUser + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this PayloadCommit. # noqa: E501 + + + :return: The committer of this PayloadCommit. # noqa: E501 + :rtype: PayloadUser + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this PayloadCommit. + + + :param committer: The committer of this PayloadCommit. # noqa: E501 + :type: PayloadUser + """ + + self._committer = committer + + @property + def id(self): + """Gets the id of this PayloadCommit. # noqa: E501 + + sha1 hash of the commit # noqa: E501 + + :return: The id of this PayloadCommit. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PayloadCommit. + + sha1 hash of the commit # noqa: E501 + + :param id: The id of this PayloadCommit. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def message(self): + """Gets the message of this PayloadCommit. # noqa: E501 + + The commit message # noqa: E501 + + :return: The message of this PayloadCommit. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this PayloadCommit. + + The commit message # noqa: E501 + + :param message: The message of this PayloadCommit. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def modified(self): + """Gets the modified of this PayloadCommit. # noqa: E501 + + List of files modified in this commit # noqa: E501 + + :return: The modified of this PayloadCommit. # noqa: E501 + :rtype: list[str] + """ + return self._modified + + @modified.setter + def modified(self, modified): + """Sets the modified of this PayloadCommit. + + List of files modified in this commit # noqa: E501 + + :param modified: The modified of this PayloadCommit. # noqa: E501 + :type: list[str] + """ + + self._modified = modified + + @property + def removed(self): + """Gets the removed of this PayloadCommit. # noqa: E501 + + List of files removed in this commit # noqa: E501 + + :return: The removed of this PayloadCommit. # noqa: E501 + :rtype: list[str] + """ + return self._removed + + @removed.setter + def removed(self, removed): + """Sets the removed of this PayloadCommit. + + List of files removed in this commit # noqa: E501 + + :param removed: The removed of this PayloadCommit. # noqa: E501 + :type: list[str] + """ + + self._removed = removed + + @property + def timestamp(self): + """Gets the timestamp of this PayloadCommit. # noqa: E501 + + + :return: The timestamp of this PayloadCommit. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this PayloadCommit. + + + :param timestamp: The timestamp of this PayloadCommit. # noqa: E501 + :type: datetime + """ + + self._timestamp = timestamp + + @property + def url(self): + """Gets the url of this PayloadCommit. # noqa: E501 + + The URL to view this commit # noqa: E501 + + :return: The url of this PayloadCommit. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PayloadCommit. + + The URL to view this commit # noqa: E501 + + :param url: The url of this PayloadCommit. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def verification(self): + """Gets the verification of this PayloadCommit. # noqa: E501 + + + :return: The verification of this PayloadCommit. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this PayloadCommit. + + + :param verification: The verification of this PayloadCommit. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(PayloadCommit, 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, PayloadCommit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PayloadCommit): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/payload_commit_verification.py b/swagger_client/models/payload_commit_verification.py new file mode 100644 index 0000000..3ce835f --- /dev/null +++ b/swagger_client/models/payload_commit_verification.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PayloadCommitVerification(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 = { + 'payload': 'str', + 'reason': 'str', + 'signature': 'str', + 'signer': 'PayloadUser', + 'verified': 'bool' + } + + attribute_map = { + 'payload': 'payload', + 'reason': 'reason', + 'signature': 'signature', + 'signer': 'signer', + 'verified': 'verified' + } + + def __init__(self, payload=None, reason=None, signature=None, signer=None, verified=None, _configuration=None): # noqa: E501 + """PayloadCommitVerification - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._payload = None + self._reason = None + self._signature = None + self._signer = None + self._verified = None + self.discriminator = None + + if payload is not None: + self.payload = payload + if reason is not None: + self.reason = reason + if signature is not None: + self.signature = signature + if signer is not None: + self.signer = signer + if verified is not None: + self.verified = verified + + @property + def payload(self): + """Gets the payload of this PayloadCommitVerification. # noqa: E501 + + The signed payload content # noqa: E501 + + :return: The payload of this PayloadCommitVerification. # noqa: E501 + :rtype: str + """ + return self._payload + + @payload.setter + def payload(self, payload): + """Sets the payload of this PayloadCommitVerification. + + The signed payload content # noqa: E501 + + :param payload: The payload of this PayloadCommitVerification. # noqa: E501 + :type: str + """ + + self._payload = payload + + @property + def reason(self): + """Gets the reason of this PayloadCommitVerification. # noqa: E501 + + The reason for the verification status # noqa: E501 + + :return: The reason of this PayloadCommitVerification. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this PayloadCommitVerification. + + The reason for the verification status # noqa: E501 + + :param reason: The reason of this PayloadCommitVerification. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def signature(self): + """Gets the signature of this PayloadCommitVerification. # noqa: E501 + + The GPG signature of the commit # noqa: E501 + + :return: The signature of this PayloadCommitVerification. # noqa: E501 + :rtype: str + """ + return self._signature + + @signature.setter + def signature(self, signature): + """Sets the signature of this PayloadCommitVerification. + + The GPG signature of the commit # noqa: E501 + + :param signature: The signature of this PayloadCommitVerification. # noqa: E501 + :type: str + """ + + self._signature = signature + + @property + def signer(self): + """Gets the signer of this PayloadCommitVerification. # noqa: E501 + + + :return: The signer of this PayloadCommitVerification. # noqa: E501 + :rtype: PayloadUser + """ + return self._signer + + @signer.setter + def signer(self, signer): + """Sets the signer of this PayloadCommitVerification. + + + :param signer: The signer of this PayloadCommitVerification. # noqa: E501 + :type: PayloadUser + """ + + self._signer = signer + + @property + def verified(self): + """Gets the verified of this PayloadCommitVerification. # noqa: E501 + + Whether the commit signature is verified # noqa: E501 + + :return: The verified of this PayloadCommitVerification. # noqa: E501 + :rtype: bool + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this PayloadCommitVerification. + + Whether the commit signature is verified # noqa: E501 + + :param verified: The verified of this PayloadCommitVerification. # noqa: E501 + :type: bool + """ + + self._verified = verified + + 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(PayloadCommitVerification, 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, PayloadCommitVerification): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PayloadCommitVerification): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/payload_user.py b/swagger_client/models/payload_user.py new file mode 100644 index 0000000..a75f31e --- /dev/null +++ b/swagger_client/models/payload_user.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PayloadUser(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 = { + 'email': 'str', + 'name': 'str', + 'username': 'str' + } + + attribute_map = { + 'email': 'email', + 'name': 'name', + 'username': 'username' + } + + def __init__(self, email=None, name=None, username=None, _configuration=None): # noqa: E501 + """PayloadUser - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self._name = None + self._username = None + self.discriminator = None + + if email is not None: + self.email = email + if name is not None: + self.name = name + if username is not None: + self.username = username + + @property + def email(self): + """Gets the email of this PayloadUser. # noqa: E501 + + + :return: The email of this PayloadUser. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this PayloadUser. + + + :param email: The email of this PayloadUser. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this PayloadUser. # noqa: E501 + + Full name of the commit author # noqa: E501 + + :return: The name of this PayloadUser. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PayloadUser. + + Full name of the commit author # noqa: E501 + + :param name: The name of this PayloadUser. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def username(self): + """Gets the username of this PayloadUser. # noqa: E501 + + username of the user # noqa: E501 + + :return: The username of this PayloadUser. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this PayloadUser. + + username of the user # noqa: E501 + + :param username: The username of this PayloadUser. # noqa: E501 + :type: str + """ + + self._username = username + + 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(PayloadUser, 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, PayloadUser): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PayloadUser): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/permission.py b/swagger_client/models/permission.py new file mode 100644 index 0000000..df70028 --- /dev/null +++ b/swagger_client/models/permission.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Permission(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 = { + 'admin': 'bool', + 'pull': 'bool', + 'push': 'bool' + } + + attribute_map = { + 'admin': 'admin', + 'pull': 'pull', + 'push': 'push' + } + + def __init__(self, admin=None, pull=None, push=None, _configuration=None): # noqa: E501 + """Permission - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._admin = None + self._pull = None + self._push = None + self.discriminator = None + + if admin is not None: + self.admin = admin + if pull is not None: + self.pull = pull + if push is not None: + self.push = push + + @property + def admin(self): + """Gets the admin of this Permission. # noqa: E501 + + + :return: The admin of this Permission. # noqa: E501 + :rtype: bool + """ + return self._admin + + @admin.setter + def admin(self, admin): + """Sets the admin of this Permission. + + + :param admin: The admin of this Permission. # noqa: E501 + :type: bool + """ + + self._admin = admin + + @property + def pull(self): + """Gets the pull of this Permission. # noqa: E501 + + + :return: The pull of this Permission. # noqa: E501 + :rtype: bool + """ + return self._pull + + @pull.setter + def pull(self, pull): + """Sets the pull of this Permission. + + + :param pull: The pull of this Permission. # noqa: E501 + :type: bool + """ + + self._pull = pull + + @property + def push(self): + """Gets the push of this Permission. # noqa: E501 + + + :return: The push of this Permission. # noqa: E501 + :rtype: bool + """ + return self._push + + @push.setter + def push(self, push): + """Sets the push of this Permission. + + + :param push: The push of this Permission. # noqa: E501 + :type: bool + """ + + self._push = push + + 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(Permission, 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, Permission): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Permission): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/pr_branch_info.py b/swagger_client/models/pr_branch_info.py new file mode 100644 index 0000000..7a497c3 --- /dev/null +++ b/swagger_client/models/pr_branch_info.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PRBranchInfo(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 = { + 'label': 'str', + 'ref': 'str', + 'repo': 'Repository', + 'repo_id': 'int', + 'sha': 'str' + } + + attribute_map = { + 'label': 'label', + 'ref': 'ref', + 'repo': 'repo', + 'repo_id': 'repo_id', + 'sha': 'sha' + } + + def __init__(self, label=None, ref=None, repo=None, repo_id=None, sha=None, _configuration=None): # noqa: E501 + """PRBranchInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._label = None + self._ref = None + self._repo = None + self._repo_id = None + self._sha = None + self.discriminator = None + + if label is not None: + self.label = label + if ref is not None: + self.ref = ref + if repo is not None: + self.repo = repo + if repo_id is not None: + self.repo_id = repo_id + if sha is not None: + self.sha = sha + + @property + def label(self): + """Gets the label of this PRBranchInfo. # noqa: E501 + + The display name of the branch # noqa: E501 + + :return: The label of this PRBranchInfo. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this PRBranchInfo. + + The display name of the branch # noqa: E501 + + :param label: The label of this PRBranchInfo. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def ref(self): + """Gets the ref of this PRBranchInfo. # noqa: E501 + + The git reference of the branch # noqa: E501 + + :return: The ref of this PRBranchInfo. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this PRBranchInfo. + + The git reference of the branch # noqa: E501 + + :param ref: The ref of this PRBranchInfo. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def repo(self): + """Gets the repo of this PRBranchInfo. # noqa: E501 + + + :return: The repo of this PRBranchInfo. # noqa: E501 + :rtype: Repository + """ + return self._repo + + @repo.setter + def repo(self, repo): + """Sets the repo of this PRBranchInfo. + + + :param repo: The repo of this PRBranchInfo. # noqa: E501 + :type: Repository + """ + + self._repo = repo + + @property + def repo_id(self): + """Gets the repo_id of this PRBranchInfo. # noqa: E501 + + The unique identifier of the repository # noqa: E501 + + :return: The repo_id of this PRBranchInfo. # noqa: E501 + :rtype: int + """ + return self._repo_id + + @repo_id.setter + def repo_id(self, repo_id): + """Sets the repo_id of this PRBranchInfo. + + The unique identifier of the repository # noqa: E501 + + :param repo_id: The repo_id of this PRBranchInfo. # noqa: E501 + :type: int + """ + + self._repo_id = repo_id + + @property + def sha(self): + """Gets the sha of this PRBranchInfo. # noqa: E501 + + The commit SHA of the branch head # noqa: E501 + + :return: The sha of this PRBranchInfo. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this PRBranchInfo. + + The commit SHA of the branch head # noqa: E501 + + :param sha: The sha of this PRBranchInfo. # noqa: E501 + :type: str + """ + + self._sha = sha + + 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(PRBranchInfo, 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, PRBranchInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PRBranchInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/public_key.py b/swagger_client/models/public_key.py new file mode 100644 index 0000000..aa07542 --- /dev/null +++ b/swagger_client/models/public_key.py @@ -0,0 +1,373 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PublicKey(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 = { + 'created_at': 'datetime', + 'fingerprint': 'str', + 'id': 'int', + 'key': 'str', + 'key_type': 'str', + 'last_used_at': 'datetime', + 'read_only': 'bool', + 'title': 'str', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'created_at': 'created_at', + 'fingerprint': 'fingerprint', + 'id': 'id', + 'key': 'key', + 'key_type': 'key_type', + 'last_used_at': 'last_used_at', + 'read_only': 'read_only', + 'title': 'title', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, created_at=None, fingerprint=None, id=None, key=None, key_type=None, last_used_at=None, read_only=None, title=None, url=None, user=None, _configuration=None): # noqa: E501 + """PublicKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._fingerprint = None + self._id = None + self._key = None + self._key_type = None + self._last_used_at = None + self._read_only = None + self._title = None + self._url = None + self._user = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if fingerprint is not None: + self.fingerprint = fingerprint + if id is not None: + self.id = id + if key is not None: + self.key = key + if key_type is not None: + self.key_type = key_type + if last_used_at is not None: + self.last_used_at = last_used_at + if read_only is not None: + self.read_only = read_only + if title is not None: + self.title = title + if url is not None: + self.url = url + if user is not None: + self.user = user + + @property + def created_at(self): + """Gets the created_at of this PublicKey. # noqa: E501 + + + :return: The created_at of this PublicKey. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PublicKey. + + + :param created_at: The created_at of this PublicKey. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def fingerprint(self): + """Gets the fingerprint of this PublicKey. # noqa: E501 + + Fingerprint is the key's fingerprint # noqa: E501 + + :return: The fingerprint of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._fingerprint + + @fingerprint.setter + def fingerprint(self, fingerprint): + """Sets the fingerprint of this PublicKey. + + Fingerprint is the key's fingerprint # noqa: E501 + + :param fingerprint: The fingerprint of this PublicKey. # noqa: E501 + :type: str + """ + + self._fingerprint = fingerprint + + @property + def id(self): + """Gets the id of this PublicKey. # noqa: E501 + + ID is the unique identifier for the public key # noqa: E501 + + :return: The id of this PublicKey. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PublicKey. + + ID is the unique identifier for the public key # noqa: E501 + + :param id: The id of this PublicKey. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def key(self): + """Gets the key of this PublicKey. # noqa: E501 + + Key contains the actual SSH public key content # noqa: E501 + + :return: The key of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this PublicKey. + + Key contains the actual SSH public key content # noqa: E501 + + :param key: The key of this PublicKey. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def key_type(self): + """Gets the key_type of this PublicKey. # noqa: E501 + + KeyType indicates the type of the SSH key # noqa: E501 + + :return: The key_type of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._key_type + + @key_type.setter + def key_type(self, key_type): + """Sets the key_type of this PublicKey. + + KeyType indicates the type of the SSH key # noqa: E501 + + :param key_type: The key_type of this PublicKey. # noqa: E501 + :type: str + """ + + self._key_type = key_type + + @property + def last_used_at(self): + """Gets the last_used_at of this PublicKey. # noqa: E501 + + Updated is the time when the key was last used # noqa: E501 + + :return: The last_used_at of this PublicKey. # noqa: E501 + :rtype: datetime + """ + return self._last_used_at + + @last_used_at.setter + def last_used_at(self, last_used_at): + """Sets the last_used_at of this PublicKey. + + Updated is the time when the key was last used # noqa: E501 + + :param last_used_at: The last_used_at of this PublicKey. # noqa: E501 + :type: datetime + """ + + self._last_used_at = last_used_at + + @property + def read_only(self): + """Gets the read_only of this PublicKey. # noqa: E501 + + ReadOnly indicates if the key has read-only access # noqa: E501 + + :return: The read_only of this PublicKey. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this PublicKey. + + ReadOnly indicates if the key has read-only access # noqa: E501 + + :param read_only: The read_only of this PublicKey. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def title(self): + """Gets the title of this PublicKey. # noqa: E501 + + Title is the human-readable name for the key # noqa: E501 + + :return: The title of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this PublicKey. + + Title is the human-readable name for the key # noqa: E501 + + :param title: The title of this PublicKey. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def url(self): + """Gets the url of this PublicKey. # noqa: E501 + + URL is the API URL for this key # noqa: E501 + + :return: The url of this PublicKey. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PublicKey. + + URL is the API URL for this key # noqa: E501 + + :param url: The url of this PublicKey. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this PublicKey. # noqa: E501 + + + :return: The user of this PublicKey. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PublicKey. + + + :param user: The user of this PublicKey. # noqa: E501 + :type: User + """ + + 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(PublicKey, 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, PublicKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PublicKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/pull_request.py b/swagger_client/models/pull_request.py new file mode 100644 index 0000000..4293b2d --- /dev/null +++ b/swagger_client/models/pull_request.py @@ -0,0 +1,1109 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PullRequest(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 = { + 'additions': 'int', + 'allow_maintainer_edit': 'bool', + 'assignee': 'User', + 'assignees': 'list[User]', + 'base': 'PRBranchInfo', + 'body': 'str', + 'changed_files': 'int', + 'closed_at': 'datetime', + 'comments': 'int', + 'created_at': 'datetime', + 'deletions': 'int', + 'diff_url': 'str', + 'draft': 'bool', + 'due_date': 'datetime', + 'head': 'PRBranchInfo', + 'html_url': 'str', + 'id': 'int', + 'is_locked': 'bool', + 'labels': 'list[Label]', + 'merge_base': 'str', + 'merge_commit_sha': 'str', + 'mergeable': 'bool', + 'merged': 'bool', + 'merged_at': 'datetime', + 'merged_by': 'User', + 'milestone': 'Milestone', + 'number': 'int', + 'patch_url': 'str', + 'pin_order': 'int', + 'requested_reviewers': 'list[User]', + 'requested_reviewers_teams': 'list[Team]', + 'review_comments': 'int', + 'state': 'StateType', + 'title': 'str', + 'updated_at': 'datetime', + 'url': 'str', + 'user': 'User' + } + + attribute_map = { + 'additions': 'additions', + 'allow_maintainer_edit': 'allow_maintainer_edit', + 'assignee': 'assignee', + 'assignees': 'assignees', + 'base': 'base', + 'body': 'body', + 'changed_files': 'changed_files', + 'closed_at': 'closed_at', + 'comments': 'comments', + 'created_at': 'created_at', + 'deletions': 'deletions', + 'diff_url': 'diff_url', + 'draft': 'draft', + 'due_date': 'due_date', + 'head': 'head', + 'html_url': 'html_url', + 'id': 'id', + 'is_locked': 'is_locked', + 'labels': 'labels', + 'merge_base': 'merge_base', + 'merge_commit_sha': 'merge_commit_sha', + 'mergeable': 'mergeable', + 'merged': 'merged', + 'merged_at': 'merged_at', + 'merged_by': 'merged_by', + 'milestone': 'milestone', + 'number': 'number', + 'patch_url': 'patch_url', + 'pin_order': 'pin_order', + 'requested_reviewers': 'requested_reviewers', + 'requested_reviewers_teams': 'requested_reviewers_teams', + 'review_comments': 'review_comments', + 'state': 'state', + 'title': 'title', + 'updated_at': 'updated_at', + 'url': 'url', + 'user': 'user' + } + + def __init__(self, additions=None, allow_maintainer_edit=None, assignee=None, assignees=None, base=None, body=None, changed_files=None, closed_at=None, comments=None, created_at=None, deletions=None, diff_url=None, draft=None, due_date=None, head=None, html_url=None, id=None, is_locked=None, labels=None, merge_base=None, merge_commit_sha=None, mergeable=None, merged=None, merged_at=None, merged_by=None, milestone=None, number=None, patch_url=None, pin_order=None, requested_reviewers=None, requested_reviewers_teams=None, review_comments=None, state=None, title=None, updated_at=None, url=None, user=None, _configuration=None): # noqa: E501 + """PullRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._additions = None + self._allow_maintainer_edit = None + self._assignee = None + self._assignees = None + self._base = None + self._body = None + self._changed_files = None + self._closed_at = None + self._comments = None + self._created_at = None + self._deletions = None + self._diff_url = None + self._draft = None + self._due_date = None + self._head = None + self._html_url = None + self._id = None + self._is_locked = None + self._labels = None + self._merge_base = None + self._merge_commit_sha = None + self._mergeable = None + self._merged = None + self._merged_at = None + self._merged_by = None + self._milestone = None + self._number = None + self._patch_url = None + self._pin_order = None + self._requested_reviewers = None + self._requested_reviewers_teams = None + self._review_comments = None + self._state = None + self._title = None + self._updated_at = None + self._url = None + self._user = None + self.discriminator = None + + if additions is not None: + self.additions = additions + if allow_maintainer_edit is not None: + self.allow_maintainer_edit = allow_maintainer_edit + if assignee is not None: + self.assignee = assignee + if assignees is not None: + self.assignees = assignees + if base is not None: + self.base = base + if body is not None: + self.body = body + if changed_files is not None: + self.changed_files = changed_files + if closed_at is not None: + self.closed_at = closed_at + if comments is not None: + self.comments = comments + if created_at is not None: + self.created_at = created_at + if deletions is not None: + self.deletions = deletions + if diff_url is not None: + self.diff_url = diff_url + if draft is not None: + self.draft = draft + if due_date is not None: + self.due_date = due_date + if head is not None: + self.head = head + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if is_locked is not None: + self.is_locked = is_locked + if labels is not None: + self.labels = labels + if merge_base is not None: + self.merge_base = merge_base + if merge_commit_sha is not None: + self.merge_commit_sha = merge_commit_sha + if mergeable is not None: + self.mergeable = mergeable + if merged is not None: + self.merged = merged + if merged_at is not None: + self.merged_at = merged_at + if merged_by is not None: + self.merged_by = merged_by + if milestone is not None: + self.milestone = milestone + if number is not None: + self.number = number + if patch_url is not None: + self.patch_url = patch_url + if pin_order is not None: + self.pin_order = pin_order + if requested_reviewers is not None: + self.requested_reviewers = requested_reviewers + if requested_reviewers_teams is not None: + self.requested_reviewers_teams = requested_reviewers_teams + if review_comments is not None: + self.review_comments = review_comments + if state is not None: + self.state = state + if title is not None: + self.title = title + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if user is not None: + self.user = user + + @property + def additions(self): + """Gets the additions of this PullRequest. # noqa: E501 + + The number of lines added in the pull request # noqa: E501 + + :return: The additions of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._additions + + @additions.setter + def additions(self, additions): + """Sets the additions of this PullRequest. + + The number of lines added in the pull request # noqa: E501 + + :param additions: The additions of this PullRequest. # noqa: E501 + :type: int + """ + + self._additions = additions + + @property + def allow_maintainer_edit(self): + """Gets the allow_maintainer_edit of this PullRequest. # noqa: E501 + + Whether maintainers can edit the pull request # noqa: E501 + + :return: The allow_maintainer_edit of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._allow_maintainer_edit + + @allow_maintainer_edit.setter + def allow_maintainer_edit(self, allow_maintainer_edit): + """Sets the allow_maintainer_edit of this PullRequest. + + Whether maintainers can edit the pull request # noqa: E501 + + :param allow_maintainer_edit: The allow_maintainer_edit of this PullRequest. # noqa: E501 + :type: bool + """ + + self._allow_maintainer_edit = allow_maintainer_edit + + @property + def assignee(self): + """Gets the assignee of this PullRequest. # noqa: E501 + + + :return: The assignee of this PullRequest. # noqa: E501 + :rtype: User + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this PullRequest. + + + :param assignee: The assignee of this PullRequest. # noqa: E501 + :type: User + """ + + self._assignee = assignee + + @property + def assignees(self): + """Gets the assignees of this PullRequest. # noqa: E501 + + The list of users assigned to the pull request # noqa: E501 + + :return: The assignees of this PullRequest. # noqa: E501 + :rtype: list[User] + """ + return self._assignees + + @assignees.setter + def assignees(self, assignees): + """Sets the assignees of this PullRequest. + + The list of users assigned to the pull request # noqa: E501 + + :param assignees: The assignees of this PullRequest. # noqa: E501 + :type: list[User] + """ + + self._assignees = assignees + + @property + def base(self): + """Gets the base of this PullRequest. # noqa: E501 + + + :return: The base of this PullRequest. # noqa: E501 + :rtype: PRBranchInfo + """ + return self._base + + @base.setter + def base(self, base): + """Sets the base of this PullRequest. + + + :param base: The base of this PullRequest. # noqa: E501 + :type: PRBranchInfo + """ + + self._base = base + + @property + def body(self): + """Gets the body of this PullRequest. # noqa: E501 + + The description body of the pull request # noqa: E501 + + :return: The body of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this PullRequest. + + The description body of the pull request # noqa: E501 + + :param body: The body of this PullRequest. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def changed_files(self): + """Gets the changed_files of this PullRequest. # noqa: E501 + + The number of files changed in the pull request # noqa: E501 + + :return: The changed_files of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._changed_files + + @changed_files.setter + def changed_files(self, changed_files): + """Sets the changed_files of this PullRequest. + + The number of files changed in the pull request # noqa: E501 + + :param changed_files: The changed_files of this PullRequest. # noqa: E501 + :type: int + """ + + self._changed_files = changed_files + + @property + def closed_at(self): + """Gets the closed_at of this PullRequest. # noqa: E501 + + + :return: The closed_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._closed_at + + @closed_at.setter + def closed_at(self, closed_at): + """Sets the closed_at of this PullRequest. + + + :param closed_at: The closed_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._closed_at = closed_at + + @property + def comments(self): + """Gets the comments of this PullRequest. # noqa: E501 + + The number of comments on the pull request # noqa: E501 + + :return: The comments of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this PullRequest. + + The number of comments on the pull request # noqa: E501 + + :param comments: The comments of this PullRequest. # noqa: E501 + :type: int + """ + + self._comments = comments + + @property + def created_at(self): + """Gets the created_at of this PullRequest. # noqa: E501 + + + :return: The created_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PullRequest. + + + :param created_at: The created_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def deletions(self): + """Gets the deletions of this PullRequest. # noqa: E501 + + The number of lines deleted in the pull request # noqa: E501 + + :return: The deletions of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._deletions + + @deletions.setter + def deletions(self, deletions): + """Sets the deletions of this PullRequest. + + The number of lines deleted in the pull request # noqa: E501 + + :param deletions: The deletions of this PullRequest. # noqa: E501 + :type: int + """ + + self._deletions = deletions + + @property + def diff_url(self): + """Gets the diff_url of this PullRequest. # noqa: E501 + + The URL to download the diff patch # noqa: E501 + + :return: The diff_url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._diff_url + + @diff_url.setter + def diff_url(self, diff_url): + """Sets the diff_url of this PullRequest. + + The URL to download the diff patch # noqa: E501 + + :param diff_url: The diff_url of this PullRequest. # noqa: E501 + :type: str + """ + + self._diff_url = diff_url + + @property + def draft(self): + """Gets the draft of this PullRequest. # noqa: E501 + + Whether the pull request is a draft # noqa: E501 + + :return: The draft of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this PullRequest. + + Whether the pull request is a draft # noqa: E501 + + :param draft: The draft of this PullRequest. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def due_date(self): + """Gets the due_date of this PullRequest. # noqa: E501 + + + :return: The due_date of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this PullRequest. + + + :param due_date: The due_date of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._due_date = due_date + + @property + def head(self): + """Gets the head of this PullRequest. # noqa: E501 + + + :return: The head of this PullRequest. # noqa: E501 + :rtype: PRBranchInfo + """ + return self._head + + @head.setter + def head(self, head): + """Sets the head of this PullRequest. + + + :param head: The head of this PullRequest. # noqa: E501 + :type: PRBranchInfo + """ + + self._head = head + + @property + def html_url(self): + """Gets the html_url of this PullRequest. # noqa: E501 + + The HTML URL to view the pull request # noqa: E501 + + :return: The html_url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullRequest. + + The HTML URL to view the pull request # noqa: E501 + + :param html_url: The html_url of this PullRequest. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this PullRequest. # noqa: E501 + + The unique identifier of the pull request # noqa: E501 + + :return: The id of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PullRequest. + + The unique identifier of the pull request # noqa: E501 + + :param id: The id of this PullRequest. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def is_locked(self): + """Gets the is_locked of this PullRequest. # noqa: E501 + + Whether the pull request conversation is locked # noqa: E501 + + :return: The is_locked of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._is_locked + + @is_locked.setter + def is_locked(self, is_locked): + """Sets the is_locked of this PullRequest. + + Whether the pull request conversation is locked # noqa: E501 + + :param is_locked: The is_locked of this PullRequest. # noqa: E501 + :type: bool + """ + + self._is_locked = is_locked + + @property + def labels(self): + """Gets the labels of this PullRequest. # noqa: E501 + + The labels attached to the pull request # noqa: E501 + + :return: The labels of this PullRequest. # noqa: E501 + :rtype: list[Label] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this PullRequest. + + The labels attached to the pull request # noqa: E501 + + :param labels: The labels of this PullRequest. # noqa: E501 + :type: list[Label] + """ + + self._labels = labels + + @property + def merge_base(self): + """Gets the merge_base of this PullRequest. # noqa: E501 + + The merge base commit SHA # noqa: E501 + + :return: The merge_base of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._merge_base + + @merge_base.setter + def merge_base(self, merge_base): + """Sets the merge_base of this PullRequest. + + The merge base commit SHA # noqa: E501 + + :param merge_base: The merge_base of this PullRequest. # noqa: E501 + :type: str + """ + + self._merge_base = merge_base + + @property + def merge_commit_sha(self): + """Gets the merge_commit_sha of this PullRequest. # noqa: E501 + + The SHA of the merge commit # noqa: E501 + + :return: The merge_commit_sha of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._merge_commit_sha + + @merge_commit_sha.setter + def merge_commit_sha(self, merge_commit_sha): + """Sets the merge_commit_sha of this PullRequest. + + The SHA of the merge commit # noqa: E501 + + :param merge_commit_sha: The merge_commit_sha of this PullRequest. # noqa: E501 + :type: str + """ + + self._merge_commit_sha = merge_commit_sha + + @property + def mergeable(self): + """Gets the mergeable of this PullRequest. # noqa: E501 + + Whether the pull request can be merged # noqa: E501 + + :return: The mergeable of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._mergeable + + @mergeable.setter + def mergeable(self, mergeable): + """Sets the mergeable of this PullRequest. + + Whether the pull request can be merged # noqa: E501 + + :param mergeable: The mergeable of this PullRequest. # noqa: E501 + :type: bool + """ + + self._mergeable = mergeable + + @property + def merged(self): + """Gets the merged of this PullRequest. # noqa: E501 + + Whether the pull request has been merged # noqa: E501 + + :return: The merged of this PullRequest. # noqa: E501 + :rtype: bool + """ + return self._merged + + @merged.setter + def merged(self, merged): + """Sets the merged of this PullRequest. + + Whether the pull request has been merged # noqa: E501 + + :param merged: The merged of this PullRequest. # noqa: E501 + :type: bool + """ + + self._merged = merged + + @property + def merged_at(self): + """Gets the merged_at of this PullRequest. # noqa: E501 + + + :return: The merged_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._merged_at + + @merged_at.setter + def merged_at(self, merged_at): + """Sets the merged_at of this PullRequest. + + + :param merged_at: The merged_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._merged_at = merged_at + + @property + def merged_by(self): + """Gets the merged_by of this PullRequest. # noqa: E501 + + + :return: The merged_by of this PullRequest. # noqa: E501 + :rtype: User + """ + return self._merged_by + + @merged_by.setter + def merged_by(self, merged_by): + """Sets the merged_by of this PullRequest. + + + :param merged_by: The merged_by of this PullRequest. # noqa: E501 + :type: User + """ + + self._merged_by = merged_by + + @property + def milestone(self): + """Gets the milestone of this PullRequest. # noqa: E501 + + + :return: The milestone of this PullRequest. # noqa: E501 + :rtype: Milestone + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this PullRequest. + + + :param milestone: The milestone of this PullRequest. # noqa: E501 + :type: Milestone + """ + + self._milestone = milestone + + @property + def number(self): + """Gets the number of this PullRequest. # noqa: E501 + + The pull request number # noqa: E501 + + :return: The number of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PullRequest. + + The pull request number # noqa: E501 + + :param number: The number of this PullRequest. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def patch_url(self): + """Gets the patch_url of this PullRequest. # noqa: E501 + + The URL to download the patch file # noqa: E501 + + :return: The patch_url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._patch_url + + @patch_url.setter + def patch_url(self, patch_url): + """Sets the patch_url of this PullRequest. + + The URL to download the patch file # noqa: E501 + + :param patch_url: The patch_url of this PullRequest. # noqa: E501 + :type: str + """ + + self._patch_url = patch_url + + @property + def pin_order(self): + """Gets the pin_order of this PullRequest. # noqa: E501 + + The pin order for the pull request # noqa: E501 + + :return: The pin_order of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._pin_order + + @pin_order.setter + def pin_order(self, pin_order): + """Sets the pin_order of this PullRequest. + + The pin order for the pull request # noqa: E501 + + :param pin_order: The pin_order of this PullRequest. # noqa: E501 + :type: int + """ + + self._pin_order = pin_order + + @property + def requested_reviewers(self): + """Gets the requested_reviewers of this PullRequest. # noqa: E501 + + The users requested to review the pull request # noqa: E501 + + :return: The requested_reviewers of this PullRequest. # noqa: E501 + :rtype: list[User] + """ + return self._requested_reviewers + + @requested_reviewers.setter + def requested_reviewers(self, requested_reviewers): + """Sets the requested_reviewers of this PullRequest. + + The users requested to review the pull request # noqa: E501 + + :param requested_reviewers: The requested_reviewers of this PullRequest. # noqa: E501 + :type: list[User] + """ + + self._requested_reviewers = requested_reviewers + + @property + def requested_reviewers_teams(self): + """Gets the requested_reviewers_teams of this PullRequest. # noqa: E501 + + The teams requested to review the pull request # noqa: E501 + + :return: The requested_reviewers_teams of this PullRequest. # noqa: E501 + :rtype: list[Team] + """ + return self._requested_reviewers_teams + + @requested_reviewers_teams.setter + def requested_reviewers_teams(self, requested_reviewers_teams): + """Sets the requested_reviewers_teams of this PullRequest. + + The teams requested to review the pull request # noqa: E501 + + :param requested_reviewers_teams: The requested_reviewers_teams of this PullRequest. # noqa: E501 + :type: list[Team] + """ + + self._requested_reviewers_teams = requested_reviewers_teams + + @property + def review_comments(self): + """Gets the review_comments of this PullRequest. # noqa: E501 + + number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) # noqa: E501 + + :return: The review_comments of this PullRequest. # noqa: E501 + :rtype: int + """ + return self._review_comments + + @review_comments.setter + def review_comments(self, review_comments): + """Sets the review_comments of this PullRequest. + + number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) # noqa: E501 + + :param review_comments: The review_comments of this PullRequest. # noqa: E501 + :type: int + """ + + self._review_comments = review_comments + + @property + def state(self): + """Gets the state of this PullRequest. # noqa: E501 + + + :return: The state of this PullRequest. # noqa: E501 + :rtype: StateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this PullRequest. + + + :param state: The state of this PullRequest. # noqa: E501 + :type: StateType + """ + + self._state = state + + @property + def title(self): + """Gets the title of this PullRequest. # noqa: E501 + + The title of the pull request # noqa: E501 + + :return: The title of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this PullRequest. + + The title of the pull request # noqa: E501 + + :param title: The title of this PullRequest. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def updated_at(self): + """Gets the updated_at of this PullRequest. # noqa: E501 + + + :return: The updated_at of this PullRequest. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PullRequest. + + + :param updated_at: The updated_at of this PullRequest. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this PullRequest. # noqa: E501 + + The API URL of the pull request # noqa: E501 + + :return: The url of this PullRequest. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PullRequest. + + The API URL of the pull request # noqa: E501 + + :param url: The url of this PullRequest. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def user(self): + """Gets the user of this PullRequest. # noqa: E501 + + + :return: The user of this PullRequest. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PullRequest. + + + :param user: The user of this PullRequest. # noqa: E501 + :type: User + """ + + 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(PullRequest, 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, PullRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/pull_request_meta.py b/swagger_client/models/pull_request_meta.py new file mode 100644 index 0000000..3ec368a --- /dev/null +++ b/swagger_client/models/pull_request_meta.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PullRequestMeta(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 = { + 'draft': 'bool', + 'html_url': 'str', + 'merged': 'bool', + 'merged_at': 'datetime' + } + + attribute_map = { + 'draft': 'draft', + 'html_url': 'html_url', + 'merged': 'merged', + 'merged_at': 'merged_at' + } + + def __init__(self, draft=None, html_url=None, merged=None, merged_at=None, _configuration=None): # noqa: E501 + """PullRequestMeta - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._draft = None + self._html_url = None + self._merged = None + self._merged_at = None + self.discriminator = None + + if draft is not None: + self.draft = draft + if html_url is not None: + self.html_url = html_url + if merged is not None: + self.merged = merged + if merged_at is not None: + self.merged_at = merged_at + + @property + def draft(self): + """Gets the draft of this PullRequestMeta. # noqa: E501 + + + :return: The draft of this PullRequestMeta. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this PullRequestMeta. + + + :param draft: The draft of this PullRequestMeta. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def html_url(self): + """Gets the html_url of this PullRequestMeta. # noqa: E501 + + + :return: The html_url of this PullRequestMeta. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullRequestMeta. + + + :param html_url: The html_url of this PullRequestMeta. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def merged(self): + """Gets the merged of this PullRequestMeta. # noqa: E501 + + + :return: The merged of this PullRequestMeta. # noqa: E501 + :rtype: bool + """ + return self._merged + + @merged.setter + def merged(self, merged): + """Sets the merged of this PullRequestMeta. + + + :param merged: The merged of this PullRequestMeta. # noqa: E501 + :type: bool + """ + + self._merged = merged + + @property + def merged_at(self): + """Gets the merged_at of this PullRequestMeta. # noqa: E501 + + + :return: The merged_at of this PullRequestMeta. # noqa: E501 + :rtype: datetime + """ + return self._merged_at + + @merged_at.setter + def merged_at(self, merged_at): + """Sets the merged_at of this PullRequestMeta. + + + :param merged_at: The merged_at of this PullRequestMeta. # noqa: E501 + :type: datetime + """ + + self._merged_at = merged_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(PullRequestMeta, 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, PullRequestMeta): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullRequestMeta): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/pull_review.py b/swagger_client/models/pull_review.py new file mode 100644 index 0000000..9084620 --- /dev/null +++ b/swagger_client/models/pull_review.py @@ -0,0 +1,465 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PullReview(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 = { + 'body': 'str', + 'comments_count': 'int', + 'commit_id': 'str', + 'dismissed': 'bool', + 'html_url': 'str', + 'id': 'int', + 'official': 'bool', + 'pull_request_url': 'str', + 'stale': 'bool', + 'state': 'ReviewStateType', + 'submitted_at': 'datetime', + 'team': 'Team', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'body': 'body', + 'comments_count': 'comments_count', + 'commit_id': 'commit_id', + 'dismissed': 'dismissed', + 'html_url': 'html_url', + 'id': 'id', + 'official': 'official', + 'pull_request_url': 'pull_request_url', + 'stale': 'stale', + 'state': 'state', + 'submitted_at': 'submitted_at', + 'team': 'team', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, body=None, comments_count=None, commit_id=None, dismissed=None, html_url=None, id=None, official=None, pull_request_url=None, stale=None, state=None, submitted_at=None, team=None, updated_at=None, user=None, _configuration=None): # noqa: E501 + """PullReview - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._comments_count = None + self._commit_id = None + self._dismissed = None + self._html_url = None + self._id = None + self._official = None + self._pull_request_url = None + self._stale = None + self._state = None + self._submitted_at = None + self._team = None + self._updated_at = None + self._user = None + self.discriminator = None + + if body is not None: + self.body = body + if comments_count is not None: + self.comments_count = comments_count + if commit_id is not None: + self.commit_id = commit_id + if dismissed is not None: + self.dismissed = dismissed + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if official is not None: + self.official = official + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if stale is not None: + self.stale = stale + if state is not None: + self.state = state + if submitted_at is not None: + self.submitted_at = submitted_at + if team is not None: + self.team = team + if updated_at is not None: + self.updated_at = updated_at + if user is not None: + self.user = user + + @property + def body(self): + """Gets the body of this PullReview. # noqa: E501 + + + :return: The body of this PullReview. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this PullReview. + + + :param body: The body of this PullReview. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def comments_count(self): + """Gets the comments_count of this PullReview. # noqa: E501 + + + :return: The comments_count of this PullReview. # noqa: E501 + :rtype: int + """ + return self._comments_count + + @comments_count.setter + def comments_count(self, comments_count): + """Sets the comments_count of this PullReview. + + + :param comments_count: The comments_count of this PullReview. # noqa: E501 + :type: int + """ + + self._comments_count = comments_count + + @property + def commit_id(self): + """Gets the commit_id of this PullReview. # noqa: E501 + + + :return: The commit_id of this PullReview. # noqa: E501 + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """Sets the commit_id of this PullReview. + + + :param commit_id: The commit_id of this PullReview. # noqa: E501 + :type: str + """ + + self._commit_id = commit_id + + @property + def dismissed(self): + """Gets the dismissed of this PullReview. # noqa: E501 + + + :return: The dismissed of this PullReview. # noqa: E501 + :rtype: bool + """ + return self._dismissed + + @dismissed.setter + def dismissed(self, dismissed): + """Sets the dismissed of this PullReview. + + + :param dismissed: The dismissed of this PullReview. # noqa: E501 + :type: bool + """ + + self._dismissed = dismissed + + @property + def html_url(self): + """Gets the html_url of this PullReview. # noqa: E501 + + HTMLURL is the web URL for viewing the review # noqa: E501 + + :return: The html_url of this PullReview. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullReview. + + HTMLURL is the web URL for viewing the review # noqa: E501 + + :param html_url: The html_url of this PullReview. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this PullReview. # noqa: E501 + + + :return: The id of this PullReview. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PullReview. + + + :param id: The id of this PullReview. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def official(self): + """Gets the official of this PullReview. # noqa: E501 + + + :return: The official of this PullReview. # noqa: E501 + :rtype: bool + """ + return self._official + + @official.setter + def official(self, official): + """Sets the official of this PullReview. + + + :param official: The official of this PullReview. # noqa: E501 + :type: bool + """ + + self._official = official + + @property + def pull_request_url(self): + """Gets the pull_request_url of this PullReview. # noqa: E501 + + HTMLPullURL is the web URL for the pull request # noqa: E501 + + :return: The pull_request_url of this PullReview. # noqa: E501 + :rtype: str + """ + return self._pull_request_url + + @pull_request_url.setter + def pull_request_url(self, pull_request_url): + """Sets the pull_request_url of this PullReview. + + HTMLPullURL is the web URL for the pull request # noqa: E501 + + :param pull_request_url: The pull_request_url of this PullReview. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def stale(self): + """Gets the stale of this PullReview. # noqa: E501 + + + :return: The stale of this PullReview. # noqa: E501 + :rtype: bool + """ + return self._stale + + @stale.setter + def stale(self, stale): + """Sets the stale of this PullReview. + + + :param stale: The stale of this PullReview. # noqa: E501 + :type: bool + """ + + self._stale = stale + + @property + def state(self): + """Gets the state of this PullReview. # noqa: E501 + + + :return: The state of this PullReview. # noqa: E501 + :rtype: ReviewStateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this PullReview. + + + :param state: The state of this PullReview. # noqa: E501 + :type: ReviewStateType + """ + + self._state = state + + @property + def submitted_at(self): + """Gets the submitted_at of this PullReview. # noqa: E501 + + + :return: The submitted_at of this PullReview. # noqa: E501 + :rtype: datetime + """ + return self._submitted_at + + @submitted_at.setter + def submitted_at(self, submitted_at): + """Sets the submitted_at of this PullReview. + + + :param submitted_at: The submitted_at of this PullReview. # noqa: E501 + :type: datetime + """ + + self._submitted_at = submitted_at + + @property + def team(self): + """Gets the team of this PullReview. # noqa: E501 + + + :return: The team of this PullReview. # noqa: E501 + :rtype: Team + """ + return self._team + + @team.setter + def team(self, team): + """Sets the team of this PullReview. + + + :param team: The team of this PullReview. # noqa: E501 + :type: Team + """ + + self._team = team + + @property + def updated_at(self): + """Gets the updated_at of this PullReview. # noqa: E501 + + + :return: The updated_at of this PullReview. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PullReview. + + + :param updated_at: The updated_at of this PullReview. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this PullReview. # noqa: E501 + + + :return: The user of this PullReview. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PullReview. + + + :param user: The user of this PullReview. # noqa: E501 + :type: User + """ + + 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(PullReview, 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, PullReview): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullReview): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/pull_review_comment.py b/swagger_client/models/pull_review_comment.py new file mode 100644 index 0000000..3f9d223 --- /dev/null +++ b/swagger_client/models/pull_review_comment.py @@ -0,0 +1,487 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PullReviewComment(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 = { + 'body': 'str', + 'commit_id': 'str', + 'created_at': 'datetime', + 'diff_hunk': 'str', + 'html_url': 'str', + 'id': 'int', + 'original_commit_id': 'str', + 'original_position': 'int', + 'path': 'str', + 'position': 'int', + 'pull_request_review_id': 'int', + 'pull_request_url': 'str', + 'resolver': 'User', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'body': 'body', + 'commit_id': 'commit_id', + 'created_at': 'created_at', + 'diff_hunk': 'diff_hunk', + 'html_url': 'html_url', + 'id': 'id', + 'original_commit_id': 'original_commit_id', + 'original_position': 'original_position', + 'path': 'path', + 'position': 'position', + 'pull_request_review_id': 'pull_request_review_id', + 'pull_request_url': 'pull_request_url', + 'resolver': 'resolver', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, body=None, commit_id=None, created_at=None, diff_hunk=None, html_url=None, id=None, original_commit_id=None, original_position=None, path=None, position=None, pull_request_review_id=None, pull_request_url=None, resolver=None, updated_at=None, user=None, _configuration=None): # noqa: E501 + """PullReviewComment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._commit_id = None + self._created_at = None + self._diff_hunk = None + self._html_url = None + self._id = None + self._original_commit_id = None + self._original_position = None + self._path = None + self._position = None + self._pull_request_review_id = None + self._pull_request_url = None + self._resolver = None + self._updated_at = None + self._user = None + self.discriminator = None + + if body is not None: + self.body = body + if commit_id is not None: + self.commit_id = commit_id + if created_at is not None: + self.created_at = created_at + if diff_hunk is not None: + self.diff_hunk = diff_hunk + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if original_commit_id is not None: + self.original_commit_id = original_commit_id + if original_position is not None: + self.original_position = original_position + if path is not None: + self.path = path + if position is not None: + self.position = position + if pull_request_review_id is not None: + self.pull_request_review_id = pull_request_review_id + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if resolver is not None: + self.resolver = resolver + if updated_at is not None: + self.updated_at = updated_at + if user is not None: + self.user = user + + @property + def body(self): + """Gets the body of this PullReviewComment. # noqa: E501 + + + :return: The body of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this PullReviewComment. + + + :param body: The body of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def commit_id(self): + """Gets the commit_id of this PullReviewComment. # noqa: E501 + + + :return: The commit_id of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """Sets the commit_id of this PullReviewComment. + + + :param commit_id: The commit_id of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._commit_id = commit_id + + @property + def created_at(self): + """Gets the created_at of this PullReviewComment. # noqa: E501 + + + :return: The created_at of this PullReviewComment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PullReviewComment. + + + :param created_at: The created_at of this PullReviewComment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def diff_hunk(self): + """Gets the diff_hunk of this PullReviewComment. # noqa: E501 + + + :return: The diff_hunk of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._diff_hunk + + @diff_hunk.setter + def diff_hunk(self, diff_hunk): + """Sets the diff_hunk of this PullReviewComment. + + + :param diff_hunk: The diff_hunk of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._diff_hunk = diff_hunk + + @property + def html_url(self): + """Gets the html_url of this PullReviewComment. # noqa: E501 + + + :return: The html_url of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullReviewComment. + + + :param html_url: The html_url of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this PullReviewComment. # noqa: E501 + + + :return: The id of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PullReviewComment. + + + :param id: The id of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def original_commit_id(self): + """Gets the original_commit_id of this PullReviewComment. # noqa: E501 + + + :return: The original_commit_id of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._original_commit_id + + @original_commit_id.setter + def original_commit_id(self, original_commit_id): + """Sets the original_commit_id of this PullReviewComment. + + + :param original_commit_id: The original_commit_id of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._original_commit_id = original_commit_id + + @property + def original_position(self): + """Gets the original_position of this PullReviewComment. # noqa: E501 + + + :return: The original_position of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._original_position + + @original_position.setter + def original_position(self, original_position): + """Sets the original_position of this PullReviewComment. + + + :param original_position: The original_position of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._original_position = original_position + + @property + def path(self): + """Gets the path of this PullReviewComment. # noqa: E501 + + + :return: The path of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this PullReviewComment. + + + :param path: The path of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def position(self): + """Gets the position of this PullReviewComment. # noqa: E501 + + + :return: The position of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._position + + @position.setter + def position(self, position): + """Sets the position of this PullReviewComment. + + + :param position: The position of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._position = position + + @property + def pull_request_review_id(self): + """Gets the pull_request_review_id of this PullReviewComment. # noqa: E501 + + + :return: The pull_request_review_id of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._pull_request_review_id + + @pull_request_review_id.setter + def pull_request_review_id(self, pull_request_review_id): + """Sets the pull_request_review_id of this PullReviewComment. + + + :param pull_request_review_id: The pull_request_review_id of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._pull_request_review_id = pull_request_review_id + + @property + def pull_request_url(self): + """Gets the pull_request_url of this PullReviewComment. # noqa: E501 + + + :return: The pull_request_url of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._pull_request_url + + @pull_request_url.setter + def pull_request_url(self, pull_request_url): + """Sets the pull_request_url of this PullReviewComment. + + + :param pull_request_url: The pull_request_url of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def resolver(self): + """Gets the resolver of this PullReviewComment. # noqa: E501 + + + :return: The resolver of this PullReviewComment. # noqa: E501 + :rtype: User + """ + return self._resolver + + @resolver.setter + def resolver(self, resolver): + """Sets the resolver of this PullReviewComment. + + + :param resolver: The resolver of this PullReviewComment. # noqa: E501 + :type: User + """ + + self._resolver = resolver + + @property + def updated_at(self): + """Gets the updated_at of this PullReviewComment. # noqa: E501 + + + :return: The updated_at of this PullReviewComment. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PullReviewComment. + + + :param updated_at: The updated_at of this PullReviewComment. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this PullReviewComment. # noqa: E501 + + + :return: The user of this PullReviewComment. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PullReviewComment. + + + :param user: The user of this PullReviewComment. # noqa: E501 + :type: User + """ + + 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(PullReviewComment, 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, PullReviewComment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullReviewComment): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/pull_review_request_options.py b/swagger_client/models/pull_review_request_options.py new file mode 100644 index 0000000..008930e --- /dev/null +++ b/swagger_client/models/pull_review_request_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PullReviewRequestOptions(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 = { + 'reviewers': 'list[str]', + 'team_reviewers': 'list[str]' + } + + attribute_map = { + 'reviewers': 'reviewers', + 'team_reviewers': 'team_reviewers' + } + + def __init__(self, reviewers=None, team_reviewers=None, _configuration=None): # noqa: E501 + """PullReviewRequestOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._reviewers = None + self._team_reviewers = None + self.discriminator = None + + if reviewers is not None: + self.reviewers = reviewers + if team_reviewers is not None: + self.team_reviewers = team_reviewers + + @property + def reviewers(self): + """Gets the reviewers of this PullReviewRequestOptions. # noqa: E501 + + + :return: The reviewers of this PullReviewRequestOptions. # noqa: E501 + :rtype: list[str] + """ + return self._reviewers + + @reviewers.setter + def reviewers(self, reviewers): + """Sets the reviewers of this PullReviewRequestOptions. + + + :param reviewers: The reviewers of this PullReviewRequestOptions. # noqa: E501 + :type: list[str] + """ + + self._reviewers = reviewers + + @property + def team_reviewers(self): + """Gets the team_reviewers of this PullReviewRequestOptions. # noqa: E501 + + + :return: The team_reviewers of this PullReviewRequestOptions. # noqa: E501 + :rtype: list[str] + """ + return self._team_reviewers + + @team_reviewers.setter + def team_reviewers(self, team_reviewers): + """Sets the team_reviewers of this PullReviewRequestOptions. + + + :param team_reviewers: The team_reviewers of this PullReviewRequestOptions. # noqa: E501 + :type: list[str] + """ + + self._team_reviewers = team_reviewers + + 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(PullReviewRequestOptions, 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, PullReviewRequestOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PullReviewRequestOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/push_mirror.py b/swagger_client/models/push_mirror.py new file mode 100644 index 0000000..8a937aa --- /dev/null +++ b/swagger_client/models/push_mirror.py @@ -0,0 +1,317 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class PushMirror(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 = { + 'created': 'datetime', + 'interval': 'str', + 'last_error': 'str', + 'last_update': 'datetime', + 'remote_address': 'str', + 'remote_name': 'str', + 'repo_name': 'str', + 'sync_on_commit': 'bool' + } + + attribute_map = { + 'created': 'created', + 'interval': 'interval', + 'last_error': 'last_error', + 'last_update': 'last_update', + 'remote_address': 'remote_address', + 'remote_name': 'remote_name', + 'repo_name': 'repo_name', + 'sync_on_commit': 'sync_on_commit' + } + + def __init__(self, created=None, interval=None, last_error=None, last_update=None, remote_address=None, remote_name=None, repo_name=None, sync_on_commit=None, _configuration=None): # noqa: E501 + """PushMirror - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._interval = None + self._last_error = None + self._last_update = None + self._remote_address = None + self._remote_name = None + self._repo_name = None + self._sync_on_commit = None + self.discriminator = None + + if created is not None: + self.created = created + if interval is not None: + self.interval = interval + if last_error is not None: + self.last_error = last_error + if last_update is not None: + self.last_update = last_update + if remote_address is not None: + self.remote_address = remote_address + if remote_name is not None: + self.remote_name = remote_name + if repo_name is not None: + self.repo_name = repo_name + if sync_on_commit is not None: + self.sync_on_commit = sync_on_commit + + @property + def created(self): + """Gets the created of this PushMirror. # noqa: E501 + + + :return: The created of this PushMirror. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this PushMirror. + + + :param created: The created of this PushMirror. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def interval(self): + """Gets the interval of this PushMirror. # noqa: E501 + + The sync interval for automatic updates # noqa: E501 + + :return: The interval of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._interval + + @interval.setter + def interval(self, interval): + """Sets the interval of this PushMirror. + + The sync interval for automatic updates # noqa: E501 + + :param interval: The interval of this PushMirror. # noqa: E501 + :type: str + """ + + self._interval = interval + + @property + def last_error(self): + """Gets the last_error of this PushMirror. # noqa: E501 + + The last error message encountered during sync # noqa: E501 + + :return: The last_error of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._last_error + + @last_error.setter + def last_error(self, last_error): + """Sets the last_error of this PushMirror. + + The last error message encountered during sync # noqa: E501 + + :param last_error: The last_error of this PushMirror. # noqa: E501 + :type: str + """ + + self._last_error = last_error + + @property + def last_update(self): + """Gets the last_update of this PushMirror. # noqa: E501 + + + :return: The last_update of this PushMirror. # noqa: E501 + :rtype: datetime + """ + return self._last_update + + @last_update.setter + def last_update(self, last_update): + """Sets the last_update of this PushMirror. + + + :param last_update: The last_update of this PushMirror. # noqa: E501 + :type: datetime + """ + + self._last_update = last_update + + @property + def remote_address(self): + """Gets the remote_address of this PushMirror. # noqa: E501 + + The remote repository URL being mirrored to # noqa: E501 + + :return: The remote_address of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._remote_address + + @remote_address.setter + def remote_address(self, remote_address): + """Sets the remote_address of this PushMirror. + + The remote repository URL being mirrored to # noqa: E501 + + :param remote_address: The remote_address of this PushMirror. # noqa: E501 + :type: str + """ + + self._remote_address = remote_address + + @property + def remote_name(self): + """Gets the remote_name of this PushMirror. # noqa: E501 + + The name of the remote in the git configuration # noqa: E501 + + :return: The remote_name of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._remote_name + + @remote_name.setter + def remote_name(self, remote_name): + """Sets the remote_name of this PushMirror. + + The name of the remote in the git configuration # noqa: E501 + + :param remote_name: The remote_name of this PushMirror. # noqa: E501 + :type: str + """ + + self._remote_name = remote_name + + @property + def repo_name(self): + """Gets the repo_name of this PushMirror. # noqa: E501 + + The name of the source repository # noqa: E501 + + :return: The repo_name of this PushMirror. # noqa: E501 + :rtype: str + """ + return self._repo_name + + @repo_name.setter + def repo_name(self, repo_name): + """Sets the repo_name of this PushMirror. + + The name of the source repository # noqa: E501 + + :param repo_name: The repo_name of this PushMirror. # noqa: E501 + :type: str + """ + + self._repo_name = repo_name + + @property + def sync_on_commit(self): + """Gets the sync_on_commit of this PushMirror. # noqa: E501 + + Whether to sync on every commit # noqa: E501 + + :return: The sync_on_commit of this PushMirror. # noqa: E501 + :rtype: bool + """ + return self._sync_on_commit + + @sync_on_commit.setter + def sync_on_commit(self, sync_on_commit): + """Sets the sync_on_commit of this PushMirror. + + Whether to sync on every commit # noqa: E501 + + :param sync_on_commit: The sync_on_commit of this PushMirror. # noqa: E501 + :type: bool + """ + + self._sync_on_commit = sync_on_commit + + 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(PushMirror, 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, PushMirror): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PushMirror): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/reaction.py b/swagger_client/models/reaction.py new file mode 100644 index 0000000..e473ef3 --- /dev/null +++ b/swagger_client/models/reaction.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Reaction(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', + 'created_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'content': 'content', + 'created_at': 'created_at', + 'user': 'user' + } + + def __init__(self, content=None, created_at=None, user=None, _configuration=None): # noqa: E501 + """Reaction - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._content = None + self._created_at = None + self._user = None + self.discriminator = None + + if content is not None: + self.content = content + if created_at is not None: + self.created_at = created_at + if user is not None: + self.user = user + + @property + def content(self): + """Gets the content of this Reaction. # noqa: E501 + + The reaction content (e.g., emoji or reaction type) # noqa: E501 + + :return: The content of this Reaction. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this Reaction. + + The reaction content (e.g., emoji or reaction type) # noqa: E501 + + :param content: The content of this Reaction. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def created_at(self): + """Gets the created_at of this Reaction. # noqa: E501 + + + :return: The created_at of this Reaction. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Reaction. + + + :param created_at: The created_at of this Reaction. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def user(self): + """Gets the user of this Reaction. # noqa: E501 + + + :return: The user of this Reaction. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Reaction. + + + :param user: The user of this Reaction. # noqa: E501 + :type: User + """ + + 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(Reaction, 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, Reaction): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Reaction): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/reference.py b/swagger_client/models/reference.py new file mode 100644 index 0000000..3d37862 --- /dev/null +++ b/swagger_client/models/reference.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Reference(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 = { + 'object': 'GitObject', + 'ref': 'str', + 'url': 'str' + } + + attribute_map = { + 'object': 'object', + 'ref': 'ref', + 'url': 'url' + } + + def __init__(self, object=None, ref=None, url=None, _configuration=None): # noqa: E501 + """Reference - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._object = None + self._ref = None + self._url = None + self.discriminator = None + + if object is not None: + self.object = object + if ref is not None: + self.ref = ref + if url is not None: + self.url = url + + @property + def object(self): + """Gets the object of this Reference. # noqa: E501 + + + :return: The object of this Reference. # noqa: E501 + :rtype: GitObject + """ + return self._object + + @object.setter + def object(self, object): + """Sets the object of this Reference. + + + :param object: The object of this Reference. # noqa: E501 + :type: GitObject + """ + + self._object = object + + @property + def ref(self): + """Gets the ref of this Reference. # noqa: E501 + + The name of the Git reference (e.g., refs/heads/main) # noqa: E501 + + :return: The ref of this Reference. # noqa: E501 + :rtype: str + """ + return self._ref + + @ref.setter + def ref(self, ref): + """Sets the ref of this Reference. + + The name of the Git reference (e.g., refs/heads/main) # noqa: E501 + + :param ref: The ref of this Reference. # noqa: E501 + :type: str + """ + + self._ref = ref + + @property + def url(self): + """Gets the url of this Reference. # noqa: E501 + + The URL to access this Git reference # noqa: E501 + + :return: The url of this Reference. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Reference. + + The URL to access this Git reference # noqa: E501 + + :param url: The url of this Reference. # 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(Reference, 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, Reference): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Reference): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/release.py b/swagger_client/models/release.py new file mode 100644 index 0000000..2b62eee --- /dev/null +++ b/swagger_client/models/release.py @@ -0,0 +1,539 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Release(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 = { + 'assets': 'list[Attachment]', + 'author': 'User', + 'body': 'str', + 'created_at': 'datetime', + 'draft': 'bool', + 'html_url': 'str', + 'id': 'int', + 'name': 'str', + 'prerelease': 'bool', + 'published_at': 'datetime', + 'tag_name': 'str', + 'tarball_url': 'str', + 'target_commitish': 'str', + 'upload_url': 'str', + 'url': 'str', + 'zipball_url': 'str' + } + + attribute_map = { + 'assets': 'assets', + 'author': 'author', + 'body': 'body', + 'created_at': 'created_at', + 'draft': 'draft', + 'html_url': 'html_url', + 'id': 'id', + 'name': 'name', + 'prerelease': 'prerelease', + 'published_at': 'published_at', + 'tag_name': 'tag_name', + 'tarball_url': 'tarball_url', + 'target_commitish': 'target_commitish', + 'upload_url': 'upload_url', + 'url': 'url', + 'zipball_url': 'zipball_url' + } + + def __init__(self, assets=None, author=None, body=None, created_at=None, draft=None, html_url=None, id=None, name=None, prerelease=None, published_at=None, tag_name=None, tarball_url=None, target_commitish=None, upload_url=None, url=None, zipball_url=None, _configuration=None): # noqa: E501 + """Release - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assets = None + self._author = None + self._body = None + self._created_at = None + self._draft = None + self._html_url = None + self._id = None + self._name = None + self._prerelease = None + self._published_at = None + self._tag_name = None + self._tarball_url = None + self._target_commitish = None + self._upload_url = None + self._url = None + self._zipball_url = None + self.discriminator = None + + if assets is not None: + self.assets = assets + if author is not None: + self.author = author + if body is not None: + self.body = body + if created_at is not None: + self.created_at = created_at + if draft is not None: + self.draft = draft + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if name is not None: + self.name = name + if prerelease is not None: + self.prerelease = prerelease + if published_at is not None: + self.published_at = published_at + if tag_name is not None: + self.tag_name = tag_name + if tarball_url is not None: + self.tarball_url = tarball_url + if target_commitish is not None: + self.target_commitish = target_commitish + if upload_url is not None: + self.upload_url = upload_url + if url is not None: + self.url = url + if zipball_url is not None: + self.zipball_url = zipball_url + + @property + def assets(self): + """Gets the assets of this Release. # noqa: E501 + + The files attached to the release # noqa: E501 + + :return: The assets of this Release. # noqa: E501 + :rtype: list[Attachment] + """ + return self._assets + + @assets.setter + def assets(self, assets): + """Sets the assets of this Release. + + The files attached to the release # noqa: E501 + + :param assets: The assets of this Release. # noqa: E501 + :type: list[Attachment] + """ + + self._assets = assets + + @property + def author(self): + """Gets the author of this Release. # noqa: E501 + + + :return: The author of this Release. # noqa: E501 + :rtype: User + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this Release. + + + :param author: The author of this Release. # noqa: E501 + :type: User + """ + + self._author = author + + @property + def body(self): + """Gets the body of this Release. # noqa: E501 + + The release notes or description # noqa: E501 + + :return: The body of this Release. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Release. + + The release notes or description # noqa: E501 + + :param body: The body of this Release. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def created_at(self): + """Gets the created_at of this Release. # noqa: E501 + + + :return: The created_at of this Release. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Release. + + + :param created_at: The created_at of this Release. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def draft(self): + """Gets the draft of this Release. # noqa: E501 + + Whether the release is a draft # noqa: E501 + + :return: The draft of this Release. # noqa: E501 + :rtype: bool + """ + return self._draft + + @draft.setter + def draft(self, draft): + """Sets the draft of this Release. + + Whether the release is a draft # noqa: E501 + + :param draft: The draft of this Release. # noqa: E501 + :type: bool + """ + + self._draft = draft + + @property + def html_url(self): + """Gets the html_url of this Release. # noqa: E501 + + The HTML URL to view the release # noqa: E501 + + :return: The html_url of this Release. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Release. + + The HTML URL to view the release # noqa: E501 + + :param html_url: The html_url of this Release. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Release. # noqa: E501 + + The unique identifier of the release # noqa: E501 + + :return: The id of this Release. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Release. + + The unique identifier of the release # noqa: E501 + + :param id: The id of this Release. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Release. # noqa: E501 + + The display title of the release # noqa: E501 + + :return: The name of this Release. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Release. + + The display title of the release # noqa: E501 + + :param name: The name of this Release. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def prerelease(self): + """Gets the prerelease of this Release. # noqa: E501 + + Whether the release is a prerelease # noqa: E501 + + :return: The prerelease of this Release. # noqa: E501 + :rtype: bool + """ + return self._prerelease + + @prerelease.setter + def prerelease(self, prerelease): + """Sets the prerelease of this Release. + + Whether the release is a prerelease # noqa: E501 + + :param prerelease: The prerelease of this Release. # noqa: E501 + :type: bool + """ + + self._prerelease = prerelease + + @property + def published_at(self): + """Gets the published_at of this Release. # noqa: E501 + + + :return: The published_at of this Release. # noqa: E501 + :rtype: datetime + """ + return self._published_at + + @published_at.setter + def published_at(self, published_at): + """Sets the published_at of this Release. + + + :param published_at: The published_at of this Release. # noqa: E501 + :type: datetime + """ + + self._published_at = published_at + + @property + def tag_name(self): + """Gets the tag_name of this Release. # noqa: E501 + + The name of the git tag associated with the release # noqa: E501 + + :return: The tag_name of this Release. # noqa: E501 + :rtype: str + """ + return self._tag_name + + @tag_name.setter + def tag_name(self, tag_name): + """Sets the tag_name of this Release. + + The name of the git tag associated with the release # noqa: E501 + + :param tag_name: The tag_name of this Release. # noqa: E501 + :type: str + """ + + self._tag_name = tag_name + + @property + def tarball_url(self): + """Gets the tarball_url of this Release. # noqa: E501 + + The URL to download the tarball archive # noqa: E501 + + :return: The tarball_url of this Release. # noqa: E501 + :rtype: str + """ + return self._tarball_url + + @tarball_url.setter + def tarball_url(self, tarball_url): + """Sets the tarball_url of this Release. + + The URL to download the tarball archive # noqa: E501 + + :param tarball_url: The tarball_url of this Release. # noqa: E501 + :type: str + """ + + self._tarball_url = tarball_url + + @property + def target_commitish(self): + """Gets the target_commitish of this Release. # noqa: E501 + + The target commitish for the release # noqa: E501 + + :return: The target_commitish of this Release. # noqa: E501 + :rtype: str + """ + return self._target_commitish + + @target_commitish.setter + def target_commitish(self, target_commitish): + """Sets the target_commitish of this Release. + + The target commitish for the release # noqa: E501 + + :param target_commitish: The target_commitish of this Release. # noqa: E501 + :type: str + """ + + self._target_commitish = target_commitish + + @property + def upload_url(self): + """Gets the upload_url of this Release. # noqa: E501 + + The URL template for uploading release assets # noqa: E501 + + :return: The upload_url of this Release. # noqa: E501 + :rtype: str + """ + return self._upload_url + + @upload_url.setter + def upload_url(self, upload_url): + """Sets the upload_url of this Release. + + The URL template for uploading release assets # noqa: E501 + + :param upload_url: The upload_url of this Release. # noqa: E501 + :type: str + """ + + self._upload_url = upload_url + + @property + def url(self): + """Gets the url of this Release. # noqa: E501 + + The API URL of the release # noqa: E501 + + :return: The url of this Release. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Release. + + The API URL of the release # noqa: E501 + + :param url: The url of this Release. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def zipball_url(self): + """Gets the zipball_url of this Release. # noqa: E501 + + The URL to download the zip archive # noqa: E501 + + :return: The zipball_url of this Release. # noqa: E501 + :rtype: str + """ + return self._zipball_url + + @zipball_url.setter + def zipball_url(self, zipball_url): + """Sets the zipball_url of this Release. + + The URL to download the zip archive # noqa: E501 + + :param zipball_url: The zipball_url of this Release. # noqa: E501 + :type: str + """ + + self._zipball_url = zipball_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(Release, 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, Release): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Release): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/rename_branch_repo_option.py b/swagger_client/models/rename_branch_repo_option.py new file mode 100644 index 0000000..d433239 --- /dev/null +++ b/swagger_client/models/rename_branch_repo_option.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class RenameBranchRepoOption(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, _configuration=None): # noqa: E501 + """RenameBranchRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self.discriminator = None + + self.name = name + + @property + def name(self): + """Gets the name of this RenameBranchRepoOption. # noqa: E501 + + New branch name # noqa: E501 + + :return: The name of this RenameBranchRepoOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this RenameBranchRepoOption. + + New branch name # noqa: E501 + + :param name: The name of this RenameBranchRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + 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(RenameBranchRepoOption, 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, RenameBranchRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RenameBranchRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/rename_org_option.py b/swagger_client/models/rename_org_option.py new file mode 100644 index 0000000..048ee61 --- /dev/null +++ b/swagger_client/models/rename_org_option.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class RenameOrgOption(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 = { + 'new_name': 'str' + } + + attribute_map = { + 'new_name': 'new_name' + } + + def __init__(self, new_name=None, _configuration=None): # noqa: E501 + """RenameOrgOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._new_name = None + self.discriminator = None + + self.new_name = new_name + + @property + def new_name(self): + """Gets the new_name of this RenameOrgOption. # noqa: E501 + + New username for this org. This name cannot be in use yet by any other user. # noqa: E501 + + :return: The new_name of this RenameOrgOption. # noqa: E501 + :rtype: str + """ + return self._new_name + + @new_name.setter + def new_name(self, new_name): + """Sets the new_name of this RenameOrgOption. + + New username for this org. This name cannot be in use yet by any other user. # noqa: E501 + + :param new_name: The new_name of this RenameOrgOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and new_name is None: + raise ValueError("Invalid value for `new_name`, must not be `None`") # noqa: E501 + + self._new_name = new_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(RenameOrgOption, 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, RenameOrgOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RenameOrgOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/rename_user_option.py b/swagger_client/models/rename_user_option.py new file mode 100644 index 0000000..c95591c --- /dev/null +++ b/swagger_client/models/rename_user_option.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class RenameUserOption(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 = { + 'new_username': 'str' + } + + attribute_map = { + 'new_username': 'new_username' + } + + def __init__(self, new_username=None, _configuration=None): # noqa: E501 + """RenameUserOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._new_username = None + self.discriminator = None + + self.new_username = new_username + + @property + def new_username(self): + """Gets the new_username of this RenameUserOption. # noqa: E501 + + New username for this user. This name cannot be in use yet by any other user. # noqa: E501 + + :return: The new_username of this RenameUserOption. # noqa: E501 + :rtype: str + """ + return self._new_username + + @new_username.setter + def new_username(self, new_username): + """Sets the new_username of this RenameUserOption. + + New username for this user. This name cannot be in use yet by any other user. # noqa: E501 + + :param new_username: The new_username of this RenameUserOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and new_username is None: + raise ValueError("Invalid value for `new_username`, must not be `None`") # noqa: E501 + + self._new_username = new_username + + 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(RenameUserOption, 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, RenameUserOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RenameUserOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/repo_collaborator_permission.py b/swagger_client/models/repo_collaborator_permission.py new file mode 100644 index 0000000..f8f6d00 --- /dev/null +++ b/swagger_client/models/repo_collaborator_permission.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class RepoCollaboratorPermission(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 = { + 'permission': 'str', + 'role_name': 'str', + 'user': 'User' + } + + attribute_map = { + 'permission': 'permission', + 'role_name': 'role_name', + 'user': 'user' + } + + def __init__(self, permission=None, role_name=None, user=None, _configuration=None): # noqa: E501 + """RepoCollaboratorPermission - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._permission = None + self._role_name = None + self._user = None + self.discriminator = None + + if permission is not None: + self.permission = permission + if role_name is not None: + self.role_name = role_name + if user is not None: + self.user = user + + @property + def permission(self): + """Gets the permission of this RepoCollaboratorPermission. # noqa: E501 + + Permission level of the collaborator # noqa: E501 + + :return: The permission of this RepoCollaboratorPermission. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this RepoCollaboratorPermission. + + Permission level of the collaborator # noqa: E501 + + :param permission: The permission of this RepoCollaboratorPermission. # noqa: E501 + :type: str + """ + + self._permission = permission + + @property + def role_name(self): + """Gets the role_name of this RepoCollaboratorPermission. # noqa: E501 + + RoleName is the name of the permission role # noqa: E501 + + :return: The role_name of this RepoCollaboratorPermission. # noqa: E501 + :rtype: str + """ + return self._role_name + + @role_name.setter + def role_name(self, role_name): + """Sets the role_name of this RepoCollaboratorPermission. + + RoleName is the name of the permission role # noqa: E501 + + :param role_name: The role_name of this RepoCollaboratorPermission. # noqa: E501 + :type: str + """ + + self._role_name = role_name + + @property + def user(self): + """Gets the user of this RepoCollaboratorPermission. # noqa: E501 + + + :return: The user of this RepoCollaboratorPermission. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this RepoCollaboratorPermission. + + + :param user: The user of this RepoCollaboratorPermission. # noqa: E501 + :type: User + """ + + 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(RepoCollaboratorPermission, 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, RepoCollaboratorPermission): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepoCollaboratorPermission): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/repo_commit.py b/swagger_client/models/repo_commit.py new file mode 100644 index 0000000..3bc5e1a --- /dev/null +++ b/swagger_client/models/repo_commit.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class RepoCommit(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 = { + 'author': 'CommitUser', + 'committer': 'CommitUser', + 'message': 'str', + 'tree': 'CommitMeta', + 'url': 'str', + 'verification': 'PayloadCommitVerification' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer', + 'message': 'message', + 'tree': 'tree', + 'url': 'url', + 'verification': 'verification' + } + + def __init__(self, author=None, committer=None, message=None, tree=None, url=None, verification=None, _configuration=None): # noqa: E501 + """RepoCommit - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._committer = None + self._message = None + self._tree = None + self._url = None + self._verification = None + self.discriminator = None + + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + if message is not None: + self.message = message + if tree is not None: + self.tree = tree + if url is not None: + self.url = url + if verification is not None: + self.verification = verification + + @property + def author(self): + """Gets the author of this RepoCommit. # noqa: E501 + + + :return: The author of this RepoCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this RepoCommit. + + + :param author: The author of this RepoCommit. # noqa: E501 + :type: CommitUser + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this RepoCommit. # noqa: E501 + + + :return: The committer of this RepoCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this RepoCommit. + + + :param committer: The committer of this RepoCommit. # noqa: E501 + :type: CommitUser + """ + + self._committer = committer + + @property + def message(self): + """Gets the message of this RepoCommit. # noqa: E501 + + Message is the commit message # noqa: E501 + + :return: The message of this RepoCommit. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this RepoCommit. + + Message is the commit message # noqa: E501 + + :param message: The message of this RepoCommit. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def tree(self): + """Gets the tree of this RepoCommit. # noqa: E501 + + + :return: The tree of this RepoCommit. # noqa: E501 + :rtype: CommitMeta + """ + return self._tree + + @tree.setter + def tree(self, tree): + """Sets the tree of this RepoCommit. + + + :param tree: The tree of this RepoCommit. # noqa: E501 + :type: CommitMeta + """ + + self._tree = tree + + @property + def url(self): + """Gets the url of this RepoCommit. # noqa: E501 + + URL is the API URL for the commit # noqa: E501 + + :return: The url of this RepoCommit. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this RepoCommit. + + URL is the API URL for the commit # noqa: E501 + + :param url: The url of this RepoCommit. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def verification(self): + """Gets the verification of this RepoCommit. # noqa: E501 + + + :return: The verification of this RepoCommit. # noqa: E501 + :rtype: PayloadCommitVerification + """ + return self._verification + + @verification.setter + def verification(self, verification): + """Sets the verification of this RepoCommit. + + + :param verification: The verification of this RepoCommit. # noqa: E501 + :type: PayloadCommitVerification + """ + + self._verification = verification + + 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(RepoCommit, 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, RepoCommit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepoCommit): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/repo_topic_options.py b/swagger_client/models/repo_topic_options.py new file mode 100644 index 0000000..0e7f8dc --- /dev/null +++ b/swagger_client/models/repo_topic_options.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class RepoTopicOptions(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 = { + 'topics': 'list[str]' + } + + attribute_map = { + 'topics': 'topics' + } + + def __init__(self, topics=None, _configuration=None): # noqa: E501 + """RepoTopicOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._topics = None + self.discriminator = None + + if topics is not None: + self.topics = topics + + @property + def topics(self): + """Gets the topics of this RepoTopicOptions. # noqa: E501 + + list of topic names # noqa: E501 + + :return: The topics of this RepoTopicOptions. # noqa: E501 + :rtype: list[str] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this RepoTopicOptions. + + list of topic names # noqa: E501 + + :param topics: The topics of this RepoTopicOptions. # noqa: E501 + :type: list[str] + """ + + self._topics = topics + + 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(RepoTopicOptions, 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, RepoTopicOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepoTopicOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/repo_transfer.py b/swagger_client/models/repo_transfer.py new file mode 100644 index 0000000..4faf7df --- /dev/null +++ b/swagger_client/models/repo_transfer.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class RepoTransfer(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 = { + 'doer': 'User', + 'recipient': 'User', + 'teams': 'list[Team]' + } + + attribute_map = { + 'doer': 'doer', + 'recipient': 'recipient', + 'teams': 'teams' + } + + def __init__(self, doer=None, recipient=None, teams=None, _configuration=None): # noqa: E501 + """RepoTransfer - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._doer = None + self._recipient = None + self._teams = None + self.discriminator = None + + if doer is not None: + self.doer = doer + if recipient is not None: + self.recipient = recipient + if teams is not None: + self.teams = teams + + @property + def doer(self): + """Gets the doer of this RepoTransfer. # noqa: E501 + + + :return: The doer of this RepoTransfer. # noqa: E501 + :rtype: User + """ + return self._doer + + @doer.setter + def doer(self, doer): + """Sets the doer of this RepoTransfer. + + + :param doer: The doer of this RepoTransfer. # noqa: E501 + :type: User + """ + + self._doer = doer + + @property + def recipient(self): + """Gets the recipient of this RepoTransfer. # noqa: E501 + + + :return: The recipient of this RepoTransfer. # noqa: E501 + :rtype: User + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """Sets the recipient of this RepoTransfer. + + + :param recipient: The recipient of this RepoTransfer. # noqa: E501 + :type: User + """ + + self._recipient = recipient + + @property + def teams(self): + """Gets the teams of this RepoTransfer. # noqa: E501 + + + :return: The teams of this RepoTransfer. # noqa: E501 + :rtype: list[Team] + """ + return self._teams + + @teams.setter + def teams(self, teams): + """Sets the teams of this RepoTransfer. + + + :param teams: The teams of this RepoTransfer. # noqa: E501 + :type: list[Team] + """ + + self._teams = teams + + 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(RepoTransfer, 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, RepoTransfer): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepoTransfer): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/repository.py b/swagger_client/models/repository.py new file mode 100644 index 0000000..c384c30 --- /dev/null +++ b/swagger_client/models/repository.py @@ -0,0 +1,1796 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Repository(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 = { + 'allow_fast_forward_only_merge': 'bool', + 'allow_manual_merge': 'bool', + 'allow_merge_commits': 'bool', + 'allow_rebase': 'bool', + 'allow_rebase_explicit': 'bool', + 'allow_rebase_update': 'bool', + 'allow_squash_merge': 'bool', + 'archived': 'bool', + 'archived_at': 'datetime', + 'autodetect_manual_merge': 'bool', + 'avatar_url': 'str', + 'clone_url': 'str', + 'created_at': 'datetime', + 'default_allow_maintainer_edit': 'bool', + 'default_branch': 'str', + 'default_delete_branch_after_merge': 'bool', + 'default_merge_style': 'str', + 'description': 'str', + 'empty': 'bool', + 'external_tracker': 'ExternalTracker', + 'external_wiki': 'ExternalWiki', + 'fork': 'bool', + 'forks_count': 'int', + 'full_name': 'str', + 'has_actions': 'bool', + 'has_code': 'bool', + 'has_issues': 'bool', + 'has_packages': 'bool', + 'has_projects': 'bool', + 'has_pull_requests': 'bool', + 'has_releases': 'bool', + 'has_wiki': 'bool', + 'html_url': 'str', + 'id': 'int', + 'ignore_whitespace_conflicts': 'bool', + 'internal': 'bool', + 'internal_tracker': 'InternalTracker', + 'language': 'str', + 'languages_url': 'str', + 'licenses': 'list[str]', + 'link': 'str', + 'mirror': 'bool', + 'mirror_interval': 'str', + 'mirror_updated': 'datetime', + 'name': 'str', + 'object_format_name': 'str', + 'open_issues_count': 'int', + 'open_pr_counter': 'int', + 'original_url': 'str', + 'owner': 'User', + 'parent': 'Repository', + 'permissions': 'Permission', + 'private': 'bool', + 'projects_mode': 'str', + 'release_counter': 'int', + 'repo_transfer': 'RepoTransfer', + 'size': 'int', + 'ssh_url': 'str', + 'stars_count': 'int', + 'template': 'bool', + 'topics': 'list[str]', + 'updated_at': 'datetime', + 'url': 'str', + 'watchers_count': 'int', + 'website': 'str' + } + + attribute_map = { + 'allow_fast_forward_only_merge': 'allow_fast_forward_only_merge', + 'allow_manual_merge': 'allow_manual_merge', + 'allow_merge_commits': 'allow_merge_commits', + 'allow_rebase': 'allow_rebase', + 'allow_rebase_explicit': 'allow_rebase_explicit', + 'allow_rebase_update': 'allow_rebase_update', + 'allow_squash_merge': 'allow_squash_merge', + 'archived': 'archived', + 'archived_at': 'archived_at', + 'autodetect_manual_merge': 'autodetect_manual_merge', + 'avatar_url': 'avatar_url', + 'clone_url': 'clone_url', + 'created_at': 'created_at', + 'default_allow_maintainer_edit': 'default_allow_maintainer_edit', + 'default_branch': 'default_branch', + 'default_delete_branch_after_merge': 'default_delete_branch_after_merge', + 'default_merge_style': 'default_merge_style', + 'description': 'description', + 'empty': 'empty', + 'external_tracker': 'external_tracker', + 'external_wiki': 'external_wiki', + 'fork': 'fork', + 'forks_count': 'forks_count', + 'full_name': 'full_name', + 'has_actions': 'has_actions', + 'has_code': 'has_code', + 'has_issues': 'has_issues', + 'has_packages': 'has_packages', + 'has_projects': 'has_projects', + 'has_pull_requests': 'has_pull_requests', + 'has_releases': 'has_releases', + 'has_wiki': 'has_wiki', + 'html_url': 'html_url', + 'id': 'id', + 'ignore_whitespace_conflicts': 'ignore_whitespace_conflicts', + 'internal': 'internal', + 'internal_tracker': 'internal_tracker', + 'language': 'language', + 'languages_url': 'languages_url', + 'licenses': 'licenses', + 'link': 'link', + 'mirror': 'mirror', + 'mirror_interval': 'mirror_interval', + 'mirror_updated': 'mirror_updated', + 'name': 'name', + 'object_format_name': 'object_format_name', + 'open_issues_count': 'open_issues_count', + 'open_pr_counter': 'open_pr_counter', + 'original_url': 'original_url', + 'owner': 'owner', + 'parent': 'parent', + 'permissions': 'permissions', + 'private': 'private', + 'projects_mode': 'projects_mode', + 'release_counter': 'release_counter', + 'repo_transfer': 'repo_transfer', + 'size': 'size', + 'ssh_url': 'ssh_url', + 'stars_count': 'stars_count', + 'template': 'template', + 'topics': 'topics', + 'updated_at': 'updated_at', + 'url': 'url', + 'watchers_count': 'watchers_count', + 'website': 'website' + } + + def __init__(self, allow_fast_forward_only_merge=None, allow_manual_merge=None, allow_merge_commits=None, allow_rebase=None, allow_rebase_explicit=None, allow_rebase_update=None, allow_squash_merge=None, archived=None, archived_at=None, autodetect_manual_merge=None, avatar_url=None, clone_url=None, created_at=None, default_allow_maintainer_edit=None, default_branch=None, default_delete_branch_after_merge=None, default_merge_style=None, description=None, empty=None, external_tracker=None, external_wiki=None, fork=None, forks_count=None, full_name=None, has_actions=None, has_code=None, has_issues=None, has_packages=None, has_projects=None, has_pull_requests=None, has_releases=None, has_wiki=None, html_url=None, id=None, ignore_whitespace_conflicts=None, internal=None, internal_tracker=None, language=None, languages_url=None, licenses=None, link=None, mirror=None, mirror_interval=None, mirror_updated=None, name=None, object_format_name=None, open_issues_count=None, open_pr_counter=None, original_url=None, owner=None, parent=None, permissions=None, private=None, projects_mode=None, release_counter=None, repo_transfer=None, size=None, ssh_url=None, stars_count=None, template=None, topics=None, updated_at=None, url=None, watchers_count=None, website=None, _configuration=None): # noqa: E501 + """Repository - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._allow_fast_forward_only_merge = None + self._allow_manual_merge = None + self._allow_merge_commits = None + self._allow_rebase = None + self._allow_rebase_explicit = None + self._allow_rebase_update = None + self._allow_squash_merge = None + self._archived = None + self._archived_at = None + self._autodetect_manual_merge = None + self._avatar_url = None + self._clone_url = None + self._created_at = None + self._default_allow_maintainer_edit = None + self._default_branch = None + self._default_delete_branch_after_merge = None + self._default_merge_style = None + self._description = None + self._empty = None + self._external_tracker = None + self._external_wiki = None + self._fork = None + self._forks_count = None + self._full_name = None + self._has_actions = None + self._has_code = None + self._has_issues = None + self._has_packages = None + self._has_projects = None + self._has_pull_requests = None + self._has_releases = None + self._has_wiki = None + self._html_url = None + self._id = None + self._ignore_whitespace_conflicts = None + self._internal = None + self._internal_tracker = None + self._language = None + self._languages_url = None + self._licenses = None + self._link = None + self._mirror = None + self._mirror_interval = None + self._mirror_updated = None + self._name = None + self._object_format_name = None + self._open_issues_count = None + self._open_pr_counter = None + self._original_url = None + self._owner = None + self._parent = None + self._permissions = None + self._private = None + self._projects_mode = None + self._release_counter = None + self._repo_transfer = None + self._size = None + self._ssh_url = None + self._stars_count = None + self._template = None + self._topics = None + self._updated_at = None + self._url = None + self._watchers_count = None + self._website = None + self.discriminator = None + + if allow_fast_forward_only_merge is not None: + self.allow_fast_forward_only_merge = allow_fast_forward_only_merge + if allow_manual_merge is not None: + self.allow_manual_merge = allow_manual_merge + if allow_merge_commits is not None: + self.allow_merge_commits = allow_merge_commits + if allow_rebase is not None: + self.allow_rebase = allow_rebase + if allow_rebase_explicit is not None: + self.allow_rebase_explicit = allow_rebase_explicit + if allow_rebase_update is not None: + self.allow_rebase_update = allow_rebase_update + if allow_squash_merge is not None: + self.allow_squash_merge = allow_squash_merge + if archived is not None: + self.archived = archived + if archived_at is not None: + self.archived_at = archived_at + if autodetect_manual_merge is not None: + self.autodetect_manual_merge = autodetect_manual_merge + if avatar_url is not None: + self.avatar_url = avatar_url + if clone_url is not None: + self.clone_url = clone_url + if created_at is not None: + self.created_at = created_at + if default_allow_maintainer_edit is not None: + self.default_allow_maintainer_edit = default_allow_maintainer_edit + if default_branch is not None: + self.default_branch = default_branch + if default_delete_branch_after_merge is not None: + self.default_delete_branch_after_merge = default_delete_branch_after_merge + if default_merge_style is not None: + self.default_merge_style = default_merge_style + if description is not None: + self.description = description + if empty is not None: + self.empty = empty + if external_tracker is not None: + self.external_tracker = external_tracker + if external_wiki is not None: + self.external_wiki = external_wiki + if fork is not None: + self.fork = fork + if forks_count is not None: + self.forks_count = forks_count + if full_name is not None: + self.full_name = full_name + if has_actions is not None: + self.has_actions = has_actions + if has_code is not None: + self.has_code = has_code + if has_issues is not None: + self.has_issues = has_issues + if has_packages is not None: + self.has_packages = has_packages + if has_projects is not None: + self.has_projects = has_projects + if has_pull_requests is not None: + self.has_pull_requests = has_pull_requests + if has_releases is not None: + self.has_releases = has_releases + if has_wiki is not None: + self.has_wiki = has_wiki + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if ignore_whitespace_conflicts is not None: + self.ignore_whitespace_conflicts = ignore_whitespace_conflicts + if internal is not None: + self.internal = internal + if internal_tracker is not None: + self.internal_tracker = internal_tracker + if language is not None: + self.language = language + if languages_url is not None: + self.languages_url = languages_url + if licenses is not None: + self.licenses = licenses + if link is not None: + self.link = link + if mirror is not None: + self.mirror = mirror + if mirror_interval is not None: + self.mirror_interval = mirror_interval + if mirror_updated is not None: + self.mirror_updated = mirror_updated + if name is not None: + self.name = name + if object_format_name is not None: + self.object_format_name = object_format_name + if open_issues_count is not None: + self.open_issues_count = open_issues_count + if open_pr_counter is not None: + self.open_pr_counter = open_pr_counter + if original_url is not None: + self.original_url = original_url + if owner is not None: + self.owner = owner + if parent is not None: + self.parent = parent + if permissions is not None: + self.permissions = permissions + if private is not None: + self.private = private + if projects_mode is not None: + self.projects_mode = projects_mode + if release_counter is not None: + self.release_counter = release_counter + if repo_transfer is not None: + self.repo_transfer = repo_transfer + if size is not None: + self.size = size + if ssh_url is not None: + self.ssh_url = ssh_url + if stars_count is not None: + self.stars_count = stars_count + if template is not None: + self.template = template + if topics is not None: + self.topics = topics + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + if watchers_count is not None: + self.watchers_count = watchers_count + if website is not None: + self.website = website + + @property + def allow_fast_forward_only_merge(self): + """Gets the allow_fast_forward_only_merge of this Repository. # noqa: E501 + + + :return: The allow_fast_forward_only_merge of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_fast_forward_only_merge + + @allow_fast_forward_only_merge.setter + def allow_fast_forward_only_merge(self, allow_fast_forward_only_merge): + """Sets the allow_fast_forward_only_merge of this Repository. + + + :param allow_fast_forward_only_merge: The allow_fast_forward_only_merge of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_fast_forward_only_merge = allow_fast_forward_only_merge + + @property + def allow_manual_merge(self): + """Gets the allow_manual_merge of this Repository. # noqa: E501 + + + :return: The allow_manual_merge of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_manual_merge + + @allow_manual_merge.setter + def allow_manual_merge(self, allow_manual_merge): + """Sets the allow_manual_merge of this Repository. + + + :param allow_manual_merge: The allow_manual_merge of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_manual_merge = allow_manual_merge + + @property + def allow_merge_commits(self): + """Gets the allow_merge_commits of this Repository. # noqa: E501 + + + :return: The allow_merge_commits of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_merge_commits + + @allow_merge_commits.setter + def allow_merge_commits(self, allow_merge_commits): + """Sets the allow_merge_commits of this Repository. + + + :param allow_merge_commits: The allow_merge_commits of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_merge_commits = allow_merge_commits + + @property + def allow_rebase(self): + """Gets the allow_rebase of this Repository. # noqa: E501 + + + :return: The allow_rebase of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase + + @allow_rebase.setter + def allow_rebase(self, allow_rebase): + """Sets the allow_rebase of this Repository. + + + :param allow_rebase: The allow_rebase of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_rebase = allow_rebase + + @property + def allow_rebase_explicit(self): + """Gets the allow_rebase_explicit of this Repository. # noqa: E501 + + + :return: The allow_rebase_explicit of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_explicit + + @allow_rebase_explicit.setter + def allow_rebase_explicit(self, allow_rebase_explicit): + """Sets the allow_rebase_explicit of this Repository. + + + :param allow_rebase_explicit: The allow_rebase_explicit of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_rebase_explicit = allow_rebase_explicit + + @property + def allow_rebase_update(self): + """Gets the allow_rebase_update of this Repository. # noqa: E501 + + + :return: The allow_rebase_update of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_rebase_update + + @allow_rebase_update.setter + def allow_rebase_update(self, allow_rebase_update): + """Sets the allow_rebase_update of this Repository. + + + :param allow_rebase_update: The allow_rebase_update of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_rebase_update = allow_rebase_update + + @property + def allow_squash_merge(self): + """Gets the allow_squash_merge of this Repository. # noqa: E501 + + + :return: The allow_squash_merge of this Repository. # noqa: E501 + :rtype: bool + """ + return self._allow_squash_merge + + @allow_squash_merge.setter + def allow_squash_merge(self, allow_squash_merge): + """Sets the allow_squash_merge of this Repository. + + + :param allow_squash_merge: The allow_squash_merge of this Repository. # noqa: E501 + :type: bool + """ + + self._allow_squash_merge = allow_squash_merge + + @property + def archived(self): + """Gets the archived of this Repository. # noqa: E501 + + + :return: The archived of this Repository. # noqa: E501 + :rtype: bool + """ + return self._archived + + @archived.setter + def archived(self, archived): + """Sets the archived of this Repository. + + + :param archived: The archived of this Repository. # noqa: E501 + :type: bool + """ + + self._archived = archived + + @property + def archived_at(self): + """Gets the archived_at of this Repository. # noqa: E501 + + + :return: The archived_at of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._archived_at + + @archived_at.setter + def archived_at(self, archived_at): + """Sets the archived_at of this Repository. + + + :param archived_at: The archived_at of this Repository. # noqa: E501 + :type: datetime + """ + + self._archived_at = archived_at + + @property + def autodetect_manual_merge(self): + """Gets the autodetect_manual_merge of this Repository. # noqa: E501 + + + :return: The autodetect_manual_merge of this Repository. # noqa: E501 + :rtype: bool + """ + return self._autodetect_manual_merge + + @autodetect_manual_merge.setter + def autodetect_manual_merge(self, autodetect_manual_merge): + """Sets the autodetect_manual_merge of this Repository. + + + :param autodetect_manual_merge: The autodetect_manual_merge of this Repository. # noqa: E501 + :type: bool + """ + + self._autodetect_manual_merge = autodetect_manual_merge + + @property + def avatar_url(self): + """Gets the avatar_url of this Repository. # noqa: E501 + + + :return: The avatar_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this Repository. + + + :param avatar_url: The avatar_url of this Repository. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def clone_url(self): + """Gets the clone_url of this Repository. # noqa: E501 + + + :return: The clone_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._clone_url + + @clone_url.setter + def clone_url(self, clone_url): + """Sets the clone_url of this Repository. + + + :param clone_url: The clone_url of this Repository. # noqa: E501 + :type: str + """ + + self._clone_url = clone_url + + @property + def created_at(self): + """Gets the created_at of this Repository. # noqa: E501 + + + :return: The created_at of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Repository. + + + :param created_at: The created_at of this Repository. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def default_allow_maintainer_edit(self): + """Gets the default_allow_maintainer_edit of this Repository. # noqa: E501 + + + :return: The default_allow_maintainer_edit of this Repository. # noqa: E501 + :rtype: bool + """ + return self._default_allow_maintainer_edit + + @default_allow_maintainer_edit.setter + def default_allow_maintainer_edit(self, default_allow_maintainer_edit): + """Sets the default_allow_maintainer_edit of this Repository. + + + :param default_allow_maintainer_edit: The default_allow_maintainer_edit of this Repository. # noqa: E501 + :type: bool + """ + + self._default_allow_maintainer_edit = default_allow_maintainer_edit + + @property + def default_branch(self): + """Gets the default_branch of this Repository. # noqa: E501 + + + :return: The default_branch of this Repository. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this Repository. + + + :param default_branch: The default_branch of this Repository. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + + @property + def default_delete_branch_after_merge(self): + """Gets the default_delete_branch_after_merge of this Repository. # noqa: E501 + + + :return: The default_delete_branch_after_merge of this Repository. # noqa: E501 + :rtype: bool + """ + return self._default_delete_branch_after_merge + + @default_delete_branch_after_merge.setter + def default_delete_branch_after_merge(self, default_delete_branch_after_merge): + """Sets the default_delete_branch_after_merge of this Repository. + + + :param default_delete_branch_after_merge: The default_delete_branch_after_merge of this Repository. # noqa: E501 + :type: bool + """ + + self._default_delete_branch_after_merge = default_delete_branch_after_merge + + @property + def default_merge_style(self): + """Gets the default_merge_style of this Repository. # noqa: E501 + + + :return: The default_merge_style of this Repository. # noqa: E501 + :rtype: str + """ + return self._default_merge_style + + @default_merge_style.setter + def default_merge_style(self, default_merge_style): + """Sets the default_merge_style of this Repository. + + + :param default_merge_style: The default_merge_style of this Repository. # noqa: E501 + :type: str + """ + + self._default_merge_style = default_merge_style + + @property + def description(self): + """Gets the description of this Repository. # noqa: E501 + + + :return: The description of this Repository. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Repository. + + + :param description: The description of this Repository. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def empty(self): + """Gets the empty of this Repository. # noqa: E501 + + + :return: The empty of this Repository. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this Repository. + + + :param empty: The empty of this Repository. # noqa: E501 + :type: bool + """ + + self._empty = empty + + @property + def external_tracker(self): + """Gets the external_tracker of this Repository. # noqa: E501 + + + :return: The external_tracker of this Repository. # noqa: E501 + :rtype: ExternalTracker + """ + return self._external_tracker + + @external_tracker.setter + def external_tracker(self, external_tracker): + """Sets the external_tracker of this Repository. + + + :param external_tracker: The external_tracker of this Repository. # noqa: E501 + :type: ExternalTracker + """ + + self._external_tracker = external_tracker + + @property + def external_wiki(self): + """Gets the external_wiki of this Repository. # noqa: E501 + + + :return: The external_wiki of this Repository. # noqa: E501 + :rtype: ExternalWiki + """ + return self._external_wiki + + @external_wiki.setter + def external_wiki(self, external_wiki): + """Sets the external_wiki of this Repository. + + + :param external_wiki: The external_wiki of this Repository. # noqa: E501 + :type: ExternalWiki + """ + + self._external_wiki = external_wiki + + @property + def fork(self): + """Gets the fork of this Repository. # noqa: E501 + + + :return: The fork of this Repository. # noqa: E501 + :rtype: bool + """ + return self._fork + + @fork.setter + def fork(self, fork): + """Sets the fork of this Repository. + + + :param fork: The fork of this Repository. # noqa: E501 + :type: bool + """ + + self._fork = fork + + @property + def forks_count(self): + """Gets the forks_count of this Repository. # noqa: E501 + + + :return: The forks_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._forks_count + + @forks_count.setter + def forks_count(self, forks_count): + """Sets the forks_count of this Repository. + + + :param forks_count: The forks_count of this Repository. # noqa: E501 + :type: int + """ + + self._forks_count = forks_count + + @property + def full_name(self): + """Gets the full_name of this Repository. # noqa: E501 + + + :return: The full_name of this Repository. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this Repository. + + + :param full_name: The full_name of this Repository. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def has_actions(self): + """Gets the has_actions of this Repository. # noqa: E501 + + + :return: The has_actions of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_actions + + @has_actions.setter + def has_actions(self, has_actions): + """Sets the has_actions of this Repository. + + + :param has_actions: The has_actions of this Repository. # noqa: E501 + :type: bool + """ + + self._has_actions = has_actions + + @property + def has_code(self): + """Gets the has_code of this Repository. # noqa: E501 + + + :return: The has_code of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_code + + @has_code.setter + def has_code(self, has_code): + """Sets the has_code of this Repository. + + + :param has_code: The has_code of this Repository. # noqa: E501 + :type: bool + """ + + self._has_code = has_code + + @property + def has_issues(self): + """Gets the has_issues of this Repository. # noqa: E501 + + + :return: The has_issues of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_issues + + @has_issues.setter + def has_issues(self, has_issues): + """Sets the has_issues of this Repository. + + + :param has_issues: The has_issues of this Repository. # noqa: E501 + :type: bool + """ + + self._has_issues = has_issues + + @property + def has_packages(self): + """Gets the has_packages of this Repository. # noqa: E501 + + + :return: The has_packages of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_packages + + @has_packages.setter + def has_packages(self, has_packages): + """Sets the has_packages of this Repository. + + + :param has_packages: The has_packages of this Repository. # noqa: E501 + :type: bool + """ + + self._has_packages = has_packages + + @property + def has_projects(self): + """Gets the has_projects of this Repository. # noqa: E501 + + + :return: The has_projects of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_projects + + @has_projects.setter + def has_projects(self, has_projects): + """Sets the has_projects of this Repository. + + + :param has_projects: The has_projects of this Repository. # noqa: E501 + :type: bool + """ + + self._has_projects = has_projects + + @property + def has_pull_requests(self): + """Gets the has_pull_requests of this Repository. # noqa: E501 + + + :return: The has_pull_requests of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_pull_requests + + @has_pull_requests.setter + def has_pull_requests(self, has_pull_requests): + """Sets the has_pull_requests of this Repository. + + + :param has_pull_requests: The has_pull_requests of this Repository. # noqa: E501 + :type: bool + """ + + self._has_pull_requests = has_pull_requests + + @property + def has_releases(self): + """Gets the has_releases of this Repository. # noqa: E501 + + + :return: The has_releases of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_releases + + @has_releases.setter + def has_releases(self, has_releases): + """Sets the has_releases of this Repository. + + + :param has_releases: The has_releases of this Repository. # noqa: E501 + :type: bool + """ + + self._has_releases = has_releases + + @property + def has_wiki(self): + """Gets the has_wiki of this Repository. # noqa: E501 + + + :return: The has_wiki of this Repository. # noqa: E501 + :rtype: bool + """ + return self._has_wiki + + @has_wiki.setter + def has_wiki(self, has_wiki): + """Sets the has_wiki of this Repository. + + + :param has_wiki: The has_wiki of this Repository. # noqa: E501 + :type: bool + """ + + self._has_wiki = has_wiki + + @property + def html_url(self): + """Gets the html_url of this Repository. # noqa: E501 + + + :return: The html_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Repository. + + + :param html_url: The html_url of this Repository. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this Repository. # noqa: E501 + + + :return: The id of this Repository. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Repository. + + + :param id: The id of this Repository. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def ignore_whitespace_conflicts(self): + """Gets the ignore_whitespace_conflicts of this Repository. # noqa: E501 + + + :return: The ignore_whitespace_conflicts of this Repository. # noqa: E501 + :rtype: bool + """ + return self._ignore_whitespace_conflicts + + @ignore_whitespace_conflicts.setter + def ignore_whitespace_conflicts(self, ignore_whitespace_conflicts): + """Sets the ignore_whitespace_conflicts of this Repository. + + + :param ignore_whitespace_conflicts: The ignore_whitespace_conflicts of this Repository. # noqa: E501 + :type: bool + """ + + self._ignore_whitespace_conflicts = ignore_whitespace_conflicts + + @property + def internal(self): + """Gets the internal of this Repository. # noqa: E501 + + + :return: The internal of this Repository. # noqa: E501 + :rtype: bool + """ + return self._internal + + @internal.setter + def internal(self, internal): + """Sets the internal of this Repository. + + + :param internal: The internal of this Repository. # noqa: E501 + :type: bool + """ + + self._internal = internal + + @property + def internal_tracker(self): + """Gets the internal_tracker of this Repository. # noqa: E501 + + + :return: The internal_tracker of this Repository. # noqa: E501 + :rtype: InternalTracker + """ + return self._internal_tracker + + @internal_tracker.setter + def internal_tracker(self, internal_tracker): + """Sets the internal_tracker of this Repository. + + + :param internal_tracker: The internal_tracker of this Repository. # noqa: E501 + :type: InternalTracker + """ + + self._internal_tracker = internal_tracker + + @property + def language(self): + """Gets the language of this Repository. # noqa: E501 + + + :return: The language of this Repository. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this Repository. + + + :param language: The language of this Repository. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def languages_url(self): + """Gets the languages_url of this Repository. # noqa: E501 + + + :return: The languages_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._languages_url + + @languages_url.setter + def languages_url(self, languages_url): + """Sets the languages_url of this Repository. + + + :param languages_url: The languages_url of this Repository. # noqa: E501 + :type: str + """ + + self._languages_url = languages_url + + @property + def licenses(self): + """Gets the licenses of this Repository. # noqa: E501 + + + :return: The licenses of this Repository. # noqa: E501 + :rtype: list[str] + """ + return self._licenses + + @licenses.setter + def licenses(self, licenses): + """Sets the licenses of this Repository. + + + :param licenses: The licenses of this Repository. # noqa: E501 + :type: list[str] + """ + + self._licenses = licenses + + @property + def link(self): + """Gets the link of this Repository. # noqa: E501 + + + :return: The link of this Repository. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this Repository. + + + :param link: The link of this Repository. # noqa: E501 + :type: str + """ + + self._link = link + + @property + def mirror(self): + """Gets the mirror of this Repository. # noqa: E501 + + + :return: The mirror of this Repository. # noqa: E501 + :rtype: bool + """ + return self._mirror + + @mirror.setter + def mirror(self, mirror): + """Sets the mirror of this Repository. + + + :param mirror: The mirror of this Repository. # noqa: E501 + :type: bool + """ + + self._mirror = mirror + + @property + def mirror_interval(self): + """Gets the mirror_interval of this Repository. # noqa: E501 + + + :return: The mirror_interval of this Repository. # noqa: E501 + :rtype: str + """ + return self._mirror_interval + + @mirror_interval.setter + def mirror_interval(self, mirror_interval): + """Sets the mirror_interval of this Repository. + + + :param mirror_interval: The mirror_interval of this Repository. # noqa: E501 + :type: str + """ + + self._mirror_interval = mirror_interval + + @property + def mirror_updated(self): + """Gets the mirror_updated of this Repository. # noqa: E501 + + + :return: The mirror_updated of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._mirror_updated + + @mirror_updated.setter + def mirror_updated(self, mirror_updated): + """Sets the mirror_updated of this Repository. + + + :param mirror_updated: The mirror_updated of this Repository. # noqa: E501 + :type: datetime + """ + + self._mirror_updated = mirror_updated + + @property + def name(self): + """Gets the name of this Repository. # noqa: E501 + + + :return: The name of this Repository. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Repository. + + + :param name: The name of this Repository. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def object_format_name(self): + """Gets the object_format_name of this Repository. # noqa: E501 + + ObjectFormatName of the underlying git repository # noqa: E501 + + :return: The object_format_name of this Repository. # noqa: E501 + :rtype: str + """ + return self._object_format_name + + @object_format_name.setter + def object_format_name(self, object_format_name): + """Sets the object_format_name of this Repository. + + ObjectFormatName of the underlying git repository # noqa: E501 + + :param object_format_name: The object_format_name of this Repository. # noqa: E501 + :type: str + """ + allowed_values = ["sha1", "sha256"] # noqa: E501 + if (self._configuration.client_side_validation and + object_format_name not in allowed_values): + raise ValueError( + "Invalid value for `object_format_name` ({0}), must be one of {1}" # noqa: E501 + .format(object_format_name, allowed_values) + ) + + self._object_format_name = object_format_name + + @property + def open_issues_count(self): + """Gets the open_issues_count of this Repository. # noqa: E501 + + + :return: The open_issues_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._open_issues_count + + @open_issues_count.setter + def open_issues_count(self, open_issues_count): + """Sets the open_issues_count of this Repository. + + + :param open_issues_count: The open_issues_count of this Repository. # noqa: E501 + :type: int + """ + + self._open_issues_count = open_issues_count + + @property + def open_pr_counter(self): + """Gets the open_pr_counter of this Repository. # noqa: E501 + + + :return: The open_pr_counter of this Repository. # noqa: E501 + :rtype: int + """ + return self._open_pr_counter + + @open_pr_counter.setter + def open_pr_counter(self, open_pr_counter): + """Sets the open_pr_counter of this Repository. + + + :param open_pr_counter: The open_pr_counter of this Repository. # noqa: E501 + :type: int + """ + + self._open_pr_counter = open_pr_counter + + @property + def original_url(self): + """Gets the original_url of this Repository. # noqa: E501 + + + :return: The original_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._original_url + + @original_url.setter + def original_url(self, original_url): + """Sets the original_url of this Repository. + + + :param original_url: The original_url of this Repository. # noqa: E501 + :type: str + """ + + self._original_url = original_url + + @property + def owner(self): + """Gets the owner of this Repository. # noqa: E501 + + + :return: The owner of this Repository. # noqa: E501 + :rtype: User + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this Repository. + + + :param owner: The owner of this Repository. # noqa: E501 + :type: User + """ + + self._owner = owner + + @property + def parent(self): + """Gets the parent of this Repository. # noqa: E501 + + + :return: The parent of this Repository. # noqa: E501 + :rtype: Repository + """ + return self._parent + + @parent.setter + def parent(self, parent): + """Sets the parent of this Repository. + + + :param parent: The parent of this Repository. # noqa: E501 + :type: Repository + """ + + self._parent = parent + + @property + def permissions(self): + """Gets the permissions of this Repository. # noqa: E501 + + + :return: The permissions of this Repository. # noqa: E501 + :rtype: Permission + """ + return self._permissions + + @permissions.setter + def permissions(self, permissions): + """Sets the permissions of this Repository. + + + :param permissions: The permissions of this Repository. # noqa: E501 + :type: Permission + """ + + self._permissions = permissions + + @property + def private(self): + """Gets the private of this Repository. # noqa: E501 + + + :return: The private of this Repository. # noqa: E501 + :rtype: bool + """ + return self._private + + @private.setter + def private(self, private): + """Sets the private of this Repository. + + + :param private: The private of this Repository. # noqa: E501 + :type: bool + """ + + self._private = private + + @property + def projects_mode(self): + """Gets the projects_mode of this Repository. # noqa: E501 + + + :return: The projects_mode of this Repository. # noqa: E501 + :rtype: str + """ + return self._projects_mode + + @projects_mode.setter + def projects_mode(self, projects_mode): + """Sets the projects_mode of this Repository. + + + :param projects_mode: The projects_mode of this Repository. # noqa: E501 + :type: str + """ + + self._projects_mode = projects_mode + + @property + def release_counter(self): + """Gets the release_counter of this Repository. # noqa: E501 + + + :return: The release_counter of this Repository. # noqa: E501 + :rtype: int + """ + return self._release_counter + + @release_counter.setter + def release_counter(self, release_counter): + """Sets the release_counter of this Repository. + + + :param release_counter: The release_counter of this Repository. # noqa: E501 + :type: int + """ + + self._release_counter = release_counter + + @property + def repo_transfer(self): + """Gets the repo_transfer of this Repository. # noqa: E501 + + + :return: The repo_transfer of this Repository. # noqa: E501 + :rtype: RepoTransfer + """ + return self._repo_transfer + + @repo_transfer.setter + def repo_transfer(self, repo_transfer): + """Sets the repo_transfer of this Repository. + + + :param repo_transfer: The repo_transfer of this Repository. # noqa: E501 + :type: RepoTransfer + """ + + self._repo_transfer = repo_transfer + + @property + def size(self): + """Gets the size of this Repository. # noqa: E501 + + + :return: The size of this Repository. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this Repository. + + + :param size: The size of this Repository. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def ssh_url(self): + """Gets the ssh_url of this Repository. # noqa: E501 + + + :return: The ssh_url of this Repository. # noqa: E501 + :rtype: str + """ + return self._ssh_url + + @ssh_url.setter + def ssh_url(self, ssh_url): + """Sets the ssh_url of this Repository. + + + :param ssh_url: The ssh_url of this Repository. # noqa: E501 + :type: str + """ + + self._ssh_url = ssh_url + + @property + def stars_count(self): + """Gets the stars_count of this Repository. # noqa: E501 + + + :return: The stars_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._stars_count + + @stars_count.setter + def stars_count(self, stars_count): + """Sets the stars_count of this Repository. + + + :param stars_count: The stars_count of this Repository. # noqa: E501 + :type: int + """ + + self._stars_count = stars_count + + @property + def template(self): + """Gets the template of this Repository. # noqa: E501 + + + :return: The template of this Repository. # noqa: E501 + :rtype: bool + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this Repository. + + + :param template: The template of this Repository. # noqa: E501 + :type: bool + """ + + self._template = template + + @property + def topics(self): + """Gets the topics of this Repository. # noqa: E501 + + + :return: The topics of this Repository. # noqa: E501 + :rtype: list[str] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this Repository. + + + :param topics: The topics of this Repository. # noqa: E501 + :type: list[str] + """ + + self._topics = topics + + @property + def updated_at(self): + """Gets the updated_at of this Repository. # noqa: E501 + + + :return: The updated_at of this Repository. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Repository. + + + :param updated_at: The updated_at of this Repository. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this Repository. # noqa: E501 + + + :return: The url of this Repository. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Repository. + + + :param url: The url of this Repository. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def watchers_count(self): + """Gets the watchers_count of this Repository. # noqa: E501 + + + :return: The watchers_count of this Repository. # noqa: E501 + :rtype: int + """ + return self._watchers_count + + @watchers_count.setter + def watchers_count(self, watchers_count): + """Sets the watchers_count of this Repository. + + + :param watchers_count: The watchers_count of this Repository. # noqa: E501 + :type: int + """ + + self._watchers_count = watchers_count + + @property + def website(self): + """Gets the website of this Repository. # noqa: E501 + + + :return: The website of this Repository. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this Repository. + + + :param website: The website of this Repository. # noqa: E501 + :type: str + """ + + self._website = website + + 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(Repository, 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, Repository): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Repository): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/repository_meta.py b/swagger_client/models/repository_meta.py new file mode 100644 index 0000000..1db7e27 --- /dev/null +++ b/swagger_client/models/repository_meta.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class RepositoryMeta(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 = { + 'full_name': 'str', + 'id': 'int', + 'name': 'str', + 'owner': 'str' + } + + attribute_map = { + 'full_name': 'full_name', + 'id': 'id', + 'name': 'name', + 'owner': 'owner' + } + + def __init__(self, full_name=None, id=None, name=None, owner=None, _configuration=None): # noqa: E501 + """RepositoryMeta - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._full_name = None + self._id = None + self._name = None + self._owner = None + self.discriminator = None + + if full_name is not None: + self.full_name = full_name + if id is not None: + self.id = id + if name is not None: + self.name = name + if owner is not None: + self.owner = owner + + @property + def full_name(self): + """Gets the full_name of this RepositoryMeta. # noqa: E501 + + + :return: The full_name of this RepositoryMeta. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this RepositoryMeta. + + + :param full_name: The full_name of this RepositoryMeta. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def id(self): + """Gets the id of this RepositoryMeta. # noqa: E501 + + + :return: The id of this RepositoryMeta. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this RepositoryMeta. + + + :param id: The id of this RepositoryMeta. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this RepositoryMeta. # noqa: E501 + + + :return: The name of this RepositoryMeta. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this RepositoryMeta. + + + :param name: The name of this RepositoryMeta. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def owner(self): + """Gets the owner of this RepositoryMeta. # noqa: E501 + + + :return: The owner of this RepositoryMeta. # noqa: E501 + :rtype: str + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this RepositoryMeta. + + + :param owner: The owner of this RepositoryMeta. # noqa: E501 + :type: str + """ + + self._owner = owner + + 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(RepositoryMeta, 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, RepositoryMeta): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RepositoryMeta): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/review_state_type.py b/swagger_client/models/review_state_type.py new file mode 100644 index 0000000..3bf1eba --- /dev/null +++ b/swagger_client/models/review_state_type.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ReviewStateType(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, _configuration=None): # noqa: E501 + """ReviewStateType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(ReviewStateType, 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, ReviewStateType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReviewStateType): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/search_results.py b/swagger_client/models/search_results.py new file mode 100644 index 0000000..ff1220d --- /dev/null +++ b/swagger_client/models/search_results.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class SearchResults(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 = { + 'data': 'list[Repository]', + 'ok': 'bool' + } + + attribute_map = { + 'data': 'data', + 'ok': 'ok' + } + + def __init__(self, data=None, ok=None, _configuration=None): # noqa: E501 + """SearchResults - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data = None + self._ok = None + self.discriminator = None + + if data is not None: + self.data = data + if ok is not None: + self.ok = ok + + @property + def data(self): + """Gets the data of this SearchResults. # noqa: E501 + + Data contains the repository search results # noqa: E501 + + :return: The data of this SearchResults. # noqa: E501 + :rtype: list[Repository] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this SearchResults. + + Data contains the repository search results # noqa: E501 + + :param data: The data of this SearchResults. # noqa: E501 + :type: list[Repository] + """ + + self._data = data + + @property + def ok(self): + """Gets the ok of this SearchResults. # noqa: E501 + + OK indicates if the search was successful # noqa: E501 + + :return: The ok of this SearchResults. # noqa: E501 + :rtype: bool + """ + return self._ok + + @ok.setter + def ok(self, ok): + """Sets the ok of this SearchResults. + + OK indicates if the search was successful # noqa: E501 + + :param ok: The ok of this SearchResults. # noqa: E501 + :type: bool + """ + + self._ok = ok + + 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(SearchResults, 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, SearchResults): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SearchResults): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/secret.py b/swagger_client/models/secret.py new file mode 100644 index 0000000..da6a200 --- /dev/null +++ b/swagger_client/models/secret.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Secret(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 = { + 'created_at': 'datetime', + 'description': 'str', + 'name': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'description': 'description', + 'name': 'name' + } + + def __init__(self, created_at=None, description=None, name=None, _configuration=None): # noqa: E501 + """Secret - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._description = None + self._name = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if description is not None: + self.description = description + if name is not None: + self.name = name + + @property + def created_at(self): + """Gets the created_at of this Secret. # noqa: E501 + + + :return: The created_at of this Secret. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Secret. + + + :param created_at: The created_at of this Secret. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def description(self): + """Gets the description of this Secret. # noqa: E501 + + the secret's description # noqa: E501 + + :return: The description of this Secret. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Secret. + + the secret's description # noqa: E501 + + :param description: The description of this Secret. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this Secret. # noqa: E501 + + the secret's name # noqa: E501 + + :return: The name of this Secret. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Secret. + + the secret's name # noqa: E501 + + :param name: The name of this Secret. # 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(Secret, 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, Secret): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Secret): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/server_version.py b/swagger_client/models/server_version.py new file mode 100644 index 0000000..c9544f7 --- /dev/null +++ b/swagger_client/models/server_version.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class ServerVersion(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, _configuration=None): # noqa: E501 + """ServerVersion - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._version = None + self.discriminator = None + + if version is not None: + self.version = version + + @property + def version(self): + """Gets the version of this ServerVersion. # noqa: E501 + + Version is the server version string # noqa: E501 + + :return: The version of this ServerVersion. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this ServerVersion. + + Version is the server version string # noqa: E501 + + :param version: The version of this ServerVersion. # 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(ServerVersion, 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, ServerVersion): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ServerVersion): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/state_type.py b/swagger_client/models/state_type.py new file mode 100644 index 0000000..b5079fc --- /dev/null +++ b/swagger_client/models/state_type.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class StateType(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, _configuration=None): # noqa: E501 + """StateType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(StateType, 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, StateType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StateType): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/stop_watch.py b/swagger_client/models/stop_watch.py new file mode 100644 index 0000000..c462694 --- /dev/null +++ b/swagger_client/models/stop_watch.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class StopWatch(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 = { + 'created': 'datetime', + 'duration': 'str', + 'issue_index': 'int', + 'issue_title': 'str', + 'repo_name': 'str', + 'repo_owner_name': 'str', + 'seconds': 'int' + } + + attribute_map = { + 'created': 'created', + 'duration': 'duration', + 'issue_index': 'issue_index', + 'issue_title': 'issue_title', + 'repo_name': 'repo_name', + 'repo_owner_name': 'repo_owner_name', + 'seconds': 'seconds' + } + + def __init__(self, created=None, duration=None, issue_index=None, issue_title=None, repo_name=None, repo_owner_name=None, seconds=None, _configuration=None): # noqa: E501 + """StopWatch - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._duration = None + self._issue_index = None + self._issue_title = None + self._repo_name = None + self._repo_owner_name = None + self._seconds = None + self.discriminator = None + + if created is not None: + self.created = created + if duration is not None: + self.duration = duration + if issue_index is not None: + self.issue_index = issue_index + if issue_title is not None: + self.issue_title = issue_title + if repo_name is not None: + self.repo_name = repo_name + if repo_owner_name is not None: + self.repo_owner_name = repo_owner_name + if seconds is not None: + self.seconds = seconds + + @property + def created(self): + """Gets the created of this StopWatch. # noqa: E501 + + + :return: The created of this StopWatch. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this StopWatch. + + + :param created: The created of this StopWatch. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def duration(self): + """Gets the duration of this StopWatch. # noqa: E501 + + Duration is a human-readable duration string # noqa: E501 + + :return: The duration of this StopWatch. # noqa: E501 + :rtype: str + """ + return self._duration + + @duration.setter + def duration(self, duration): + """Sets the duration of this StopWatch. + + Duration is a human-readable duration string # noqa: E501 + + :param duration: The duration of this StopWatch. # noqa: E501 + :type: str + """ + + self._duration = duration + + @property + def issue_index(self): + """Gets the issue_index of this StopWatch. # noqa: E501 + + IssueIndex is the index number of the associated issue # noqa: E501 + + :return: The issue_index of this StopWatch. # noqa: E501 + :rtype: int + """ + return self._issue_index + + @issue_index.setter + def issue_index(self, issue_index): + """Sets the issue_index of this StopWatch. + + IssueIndex is the index number of the associated issue # noqa: E501 + + :param issue_index: The issue_index of this StopWatch. # noqa: E501 + :type: int + """ + + self._issue_index = issue_index + + @property + def issue_title(self): + """Gets the issue_title of this StopWatch. # noqa: E501 + + IssueTitle is the title of the associated issue # noqa: E501 + + :return: The issue_title of this StopWatch. # noqa: E501 + :rtype: str + """ + return self._issue_title + + @issue_title.setter + def issue_title(self, issue_title): + """Sets the issue_title of this StopWatch. + + IssueTitle is the title of the associated issue # noqa: E501 + + :param issue_title: The issue_title of this StopWatch. # noqa: E501 + :type: str + """ + + self._issue_title = issue_title + + @property + def repo_name(self): + """Gets the repo_name of this StopWatch. # noqa: E501 + + RepoName is the name of the repository # noqa: E501 + + :return: The repo_name of this StopWatch. # noqa: E501 + :rtype: str + """ + return self._repo_name + + @repo_name.setter + def repo_name(self, repo_name): + """Sets the repo_name of this StopWatch. + + RepoName is the name of the repository # noqa: E501 + + :param repo_name: The repo_name of this StopWatch. # noqa: E501 + :type: str + """ + + self._repo_name = repo_name + + @property + def repo_owner_name(self): + """Gets the repo_owner_name of this StopWatch. # noqa: E501 + + RepoOwnerName is the name of the repository owner # noqa: E501 + + :return: The repo_owner_name of this StopWatch. # noqa: E501 + :rtype: str + """ + return self._repo_owner_name + + @repo_owner_name.setter + def repo_owner_name(self, repo_owner_name): + """Sets the repo_owner_name of this StopWatch. + + RepoOwnerName is the name of the repository owner # noqa: E501 + + :param repo_owner_name: The repo_owner_name of this StopWatch. # noqa: E501 + :type: str + """ + + self._repo_owner_name = repo_owner_name + + @property + def seconds(self): + """Gets the seconds of this StopWatch. # noqa: E501 + + Seconds is the total elapsed time in seconds # noqa: E501 + + :return: The seconds of this StopWatch. # noqa: E501 + :rtype: int + """ + return self._seconds + + @seconds.setter + def seconds(self, seconds): + """Sets the seconds of this StopWatch. + + Seconds is the total elapsed time in seconds # noqa: E501 + + :param seconds: The seconds of this StopWatch. # noqa: E501 + :type: int + """ + + self._seconds = seconds + + 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(StopWatch, 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, StopWatch): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StopWatch): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/submit_pull_review_options.py b/swagger_client/models/submit_pull_review_options.py new file mode 100644 index 0000000..1585316 --- /dev/null +++ b/swagger_client/models/submit_pull_review_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class SubmitPullReviewOptions(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 = { + 'body': 'str', + 'event': 'ReviewStateType' + } + + attribute_map = { + 'body': 'body', + 'event': 'event' + } + + def __init__(self, body=None, event=None, _configuration=None): # noqa: E501 + """SubmitPullReviewOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._body = None + self._event = None + self.discriminator = None + + if body is not None: + self.body = body + if event is not None: + self.event = event + + @property + def body(self): + """Gets the body of this SubmitPullReviewOptions. # noqa: E501 + + + :return: The body of this SubmitPullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SubmitPullReviewOptions. + + + :param body: The body of this SubmitPullReviewOptions. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def event(self): + """Gets the event of this SubmitPullReviewOptions. # noqa: E501 + + + :return: The event of this SubmitPullReviewOptions. # noqa: E501 + :rtype: ReviewStateType + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this SubmitPullReviewOptions. + + + :param event: The event of this SubmitPullReviewOptions. # noqa: E501 + :type: ReviewStateType + """ + + self._event = event + + 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(SubmitPullReviewOptions, 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, SubmitPullReviewOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SubmitPullReviewOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/tag.py b/swagger_client/models/tag.py new file mode 100644 index 0000000..c855fc3 --- /dev/null +++ b/swagger_client/models/tag.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Tag(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 = { + 'commit': 'CommitMeta', + 'id': 'str', + 'message': 'str', + 'name': 'str', + 'tarball_url': 'str', + 'zipball_url': 'str' + } + + attribute_map = { + 'commit': 'commit', + 'id': 'id', + 'message': 'message', + 'name': 'name', + 'tarball_url': 'tarball_url', + 'zipball_url': 'zipball_url' + } + + def __init__(self, commit=None, id=None, message=None, name=None, tarball_url=None, zipball_url=None, _configuration=None): # noqa: E501 + """Tag - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit = None + self._id = None + self._message = None + self._name = None + self._tarball_url = None + self._zipball_url = None + self.discriminator = None + + if commit is not None: + self.commit = commit + if id is not None: + self.id = id + if message is not None: + self.message = message + if name is not None: + self.name = name + if tarball_url is not None: + self.tarball_url = tarball_url + if zipball_url is not None: + self.zipball_url = zipball_url + + @property + def commit(self): + """Gets the commit of this Tag. # noqa: E501 + + + :return: The commit of this Tag. # noqa: E501 + :rtype: CommitMeta + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this Tag. + + + :param commit: The commit of this Tag. # noqa: E501 + :type: CommitMeta + """ + + self._commit = commit + + @property + def id(self): + """Gets the id of this Tag. # noqa: E501 + + The ID (SHA) of the tag # noqa: E501 + + :return: The id of this Tag. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Tag. + + The ID (SHA) of the tag # noqa: E501 + + :param id: The id of this Tag. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def message(self): + """Gets the message of this Tag. # noqa: E501 + + The message associated with the tag # noqa: E501 + + :return: The message of this Tag. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Tag. + + The message associated with the tag # noqa: E501 + + :param message: The message of this Tag. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def name(self): + """Gets the name of this Tag. # noqa: E501 + + The name of the tag # noqa: E501 + + :return: The name of this Tag. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Tag. + + The name of the tag # noqa: E501 + + :param name: The name of this Tag. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tarball_url(self): + """Gets the tarball_url of this Tag. # noqa: E501 + + The URL to download the tarball archive # noqa: E501 + + :return: The tarball_url of this Tag. # noqa: E501 + :rtype: str + """ + return self._tarball_url + + @tarball_url.setter + def tarball_url(self, tarball_url): + """Sets the tarball_url of this Tag. + + The URL to download the tarball archive # noqa: E501 + + :param tarball_url: The tarball_url of this Tag. # noqa: E501 + :type: str + """ + + self._tarball_url = tarball_url + + @property + def zipball_url(self): + """Gets the zipball_url of this Tag. # noqa: E501 + + The URL to download the zipball archive # noqa: E501 + + :return: The zipball_url of this Tag. # noqa: E501 + :rtype: str + """ + return self._zipball_url + + @zipball_url.setter + def zipball_url(self, zipball_url): + """Sets the zipball_url of this Tag. + + The URL to download the zipball archive # noqa: E501 + + :param zipball_url: The zipball_url of this Tag. # noqa: E501 + :type: str + """ + + self._zipball_url = zipball_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(Tag, 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, Tag): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Tag): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/tag_protection.py b/swagger_client/models/tag_protection.py new file mode 100644 index 0000000..d2a7ff8 --- /dev/null +++ b/swagger_client/models/tag_protection.py @@ -0,0 +1,261 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class TagProtection(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 = { + 'created_at': 'datetime', + 'id': 'int', + 'name_pattern': 'str', + 'updated_at': 'datetime', + 'whitelist_teams': 'list[str]', + 'whitelist_usernames': 'list[str]' + } + + attribute_map = { + 'created_at': 'created_at', + 'id': 'id', + 'name_pattern': 'name_pattern', + 'updated_at': 'updated_at', + 'whitelist_teams': 'whitelist_teams', + 'whitelist_usernames': 'whitelist_usernames' + } + + def __init__(self, created_at=None, id=None, name_pattern=None, updated_at=None, whitelist_teams=None, whitelist_usernames=None, _configuration=None): # noqa: E501 + """TagProtection - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._id = None + self._name_pattern = None + self._updated_at = None + self._whitelist_teams = None + self._whitelist_usernames = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if id is not None: + self.id = id + if name_pattern is not None: + self.name_pattern = name_pattern + if updated_at is not None: + self.updated_at = updated_at + if whitelist_teams is not None: + self.whitelist_teams = whitelist_teams + if whitelist_usernames is not None: + self.whitelist_usernames = whitelist_usernames + + @property + def created_at(self): + """Gets the created_at of this TagProtection. # noqa: E501 + + + :return: The created_at of this TagProtection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TagProtection. + + + :param created_at: The created_at of this TagProtection. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def id(self): + """Gets the id of this TagProtection. # noqa: E501 + + The unique identifier of the tag protection # noqa: E501 + + :return: The id of this TagProtection. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TagProtection. + + The unique identifier of the tag protection # noqa: E501 + + :param id: The id of this TagProtection. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name_pattern(self): + """Gets the name_pattern of this TagProtection. # noqa: E501 + + The pattern to match tag names for protection # noqa: E501 + + :return: The name_pattern of this TagProtection. # noqa: E501 + :rtype: str + """ + return self._name_pattern + + @name_pattern.setter + def name_pattern(self, name_pattern): + """Sets the name_pattern of this TagProtection. + + The pattern to match tag names for protection # noqa: E501 + + :param name_pattern: The name_pattern of this TagProtection. # noqa: E501 + :type: str + """ + + self._name_pattern = name_pattern + + @property + def updated_at(self): + """Gets the updated_at of this TagProtection. # noqa: E501 + + + :return: The updated_at of this TagProtection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this TagProtection. + + + :param updated_at: The updated_at of this TagProtection. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def whitelist_teams(self): + """Gets the whitelist_teams of this TagProtection. # noqa: E501 + + List of team names allowed to create/delete protected tags # noqa: E501 + + :return: The whitelist_teams of this TagProtection. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_teams + + @whitelist_teams.setter + def whitelist_teams(self, whitelist_teams): + """Sets the whitelist_teams of this TagProtection. + + List of team names allowed to create/delete protected tags # noqa: E501 + + :param whitelist_teams: The whitelist_teams of this TagProtection. # noqa: E501 + :type: list[str] + """ + + self._whitelist_teams = whitelist_teams + + @property + def whitelist_usernames(self): + """Gets the whitelist_usernames of this TagProtection. # noqa: E501 + + List of usernames allowed to create/delete protected tags # noqa: E501 + + :return: The whitelist_usernames of this TagProtection. # noqa: E501 + :rtype: list[str] + """ + return self._whitelist_usernames + + @whitelist_usernames.setter + def whitelist_usernames(self, whitelist_usernames): + """Sets the whitelist_usernames of this TagProtection. + + List of usernames allowed to create/delete protected tags # noqa: E501 + + :param whitelist_usernames: The whitelist_usernames of this TagProtection. # noqa: E501 + :type: list[str] + """ + + self._whitelist_usernames = whitelist_usernames + + 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(TagProtection, 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, TagProtection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TagProtection): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/team.py b/swagger_client/models/team.py new file mode 100644 index 0000000..961b62d --- /dev/null +++ b/swagger_client/models/team.py @@ -0,0 +1,348 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class Team(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 = { + 'can_create_org_repo': 'bool', + 'description': 'str', + 'id': 'int', + 'includes_all_repositories': 'bool', + 'name': 'str', + 'organization': 'Organization', + 'permission': 'str', + 'units': 'list[str]', + 'units_map': 'dict(str, str)' + } + + attribute_map = { + 'can_create_org_repo': 'can_create_org_repo', + 'description': 'description', + 'id': 'id', + 'includes_all_repositories': 'includes_all_repositories', + 'name': 'name', + 'organization': 'organization', + 'permission': 'permission', + 'units': 'units', + 'units_map': 'units_map' + } + + def __init__(self, can_create_org_repo=None, description=None, id=None, includes_all_repositories=None, name=None, organization=None, permission=None, units=None, units_map=None, _configuration=None): # noqa: E501 + """Team - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._can_create_org_repo = None + self._description = None + self._id = None + self._includes_all_repositories = None + self._name = None + self._organization = None + self._permission = None + self._units = None + self._units_map = None + self.discriminator = None + + if can_create_org_repo is not None: + self.can_create_org_repo = can_create_org_repo + if description is not None: + self.description = description + if id is not None: + self.id = id + if includes_all_repositories is not None: + self.includes_all_repositories = includes_all_repositories + if name is not None: + self.name = name + if organization is not None: + self.organization = organization + if permission is not None: + self.permission = permission + if units is not None: + self.units = units + if units_map is not None: + self.units_map = units_map + + @property + def can_create_org_repo(self): + """Gets the can_create_org_repo of this Team. # noqa: E501 + + Whether the team can create repositories in the organization # noqa: E501 + + :return: The can_create_org_repo of this Team. # noqa: E501 + :rtype: bool + """ + return self._can_create_org_repo + + @can_create_org_repo.setter + def can_create_org_repo(self, can_create_org_repo): + """Sets the can_create_org_repo of this Team. + + Whether the team can create repositories in the organization # noqa: E501 + + :param can_create_org_repo: The can_create_org_repo of this Team. # noqa: E501 + :type: bool + """ + + self._can_create_org_repo = can_create_org_repo + + @property + def description(self): + """Gets the description of this Team. # noqa: E501 + + The description of the team # noqa: E501 + + :return: The description of this Team. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Team. + + The description of the team # noqa: E501 + + :param description: The description of this Team. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this Team. # noqa: E501 + + The unique identifier of the team # noqa: E501 + + :return: The id of this Team. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Team. + + The unique identifier of the team # noqa: E501 + + :param id: The id of this Team. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def includes_all_repositories(self): + """Gets the includes_all_repositories of this Team. # noqa: E501 + + Whether the team has access to all repositories in the organization # noqa: E501 + + :return: The includes_all_repositories of this Team. # noqa: E501 + :rtype: bool + """ + return self._includes_all_repositories + + @includes_all_repositories.setter + def includes_all_repositories(self, includes_all_repositories): + """Sets the includes_all_repositories of this Team. + + Whether the team has access to all repositories in the organization # noqa: E501 + + :param includes_all_repositories: The includes_all_repositories of this Team. # noqa: E501 + :type: bool + """ + + self._includes_all_repositories = includes_all_repositories + + @property + def name(self): + """Gets the name of this Team. # noqa: E501 + + The name of the team # noqa: E501 + + :return: The name of this Team. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Team. + + The name of the team # noqa: E501 + + :param name: The name of this Team. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def organization(self): + """Gets the organization of this Team. # noqa: E501 + + + :return: The organization of this Team. # noqa: E501 + :rtype: Organization + """ + return self._organization + + @organization.setter + def organization(self, organization): + """Sets the organization of this Team. + + + :param organization: The organization of this Team. # noqa: E501 + :type: Organization + """ + + self._organization = organization + + @property + def permission(self): + """Gets the permission of this Team. # noqa: E501 + + + :return: The permission of this Team. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this Team. + + + :param permission: The permission of this Team. # noqa: E501 + :type: str + """ + allowed_values = ["none", "read", "write", "admin", "owner"] # noqa: E501 + if (self._configuration.client_side_validation and + permission not in allowed_values): + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + @property + def units(self): + """Gets the units of this Team. # noqa: E501 + + + :return: The units of this Team. # noqa: E501 + :rtype: list[str] + """ + return self._units + + @units.setter + def units(self, units): + """Sets the units of this Team. + + + :param units: The units of this Team. # noqa: E501 + :type: list[str] + """ + + self._units = units + + @property + def units_map(self): + """Gets the units_map of this Team. # noqa: E501 + + + :return: The units_map of this Team. # noqa: E501 + :rtype: dict(str, str) + """ + return self._units_map + + @units_map.setter + def units_map(self, units_map): + """Sets the units_map of this Team. + + + :param units_map: The units_map of this Team. # noqa: E501 + :type: dict(str, str) + """ + + self._units_map = units_map + + 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(Team, 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, Team): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Team): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/time_stamp.py b/swagger_client/models/time_stamp.py new file mode 100644 index 0000000..aa9e8d3 --- /dev/null +++ b/swagger_client/models/time_stamp.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class TimeStamp(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, _configuration=None): # noqa: E501 + """TimeStamp - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + 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(TimeStamp, 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, TimeStamp): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TimeStamp): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/timeline_comment.py b/swagger_client/models/timeline_comment.py new file mode 100644 index 0000000..39f63d1 --- /dev/null +++ b/swagger_client/models/timeline_comment.py @@ -0,0 +1,867 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class TimelineComment(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 = { + 'assignee': 'User', + 'assignee_team': 'Team', + 'body': 'str', + 'created_at': 'datetime', + 'dependent_issue': 'Issue', + 'html_url': 'str', + 'id': 'int', + 'issue_url': 'str', + 'label': 'Label', + 'milestone': 'Milestone', + 'new_ref': 'str', + 'new_title': 'str', + 'old_milestone': 'Milestone', + 'old_project_id': 'int', + 'old_ref': 'str', + 'old_title': 'str', + 'project_id': 'int', + 'pull_request_url': 'str', + 'ref_action': 'str', + 'ref_comment': 'Comment', + 'ref_commit_sha': 'str', + 'ref_issue': 'Issue', + 'removed_assignee': 'bool', + 'resolve_doer': 'User', + 'review_id': 'int', + 'tracked_time': 'TrackedTime', + 'type': 'str', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'assignee': 'assignee', + 'assignee_team': 'assignee_team', + 'body': 'body', + 'created_at': 'created_at', + 'dependent_issue': 'dependent_issue', + 'html_url': 'html_url', + 'id': 'id', + 'issue_url': 'issue_url', + 'label': 'label', + 'milestone': 'milestone', + 'new_ref': 'new_ref', + 'new_title': 'new_title', + 'old_milestone': 'old_milestone', + 'old_project_id': 'old_project_id', + 'old_ref': 'old_ref', + 'old_title': 'old_title', + 'project_id': 'project_id', + 'pull_request_url': 'pull_request_url', + 'ref_action': 'ref_action', + 'ref_comment': 'ref_comment', + 'ref_commit_sha': 'ref_commit_sha', + 'ref_issue': 'ref_issue', + 'removed_assignee': 'removed_assignee', + 'resolve_doer': 'resolve_doer', + 'review_id': 'review_id', + 'tracked_time': 'tracked_time', + 'type': 'type', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, assignee=None, assignee_team=None, body=None, created_at=None, dependent_issue=None, html_url=None, id=None, issue_url=None, label=None, milestone=None, new_ref=None, new_title=None, old_milestone=None, old_project_id=None, old_ref=None, old_title=None, project_id=None, pull_request_url=None, ref_action=None, ref_comment=None, ref_commit_sha=None, ref_issue=None, removed_assignee=None, resolve_doer=None, review_id=None, tracked_time=None, type=None, updated_at=None, user=None, _configuration=None): # noqa: E501 + """TimelineComment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._assignee = None + self._assignee_team = None + self._body = None + self._created_at = None + self._dependent_issue = None + self._html_url = None + self._id = None + self._issue_url = None + self._label = None + self._milestone = None + self._new_ref = None + self._new_title = None + self._old_milestone = None + self._old_project_id = None + self._old_ref = None + self._old_title = None + self._project_id = None + self._pull_request_url = None + self._ref_action = None + self._ref_comment = None + self._ref_commit_sha = None + self._ref_issue = None + self._removed_assignee = None + self._resolve_doer = None + self._review_id = None + self._tracked_time = None + self._type = None + self._updated_at = None + self._user = None + self.discriminator = None + + if assignee is not None: + self.assignee = assignee + if assignee_team is not None: + self.assignee_team = assignee_team + if body is not None: + self.body = body + if created_at is not None: + self.created_at = created_at + if dependent_issue is not None: + self.dependent_issue = dependent_issue + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if issue_url is not None: + self.issue_url = issue_url + if label is not None: + self.label = label + if milestone is not None: + self.milestone = milestone + if new_ref is not None: + self.new_ref = new_ref + if new_title is not None: + self.new_title = new_title + if old_milestone is not None: + self.old_milestone = old_milestone + if old_project_id is not None: + self.old_project_id = old_project_id + if old_ref is not None: + self.old_ref = old_ref + if old_title is not None: + self.old_title = old_title + if project_id is not None: + self.project_id = project_id + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if ref_action is not None: + self.ref_action = ref_action + if ref_comment is not None: + self.ref_comment = ref_comment + if ref_commit_sha is not None: + self.ref_commit_sha = ref_commit_sha + if ref_issue is not None: + self.ref_issue = ref_issue + if removed_assignee is not None: + self.removed_assignee = removed_assignee + if resolve_doer is not None: + self.resolve_doer = resolve_doer + if review_id is not None: + self.review_id = review_id + if tracked_time is not None: + self.tracked_time = tracked_time + if type is not None: + self.type = type + if updated_at is not None: + self.updated_at = updated_at + if user is not None: + self.user = user + + @property + def assignee(self): + """Gets the assignee of this TimelineComment. # noqa: E501 + + + :return: The assignee of this TimelineComment. # noqa: E501 + :rtype: User + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this TimelineComment. + + + :param assignee: The assignee of this TimelineComment. # noqa: E501 + :type: User + """ + + self._assignee = assignee + + @property + def assignee_team(self): + """Gets the assignee_team of this TimelineComment. # noqa: E501 + + + :return: The assignee_team of this TimelineComment. # noqa: E501 + :rtype: Team + """ + return self._assignee_team + + @assignee_team.setter + def assignee_team(self, assignee_team): + """Sets the assignee_team of this TimelineComment. + + + :param assignee_team: The assignee_team of this TimelineComment. # noqa: E501 + :type: Team + """ + + self._assignee_team = assignee_team + + @property + def body(self): + """Gets the body of this TimelineComment. # noqa: E501 + + Body contains the timeline event content # noqa: E501 + + :return: The body of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this TimelineComment. + + Body contains the timeline event content # noqa: E501 + + :param body: The body of this TimelineComment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def created_at(self): + """Gets the created_at of this TimelineComment. # noqa: E501 + + + :return: The created_at of this TimelineComment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TimelineComment. + + + :param created_at: The created_at of this TimelineComment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def dependent_issue(self): + """Gets the dependent_issue of this TimelineComment. # noqa: E501 + + + :return: The dependent_issue of this TimelineComment. # noqa: E501 + :rtype: Issue + """ + return self._dependent_issue + + @dependent_issue.setter + def dependent_issue(self, dependent_issue): + """Sets the dependent_issue of this TimelineComment. + + + :param dependent_issue: The dependent_issue of this TimelineComment. # noqa: E501 + :type: Issue + """ + + self._dependent_issue = dependent_issue + + @property + def html_url(self): + """Gets the html_url of this TimelineComment. # noqa: E501 + + HTMLURL is the web URL for viewing the comment # noqa: E501 + + :return: The html_url of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this TimelineComment. + + HTMLURL is the web URL for viewing the comment # noqa: E501 + + :param html_url: The html_url of this TimelineComment. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this TimelineComment. # noqa: E501 + + ID is the unique identifier for the timeline comment # noqa: E501 + + :return: The id of this TimelineComment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TimelineComment. + + ID is the unique identifier for the timeline comment # noqa: E501 + + :param id: The id of this TimelineComment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def issue_url(self): + """Gets the issue_url of this TimelineComment. # noqa: E501 + + IssueURL is the API URL for the issue # noqa: E501 + + :return: The issue_url of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._issue_url + + @issue_url.setter + def issue_url(self, issue_url): + """Sets the issue_url of this TimelineComment. + + IssueURL is the API URL for the issue # noqa: E501 + + :param issue_url: The issue_url of this TimelineComment. # noqa: E501 + :type: str + """ + + self._issue_url = issue_url + + @property + def label(self): + """Gets the label of this TimelineComment. # noqa: E501 + + + :return: The label of this TimelineComment. # noqa: E501 + :rtype: Label + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this TimelineComment. + + + :param label: The label of this TimelineComment. # noqa: E501 + :type: Label + """ + + self._label = label + + @property + def milestone(self): + """Gets the milestone of this TimelineComment. # noqa: E501 + + + :return: The milestone of this TimelineComment. # noqa: E501 + :rtype: Milestone + """ + return self._milestone + + @milestone.setter + def milestone(self, milestone): + """Sets the milestone of this TimelineComment. + + + :param milestone: The milestone of this TimelineComment. # noqa: E501 + :type: Milestone + """ + + self._milestone = milestone + + @property + def new_ref(self): + """Gets the new_ref of this TimelineComment. # noqa: E501 + + + :return: The new_ref of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._new_ref + + @new_ref.setter + def new_ref(self, new_ref): + """Sets the new_ref of this TimelineComment. + + + :param new_ref: The new_ref of this TimelineComment. # noqa: E501 + :type: str + """ + + self._new_ref = new_ref + + @property + def new_title(self): + """Gets the new_title of this TimelineComment. # noqa: E501 + + + :return: The new_title of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._new_title + + @new_title.setter + def new_title(self, new_title): + """Sets the new_title of this TimelineComment. + + + :param new_title: The new_title of this TimelineComment. # noqa: E501 + :type: str + """ + + self._new_title = new_title + + @property + def old_milestone(self): + """Gets the old_milestone of this TimelineComment. # noqa: E501 + + + :return: The old_milestone of this TimelineComment. # noqa: E501 + :rtype: Milestone + """ + return self._old_milestone + + @old_milestone.setter + def old_milestone(self, old_milestone): + """Sets the old_milestone of this TimelineComment. + + + :param old_milestone: The old_milestone of this TimelineComment. # noqa: E501 + :type: Milestone + """ + + self._old_milestone = old_milestone + + @property + def old_project_id(self): + """Gets the old_project_id of this TimelineComment. # noqa: E501 + + + :return: The old_project_id of this TimelineComment. # noqa: E501 + :rtype: int + """ + return self._old_project_id + + @old_project_id.setter + def old_project_id(self, old_project_id): + """Sets the old_project_id of this TimelineComment. + + + :param old_project_id: The old_project_id of this TimelineComment. # noqa: E501 + :type: int + """ + + self._old_project_id = old_project_id + + @property + def old_ref(self): + """Gets the old_ref of this TimelineComment. # noqa: E501 + + + :return: The old_ref of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._old_ref + + @old_ref.setter + def old_ref(self, old_ref): + """Sets the old_ref of this TimelineComment. + + + :param old_ref: The old_ref of this TimelineComment. # noqa: E501 + :type: str + """ + + self._old_ref = old_ref + + @property + def old_title(self): + """Gets the old_title of this TimelineComment. # noqa: E501 + + + :return: The old_title of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._old_title + + @old_title.setter + def old_title(self, old_title): + """Sets the old_title of this TimelineComment. + + + :param old_title: The old_title of this TimelineComment. # noqa: E501 + :type: str + """ + + self._old_title = old_title + + @property + def project_id(self): + """Gets the project_id of this TimelineComment. # noqa: E501 + + + :return: The project_id of this TimelineComment. # noqa: E501 + :rtype: int + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this TimelineComment. + + + :param project_id: The project_id of this TimelineComment. # noqa: E501 + :type: int + """ + + self._project_id = project_id + + @property + def pull_request_url(self): + """Gets the pull_request_url of this TimelineComment. # noqa: E501 + + PRURL is the API URL for the pull request (if applicable) # noqa: E501 + + :return: The pull_request_url of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._pull_request_url + + @pull_request_url.setter + def pull_request_url(self, pull_request_url): + """Sets the pull_request_url of this TimelineComment. + + PRURL is the API URL for the pull request (if applicable) # noqa: E501 + + :param pull_request_url: The pull_request_url of this TimelineComment. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def ref_action(self): + """Gets the ref_action of this TimelineComment. # noqa: E501 + + + :return: The ref_action of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._ref_action + + @ref_action.setter + def ref_action(self, ref_action): + """Sets the ref_action of this TimelineComment. + + + :param ref_action: The ref_action of this TimelineComment. # noqa: E501 + :type: str + """ + + self._ref_action = ref_action + + @property + def ref_comment(self): + """Gets the ref_comment of this TimelineComment. # noqa: E501 + + + :return: The ref_comment of this TimelineComment. # noqa: E501 + :rtype: Comment + """ + return self._ref_comment + + @ref_comment.setter + def ref_comment(self, ref_comment): + """Sets the ref_comment of this TimelineComment. + + + :param ref_comment: The ref_comment of this TimelineComment. # noqa: E501 + :type: Comment + """ + + self._ref_comment = ref_comment + + @property + def ref_commit_sha(self): + """Gets the ref_commit_sha of this TimelineComment. # noqa: E501 + + commit SHA where issue/PR was referenced # noqa: E501 + + :return: The ref_commit_sha of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._ref_commit_sha + + @ref_commit_sha.setter + def ref_commit_sha(self, ref_commit_sha): + """Sets the ref_commit_sha of this TimelineComment. + + commit SHA where issue/PR was referenced # noqa: E501 + + :param ref_commit_sha: The ref_commit_sha of this TimelineComment. # noqa: E501 + :type: str + """ + + self._ref_commit_sha = ref_commit_sha + + @property + def ref_issue(self): + """Gets the ref_issue of this TimelineComment. # noqa: E501 + + + :return: The ref_issue of this TimelineComment. # noqa: E501 + :rtype: Issue + """ + return self._ref_issue + + @ref_issue.setter + def ref_issue(self, ref_issue): + """Sets the ref_issue of this TimelineComment. + + + :param ref_issue: The ref_issue of this TimelineComment. # noqa: E501 + :type: Issue + """ + + self._ref_issue = ref_issue + + @property + def removed_assignee(self): + """Gets the removed_assignee of this TimelineComment. # noqa: E501 + + whether the assignees were removed or added # noqa: E501 + + :return: The removed_assignee of this TimelineComment. # noqa: E501 + :rtype: bool + """ + return self._removed_assignee + + @removed_assignee.setter + def removed_assignee(self, removed_assignee): + """Sets the removed_assignee of this TimelineComment. + + whether the assignees were removed or added # noqa: E501 + + :param removed_assignee: The removed_assignee of this TimelineComment. # noqa: E501 + :type: bool + """ + + self._removed_assignee = removed_assignee + + @property + def resolve_doer(self): + """Gets the resolve_doer of this TimelineComment. # noqa: E501 + + + :return: The resolve_doer of this TimelineComment. # noqa: E501 + :rtype: User + """ + return self._resolve_doer + + @resolve_doer.setter + def resolve_doer(self, resolve_doer): + """Sets the resolve_doer of this TimelineComment. + + + :param resolve_doer: The resolve_doer of this TimelineComment. # noqa: E501 + :type: User + """ + + self._resolve_doer = resolve_doer + + @property + def review_id(self): + """Gets the review_id of this TimelineComment. # noqa: E501 + + + :return: The review_id of this TimelineComment. # noqa: E501 + :rtype: int + """ + return self._review_id + + @review_id.setter + def review_id(self, review_id): + """Sets the review_id of this TimelineComment. + + + :param review_id: The review_id of this TimelineComment. # noqa: E501 + :type: int + """ + + self._review_id = review_id + + @property + def tracked_time(self): + """Gets the tracked_time of this TimelineComment. # noqa: E501 + + + :return: The tracked_time of this TimelineComment. # noqa: E501 + :rtype: TrackedTime + """ + return self._tracked_time + + @tracked_time.setter + def tracked_time(self, tracked_time): + """Sets the tracked_time of this TimelineComment. + + + :param tracked_time: The tracked_time of this TimelineComment. # noqa: E501 + :type: TrackedTime + """ + + self._tracked_time = tracked_time + + @property + def type(self): + """Gets the type of this TimelineComment. # noqa: E501 + + Type indicates the type of timeline event # noqa: E501 + + :return: The type of this TimelineComment. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this TimelineComment. + + Type indicates the type of timeline event # noqa: E501 + + :param type: The type of this TimelineComment. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def updated_at(self): + """Gets the updated_at of this TimelineComment. # noqa: E501 + + + :return: The updated_at of this TimelineComment. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this TimelineComment. + + + :param updated_at: The updated_at of this TimelineComment. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this TimelineComment. # noqa: E501 + + + :return: The user of this TimelineComment. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this TimelineComment. + + + :param user: The user of this TimelineComment. # noqa: E501 + :type: User + """ + + 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(TimelineComment, 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, TimelineComment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TimelineComment): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/topic_name.py b/swagger_client/models/topic_name.py new file mode 100644 index 0000000..bd80903 --- /dev/null +++ b/swagger_client/models/topic_name.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class TopicName(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 = { + 'topics': 'list[str]' + } + + attribute_map = { + 'topics': 'topics' + } + + def __init__(self, topics=None, _configuration=None): # noqa: E501 + """TopicName - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._topics = None + self.discriminator = None + + if topics is not None: + self.topics = topics + + @property + def topics(self): + """Gets the topics of this TopicName. # noqa: E501 + + List of topic names # noqa: E501 + + :return: The topics of this TopicName. # noqa: E501 + :rtype: list[str] + """ + return self._topics + + @topics.setter + def topics(self, topics): + """Sets the topics of this TopicName. + + List of topic names # noqa: E501 + + :param topics: The topics of this TopicName. # noqa: E501 + :type: list[str] + """ + + self._topics = topics + + 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(TopicName, 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, TopicName): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TopicName): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/topic_response.py b/swagger_client/models/topic_response.py new file mode 100644 index 0000000..5da7a35 --- /dev/null +++ b/swagger_client/models/topic_response.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class TopicResponse(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 = { + 'created': 'datetime', + 'id': 'int', + 'repo_count': 'int', + 'topic_name': 'str', + 'updated': 'datetime' + } + + attribute_map = { + 'created': 'created', + 'id': 'id', + 'repo_count': 'repo_count', + 'topic_name': 'topic_name', + 'updated': 'updated' + } + + def __init__(self, created=None, id=None, repo_count=None, topic_name=None, updated=None, _configuration=None): # noqa: E501 + """TopicResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._id = None + self._repo_count = None + self._topic_name = None + self._updated = None + self.discriminator = None + + if created is not None: + self.created = created + if id is not None: + self.id = id + if repo_count is not None: + self.repo_count = repo_count + if topic_name is not None: + self.topic_name = topic_name + if updated is not None: + self.updated = updated + + @property + def created(self): + """Gets the created of this TopicResponse. # noqa: E501 + + The date and time when the topic was created # noqa: E501 + + :return: The created of this TopicResponse. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this TopicResponse. + + The date and time when the topic was created # noqa: E501 + + :param created: The created of this TopicResponse. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this TopicResponse. # noqa: E501 + + The unique identifier of the topic # noqa: E501 + + :return: The id of this TopicResponse. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TopicResponse. + + The unique identifier of the topic # noqa: E501 + + :param id: The id of this TopicResponse. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def repo_count(self): + """Gets the repo_count of this TopicResponse. # noqa: E501 + + The number of repositories using this topic # noqa: E501 + + :return: The repo_count of this TopicResponse. # noqa: E501 + :rtype: int + """ + return self._repo_count + + @repo_count.setter + def repo_count(self, repo_count): + """Sets the repo_count of this TopicResponse. + + The number of repositories using this topic # noqa: E501 + + :param repo_count: The repo_count of this TopicResponse. # noqa: E501 + :type: int + """ + + self._repo_count = repo_count + + @property + def topic_name(self): + """Gets the topic_name of this TopicResponse. # noqa: E501 + + The name of the topic # noqa: E501 + + :return: The topic_name of this TopicResponse. # noqa: E501 + :rtype: str + """ + return self._topic_name + + @topic_name.setter + def topic_name(self, topic_name): + """Sets the topic_name of this TopicResponse. + + The name of the topic # noqa: E501 + + :param topic_name: The topic_name of this TopicResponse. # noqa: E501 + :type: str + """ + + self._topic_name = topic_name + + @property + def updated(self): + """Gets the updated of this TopicResponse. # noqa: E501 + + The date and time when the topic was last updated # noqa: E501 + + :return: The updated of this TopicResponse. # noqa: E501 + :rtype: datetime + """ + return self._updated + + @updated.setter + def updated(self, updated): + """Sets the updated of this TopicResponse. + + The date and time when the topic was last updated # noqa: E501 + + :param updated: The updated of this TopicResponse. # noqa: E501 + :type: datetime + """ + + self._updated = updated + + 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(TopicResponse, 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, TopicResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TopicResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/tracked_time.py b/swagger_client/models/tracked_time.py new file mode 100644 index 0000000..ed12b4c --- /dev/null +++ b/swagger_client/models/tracked_time.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class TrackedTime(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 = { + 'created': 'datetime', + 'id': 'int', + 'issue': 'Issue', + 'issue_id': 'int', + 'time': 'int', + 'user_id': 'int', + 'user_name': 'str' + } + + attribute_map = { + 'created': 'created', + 'id': 'id', + 'issue': 'issue', + 'issue_id': 'issue_id', + 'time': 'time', + 'user_id': 'user_id', + 'user_name': 'user_name' + } + + def __init__(self, created=None, id=None, issue=None, issue_id=None, time=None, user_id=None, user_name=None, _configuration=None): # noqa: E501 + """TrackedTime - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created = None + self._id = None + self._issue = None + self._issue_id = None + self._time = None + self._user_id = None + self._user_name = None + self.discriminator = None + + if created is not None: + self.created = created + if id is not None: + self.id = id + if issue is not None: + self.issue = issue + if issue_id is not None: + self.issue_id = issue_id + if time is not None: + self.time = time + if user_id is not None: + self.user_id = user_id + if user_name is not None: + self.user_name = user_name + + @property + def created(self): + """Gets the created of this TrackedTime. # noqa: E501 + + + :return: The created of this TrackedTime. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this TrackedTime. + + + :param created: The created of this TrackedTime. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this TrackedTime. # noqa: E501 + + ID is the unique identifier for the tracked time entry # noqa: E501 + + :return: The id of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TrackedTime. + + ID is the unique identifier for the tracked time entry # noqa: E501 + + :param id: The id of this TrackedTime. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def issue(self): + """Gets the issue of this TrackedTime. # noqa: E501 + + + :return: The issue of this TrackedTime. # noqa: E501 + :rtype: Issue + """ + return self._issue + + @issue.setter + def issue(self, issue): + """Sets the issue of this TrackedTime. + + + :param issue: The issue of this TrackedTime. # noqa: E501 + :type: Issue + """ + + self._issue = issue + + @property + def issue_id(self): + """Gets the issue_id of this TrackedTime. # noqa: E501 + + deprecated (only for backwards compatibility) # noqa: E501 + + :return: The issue_id of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._issue_id + + @issue_id.setter + def issue_id(self, issue_id): + """Sets the issue_id of this TrackedTime. + + deprecated (only for backwards compatibility) # noqa: E501 + + :param issue_id: The issue_id of this TrackedTime. # noqa: E501 + :type: int + """ + + self._issue_id = issue_id + + @property + def time(self): + """Gets the time of this TrackedTime. # noqa: E501 + + Time in seconds # noqa: E501 + + :return: The time of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this TrackedTime. + + Time in seconds # noqa: E501 + + :param time: The time of this TrackedTime. # noqa: E501 + :type: int + """ + + self._time = time + + @property + def user_id(self): + """Gets the user_id of this TrackedTime. # noqa: E501 + + deprecated (only for backwards compatibility) # noqa: E501 + + :return: The user_id of this TrackedTime. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this TrackedTime. + + deprecated (only for backwards compatibility) # noqa: E501 + + :param user_id: The user_id of this TrackedTime. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def user_name(self): + """Gets the user_name of this TrackedTime. # noqa: E501 + + username of the user # noqa: E501 + + :return: The user_name of this TrackedTime. # noqa: E501 + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this TrackedTime. + + username of the user # noqa: E501 + + :param user_name: The user_name of this TrackedTime. # noqa: E501 + :type: str + """ + + self._user_name = user_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(TrackedTime, 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, TrackedTime): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TrackedTime): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/transfer_repo_option.py b/swagger_client/models/transfer_repo_option.py new file mode 100644 index 0000000..53fd333 --- /dev/null +++ b/swagger_client/models/transfer_repo_option.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class TransferRepoOption(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 = { + 'new_owner': 'str', + 'team_ids': 'list[int]' + } + + attribute_map = { + 'new_owner': 'new_owner', + 'team_ids': 'team_ids' + } + + def __init__(self, new_owner=None, team_ids=None, _configuration=None): # noqa: E501 + """TransferRepoOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._new_owner = None + self._team_ids = None + self.discriminator = None + + self.new_owner = new_owner + if team_ids is not None: + self.team_ids = team_ids + + @property + def new_owner(self): + """Gets the new_owner of this TransferRepoOption. # noqa: E501 + + + :return: The new_owner of this TransferRepoOption. # noqa: E501 + :rtype: str + """ + return self._new_owner + + @new_owner.setter + def new_owner(self, new_owner): + """Sets the new_owner of this TransferRepoOption. + + + :param new_owner: The new_owner of this TransferRepoOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and new_owner is None: + raise ValueError("Invalid value for `new_owner`, must not be `None`") # noqa: E501 + + self._new_owner = new_owner + + @property + def team_ids(self): + """Gets the team_ids of this TransferRepoOption. # noqa: E501 + + ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. # noqa: E501 + + :return: The team_ids of this TransferRepoOption. # noqa: E501 + :rtype: list[int] + """ + return self._team_ids + + @team_ids.setter + def team_ids(self, team_ids): + """Sets the team_ids of this TransferRepoOption. + + ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. # noqa: E501 + + :param team_ids: The team_ids of this TransferRepoOption. # noqa: E501 + :type: list[int] + """ + + self._team_ids = team_ids + + 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(TransferRepoOption, 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, TransferRepoOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TransferRepoOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/update_branch_protection_priories.py b/swagger_client/models/update_branch_protection_priories.py new file mode 100644 index 0000000..c759ead --- /dev/null +++ b/swagger_client/models/update_branch_protection_priories.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class UpdateBranchProtectionPriories(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 = { + 'ids': 'list[int]' + } + + attribute_map = { + 'ids': 'ids' + } + + def __init__(self, ids=None, _configuration=None): # noqa: E501 + """UpdateBranchProtectionPriories - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._ids = None + self.discriminator = None + + if ids is not None: + self.ids = ids + + @property + def ids(self): + """Gets the ids of this UpdateBranchProtectionPriories. # noqa: E501 + + + :return: The ids of this UpdateBranchProtectionPriories. # noqa: E501 + :rtype: list[int] + """ + return self._ids + + @ids.setter + def ids(self, ids): + """Sets the ids of this UpdateBranchProtectionPriories. + + + :param ids: The ids of this UpdateBranchProtectionPriories. # noqa: E501 + :type: list[int] + """ + + self._ids = ids + + 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(UpdateBranchProtectionPriories, 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, UpdateBranchProtectionPriories): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateBranchProtectionPriories): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/update_file_options.py b/swagger_client/models/update_file_options.py new file mode 100644 index 0000000..d9ccf68 --- /dev/null +++ b/swagger_client/models/update_file_options.py @@ -0,0 +1,373 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class UpdateFileOptions(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 = { + 'author': 'Identity', + 'branch': 'str', + 'committer': 'Identity', + 'content': 'str', + 'dates': 'CommitDateOptions', + 'from_path': 'str', + 'message': 'str', + 'new_branch': 'str', + 'sha': 'str', + 'signoff': 'bool' + } + + attribute_map = { + 'author': 'author', + 'branch': 'branch', + 'committer': 'committer', + 'content': 'content', + 'dates': 'dates', + 'from_path': 'from_path', + 'message': 'message', + 'new_branch': 'new_branch', + 'sha': 'sha', + 'signoff': 'signoff' + } + + def __init__(self, author=None, branch=None, committer=None, content=None, dates=None, from_path=None, message=None, new_branch=None, sha=None, signoff=None, _configuration=None): # noqa: E501 + """UpdateFileOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._branch = None + self._committer = None + self._content = None + self._dates = None + self._from_path = None + self._message = None + self._new_branch = None + self._sha = None + self._signoff = None + self.discriminator = None + + if author is not None: + self.author = author + if branch is not None: + self.branch = branch + if committer is not None: + self.committer = committer + self.content = content + if dates is not None: + self.dates = dates + if from_path is not None: + self.from_path = from_path + if message is not None: + self.message = message + if new_branch is not None: + self.new_branch = new_branch + self.sha = sha + if signoff is not None: + self.signoff = signoff + + @property + def author(self): + """Gets the author of this UpdateFileOptions. # noqa: E501 + + + :return: The author of this UpdateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this UpdateFileOptions. + + + :param author: The author of this UpdateFileOptions. # noqa: E501 + :type: Identity + """ + + self._author = author + + @property + def branch(self): + """Gets the branch of this UpdateFileOptions. # noqa: E501 + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :return: The branch of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this UpdateFileOptions. + + branch (optional) to base this file from. if not given, the default branch is used # noqa: E501 + + :param branch: The branch of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._branch = branch + + @property + def committer(self): + """Gets the committer of this UpdateFileOptions. # noqa: E501 + + + :return: The committer of this UpdateFileOptions. # noqa: E501 + :rtype: Identity + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this UpdateFileOptions. + + + :param committer: The committer of this UpdateFileOptions. # noqa: E501 + :type: Identity + """ + + self._committer = committer + + @property + def content(self): + """Gets the content of this UpdateFileOptions. # noqa: E501 + + content must be base64 encoded # noqa: E501 + + :return: The content of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this UpdateFileOptions. + + content must be base64 encoded # noqa: E501 + + :param content: The content of this UpdateFileOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and content is None: + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def dates(self): + """Gets the dates of this UpdateFileOptions. # noqa: E501 + + + :return: The dates of this UpdateFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this UpdateFileOptions. + + + :param dates: The dates of this UpdateFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + + @property + def from_path(self): + """Gets the from_path of this UpdateFileOptions. # noqa: E501 + + from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL # noqa: E501 + + :return: The from_path of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._from_path + + @from_path.setter + def from_path(self, from_path): + """Sets the from_path of this UpdateFileOptions. + + from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL # noqa: E501 + + :param from_path: The from_path of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._from_path = from_path + + @property + def message(self): + """Gets the message of this UpdateFileOptions. # noqa: E501 + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :return: The message of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this UpdateFileOptions. + + message (optional) for the commit of this file. if not supplied, a default message will be used # noqa: E501 + + :param message: The message of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def new_branch(self): + """Gets the new_branch of this UpdateFileOptions. # noqa: E501 + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :return: The new_branch of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._new_branch + + @new_branch.setter + def new_branch(self, new_branch): + """Sets the new_branch of this UpdateFileOptions. + + new_branch (optional) will make a new branch from `branch` before creating the file # noqa: E501 + + :param new_branch: The new_branch of this UpdateFileOptions. # noqa: E501 + :type: str + """ + + self._new_branch = new_branch + + @property + def sha(self): + """Gets the sha of this UpdateFileOptions. # noqa: E501 + + the blob ID (SHA) for the file that already exists, it is required for changing existing files # noqa: E501 + + :return: The sha of this UpdateFileOptions. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this UpdateFileOptions. + + the blob ID (SHA) for the file that already exists, it is required for changing existing files # noqa: E501 + + :param sha: The sha of this UpdateFileOptions. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and sha is None: + raise ValueError("Invalid value for `sha`, must not be `None`") # noqa: E501 + + self._sha = sha + + @property + def signoff(self): + """Gets the signoff of this UpdateFileOptions. # noqa: E501 + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :return: The signoff of this UpdateFileOptions. # noqa: E501 + :rtype: bool + """ + return self._signoff + + @signoff.setter + def signoff(self, signoff): + """Sets the signoff of this UpdateFileOptions. + + Add a Signed-off-by trailer by the committer at the end of the commit log message. # noqa: E501 + + :param signoff: The signoff of this UpdateFileOptions. # noqa: E501 + :type: bool + """ + + self._signoff = signoff + + 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(UpdateFileOptions, 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, UpdateFileOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateFileOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/update_repo_avatar_option.py b/swagger_client/models/update_repo_avatar_option.py new file mode 100644 index 0000000..d8fef90 --- /dev/null +++ b/swagger_client/models/update_repo_avatar_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class UpdateRepoAvatarOption(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 = { + 'image': 'str' + } + + attribute_map = { + 'image': 'image' + } + + def __init__(self, image=None, _configuration=None): # noqa: E501 + """UpdateRepoAvatarOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._image = None + self.discriminator = None + + if image is not None: + self.image = image + + @property + def image(self): + """Gets the image of this UpdateRepoAvatarOption. # noqa: E501 + + image must be base64 encoded # noqa: E501 + + :return: The image of this UpdateRepoAvatarOption. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this UpdateRepoAvatarOption. + + image must be base64 encoded # noqa: E501 + + :param image: The image of this UpdateRepoAvatarOption. # noqa: E501 + :type: str + """ + + self._image = image + + 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(UpdateRepoAvatarOption, 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, UpdateRepoAvatarOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateRepoAvatarOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/update_user_avatar_option.py b/swagger_client/models/update_user_avatar_option.py new file mode 100644 index 0000000..be190c3 --- /dev/null +++ b/swagger_client/models/update_user_avatar_option.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class UpdateUserAvatarOption(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 = { + 'image': 'str' + } + + attribute_map = { + 'image': 'image' + } + + def __init__(self, image=None, _configuration=None): # noqa: E501 + """UpdateUserAvatarOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._image = None + self.discriminator = None + + if image is not None: + self.image = image + + @property + def image(self): + """Gets the image of this UpdateUserAvatarOption. # noqa: E501 + + image must be base64 encoded # noqa: E501 + + :return: The image of this UpdateUserAvatarOption. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this UpdateUserAvatarOption. + + image must be base64 encoded # noqa: E501 + + :param image: The image of this UpdateUserAvatarOption. # noqa: E501 + :type: str + """ + + self._image = image + + 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(UpdateUserAvatarOption, 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, UpdateUserAvatarOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateUserAvatarOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/update_variable_option.py b/swagger_client/models/update_variable_option.py new file mode 100644 index 0000000..7c3717f --- /dev/null +++ b/swagger_client/models/update_variable_option.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class UpdateVariableOption(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', + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'description': 'description', + 'name': 'name', + 'value': 'value' + } + + def __init__(self, description=None, name=None, value=None, _configuration=None): # noqa: E501 + """UpdateVariableOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._name = None + self._value = None + self.discriminator = None + + if description is not None: + self.description = description + if name is not None: + self.name = name + self.value = value + + @property + def description(self): + """Gets the description of this UpdateVariableOption. # noqa: E501 + + Description of the variable to update # noqa: E501 + + :return: The description of this UpdateVariableOption. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UpdateVariableOption. + + Description of the variable to update # noqa: E501 + + :param description: The description of this UpdateVariableOption. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this UpdateVariableOption. # noqa: E501 + + New name for the variable. If the field is empty, the variable name won't be updated. # noqa: E501 + + :return: The name of this UpdateVariableOption. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UpdateVariableOption. + + New name for the variable. If the field is empty, the variable name won't be updated. # noqa: E501 + + :param name: The name of this UpdateVariableOption. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this UpdateVariableOption. # noqa: E501 + + Value of the variable to update # noqa: E501 + + :return: The value of this UpdateVariableOption. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this UpdateVariableOption. + + Value of the variable to update # noqa: E501 + + :param value: The value of this UpdateVariableOption. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and value is None: + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + 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(UpdateVariableOption, 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, UpdateVariableOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateVariableOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/user.py b/swagger_client/models/user.py new file mode 100644 index 0000000..642dc4f --- /dev/null +++ b/swagger_client/models/user.py @@ -0,0 +1,703 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class User(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 = { + 'active': 'bool', + 'avatar_url': 'str', + 'created': 'datetime', + 'description': 'str', + 'email': 'str', + 'followers_count': 'int', + 'following_count': 'int', + 'full_name': 'str', + 'html_url': 'str', + 'id': 'int', + 'is_admin': 'bool', + 'language': 'str', + 'last_login': 'datetime', + 'location': 'str', + 'login': 'str', + 'login_name': 'str', + 'prohibit_login': 'bool', + 'restricted': 'bool', + 'source_id': 'int', + 'starred_repos_count': 'int', + 'visibility': 'str', + 'website': 'str' + } + + attribute_map = { + 'active': 'active', + 'avatar_url': 'avatar_url', + 'created': 'created', + 'description': 'description', + 'email': 'email', + 'followers_count': 'followers_count', + 'following_count': 'following_count', + 'full_name': 'full_name', + 'html_url': 'html_url', + 'id': 'id', + 'is_admin': 'is_admin', + 'language': 'language', + 'last_login': 'last_login', + 'location': 'location', + 'login': 'login', + 'login_name': 'login_name', + 'prohibit_login': 'prohibit_login', + 'restricted': 'restricted', + 'source_id': 'source_id', + 'starred_repos_count': 'starred_repos_count', + 'visibility': 'visibility', + 'website': 'website' + } + + def __init__(self, active=None, avatar_url=None, created=None, description=None, email=None, followers_count=None, following_count=None, full_name=None, html_url=None, id=None, is_admin=None, language=None, last_login=None, location=None, login=None, login_name='empty', prohibit_login=None, restricted=None, source_id=None, starred_repos_count=None, visibility=None, website=None, _configuration=None): # noqa: E501 + """User - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._active = None + self._avatar_url = None + self._created = None + self._description = None + self._email = None + self._followers_count = None + self._following_count = None + self._full_name = None + self._html_url = None + self._id = None + self._is_admin = None + self._language = None + self._last_login = None + self._location = None + self._login = None + self._login_name = None + self._prohibit_login = None + self._restricted = None + self._source_id = None + self._starred_repos_count = None + self._visibility = None + self._website = None + self.discriminator = None + + if active is not None: + self.active = active + if avatar_url is not None: + self.avatar_url = avatar_url + if created is not None: + self.created = created + if description is not None: + self.description = description + if email is not None: + self.email = email + if followers_count is not None: + self.followers_count = followers_count + if following_count is not None: + self.following_count = following_count + if full_name is not None: + self.full_name = full_name + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if is_admin is not None: + self.is_admin = is_admin + if language is not None: + self.language = language + if last_login is not None: + self.last_login = last_login + if location is not None: + self.location = location + if login is not None: + self.login = login + if login_name is not None: + self.login_name = login_name + if prohibit_login is not None: + self.prohibit_login = prohibit_login + if restricted is not None: + self.restricted = restricted + if source_id is not None: + self.source_id = source_id + if starred_repos_count is not None: + self.starred_repos_count = starred_repos_count + if visibility is not None: + self.visibility = visibility + if website is not None: + self.website = website + + @property + def active(self): + """Gets the active of this User. # noqa: E501 + + Is user active # noqa: E501 + + :return: The active of this User. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this User. + + Is user active # noqa: E501 + + :param active: The active of this User. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def avatar_url(self): + """Gets the avatar_url of this User. # noqa: E501 + + URL to the user's avatar # noqa: E501 + + :return: The avatar_url of this User. # noqa: E501 + :rtype: str + """ + return self._avatar_url + + @avatar_url.setter + def avatar_url(self, avatar_url): + """Sets the avatar_url of this User. + + URL to the user's avatar # noqa: E501 + + :param avatar_url: The avatar_url of this User. # noqa: E501 + :type: str + """ + + self._avatar_url = avatar_url + + @property + def created(self): + """Gets the created of this User. # noqa: E501 + + + :return: The created of this User. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this User. + + + :param created: The created of this User. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def description(self): + """Gets the description of this User. # noqa: E501 + + the user's description # noqa: E501 + + :return: The description of this User. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this User. + + the user's description # noqa: E501 + + :param description: The description of this User. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def email(self): + """Gets the email of this User. # noqa: E501 + + + :return: The email of this User. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this User. + + + :param email: The email of this User. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def followers_count(self): + """Gets the followers_count of this User. # noqa: E501 + + user counts # noqa: E501 + + :return: The followers_count of this User. # noqa: E501 + :rtype: int + """ + return self._followers_count + + @followers_count.setter + def followers_count(self, followers_count): + """Sets the followers_count of this User. + + user counts # noqa: E501 + + :param followers_count: The followers_count of this User. # noqa: E501 + :type: int + """ + + self._followers_count = followers_count + + @property + def following_count(self): + """Gets the following_count of this User. # noqa: E501 + + + :return: The following_count of this User. # noqa: E501 + :rtype: int + """ + return self._following_count + + @following_count.setter + def following_count(self, following_count): + """Sets the following_count of this User. + + + :param following_count: The following_count of this User. # noqa: E501 + :type: int + """ + + self._following_count = following_count + + @property + def full_name(self): + """Gets the full_name of this User. # noqa: E501 + + the user's full name # noqa: E501 + + :return: The full_name of this User. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this User. + + the user's full name # noqa: E501 + + :param full_name: The full_name of this User. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def html_url(self): + """Gets the html_url of this User. # noqa: E501 + + URL to the user's gitea page # noqa: E501 + + :return: The html_url of this User. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this User. + + URL to the user's gitea page # noqa: E501 + + :param html_url: The html_url of this User. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this User. # noqa: E501 + + the user's id # noqa: E501 + + :return: The id of this User. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this User. + + the user's id # noqa: E501 + + :param id: The id of this User. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def is_admin(self): + """Gets the is_admin of this User. # noqa: E501 + + Is the user an administrator # noqa: E501 + + :return: The is_admin of this User. # noqa: E501 + :rtype: bool + """ + return self._is_admin + + @is_admin.setter + def is_admin(self, is_admin): + """Sets the is_admin of this User. + + Is the user an administrator # noqa: E501 + + :param is_admin: The is_admin of this User. # noqa: E501 + :type: bool + """ + + self._is_admin = is_admin + + @property + def language(self): + """Gets the language of this User. # noqa: E501 + + User locale # noqa: E501 + + :return: The language of this User. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this User. + + User locale # noqa: E501 + + :param language: The language of this User. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def last_login(self): + """Gets the last_login of this User. # noqa: E501 + + + :return: The last_login of this User. # noqa: E501 + :rtype: datetime + """ + return self._last_login + + @last_login.setter + def last_login(self, last_login): + """Sets the last_login of this User. + + + :param last_login: The last_login of this User. # noqa: E501 + :type: datetime + """ + + self._last_login = last_login + + @property + def location(self): + """Gets the location of this User. # noqa: E501 + + the user's location # noqa: E501 + + :return: The location of this User. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this User. + + the user's location # noqa: E501 + + :param location: The location of this User. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def login(self): + """Gets the login of this User. # noqa: E501 + + login of the user, same as `username` # noqa: E501 + + :return: The login of this User. # noqa: E501 + :rtype: str + """ + return self._login + + @login.setter + def login(self, login): + """Sets the login of this User. + + login of the user, same as `username` # noqa: E501 + + :param login: The login of this User. # noqa: E501 + :type: str + """ + + self._login = login + + @property + def login_name(self): + """Gets the login_name of this User. # noqa: E501 + + identifier of the user, provided by the external authenticator (if configured) # noqa: E501 + + :return: The login_name of this User. # noqa: E501 + :rtype: str + """ + return self._login_name + + @login_name.setter + def login_name(self, login_name): + """Sets the login_name of this User. + + identifier of the user, provided by the external authenticator (if configured) # noqa: E501 + + :param login_name: The login_name of this User. # noqa: E501 + :type: str + """ + + self._login_name = login_name + + @property + def prohibit_login(self): + """Gets the prohibit_login of this User. # noqa: E501 + + Is user login prohibited # noqa: E501 + + :return: The prohibit_login of this User. # noqa: E501 + :rtype: bool + """ + return self._prohibit_login + + @prohibit_login.setter + def prohibit_login(self, prohibit_login): + """Sets the prohibit_login of this User. + + Is user login prohibited # noqa: E501 + + :param prohibit_login: The prohibit_login of this User. # noqa: E501 + :type: bool + """ + + self._prohibit_login = prohibit_login + + @property + def restricted(self): + """Gets the restricted of this User. # noqa: E501 + + Is user restricted # noqa: E501 + + :return: The restricted of this User. # noqa: E501 + :rtype: bool + """ + return self._restricted + + @restricted.setter + def restricted(self, restricted): + """Sets the restricted of this User. + + Is user restricted # noqa: E501 + + :param restricted: The restricted of this User. # noqa: E501 + :type: bool + """ + + self._restricted = restricted + + @property + def source_id(self): + """Gets the source_id of this User. # noqa: E501 + + The ID of the user's Authentication Source # noqa: E501 + + :return: The source_id of this User. # noqa: E501 + :rtype: int + """ + return self._source_id + + @source_id.setter + def source_id(self, source_id): + """Sets the source_id of this User. + + The ID of the user's Authentication Source # noqa: E501 + + :param source_id: The source_id of this User. # noqa: E501 + :type: int + """ + + self._source_id = source_id + + @property + def starred_repos_count(self): + """Gets the starred_repos_count of this User. # noqa: E501 + + + :return: The starred_repos_count of this User. # noqa: E501 + :rtype: int + """ + return self._starred_repos_count + + @starred_repos_count.setter + def starred_repos_count(self, starred_repos_count): + """Sets the starred_repos_count of this User. + + + :param starred_repos_count: The starred_repos_count of this User. # noqa: E501 + :type: int + """ + + self._starred_repos_count = starred_repos_count + + @property + def visibility(self): + """Gets the visibility of this User. # noqa: E501 + + User visibility level option: public, limited, private # noqa: E501 + + :return: The visibility of this User. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this User. + + User visibility level option: public, limited, private # noqa: E501 + + :param visibility: The visibility of this User. # noqa: E501 + :type: str + """ + + self._visibility = visibility + + @property + def website(self): + """Gets the website of this User. # noqa: E501 + + the user's website # noqa: E501 + + :return: The website of this User. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this User. + + the user's website # noqa: E501 + + :param website: The website of this User. # noqa: E501 + :type: str + """ + + self._website = website + + 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(User, 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, User): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, User): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/user_badge_option.py b/swagger_client/models/user_badge_option.py new file mode 100644 index 0000000..f604e86 --- /dev/null +++ b/swagger_client/models/user_badge_option.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class UserBadgeOption(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 = { + 'badge_slugs': 'list[str]' + } + + attribute_map = { + 'badge_slugs': 'badge_slugs' + } + + def __init__(self, badge_slugs=None, _configuration=None): # noqa: E501 + """UserBadgeOption - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._badge_slugs = None + self.discriminator = None + + if badge_slugs is not None: + self.badge_slugs = badge_slugs + + @property + def badge_slugs(self): + """Gets the badge_slugs of this UserBadgeOption. # noqa: E501 + + + :return: The badge_slugs of this UserBadgeOption. # noqa: E501 + :rtype: list[str] + """ + return self._badge_slugs + + @badge_slugs.setter + def badge_slugs(self, badge_slugs): + """Sets the badge_slugs of this UserBadgeOption. + + + :param badge_slugs: The badge_slugs of this UserBadgeOption. # noqa: E501 + :type: list[str] + """ + + self._badge_slugs = badge_slugs + + 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(UserBadgeOption, 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, UserBadgeOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserBadgeOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/user_heatmap_data.py b/swagger_client/models/user_heatmap_data.py new file mode 100644 index 0000000..bf51c9f --- /dev/null +++ b/swagger_client/models/user_heatmap_data.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class UserHeatmapData(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 = { + 'contributions': 'int', + 'timestamp': 'TimeStamp' + } + + attribute_map = { + 'contributions': 'contributions', + 'timestamp': 'timestamp' + } + + def __init__(self, contributions=None, timestamp=None, _configuration=None): # noqa: E501 + """UserHeatmapData - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._contributions = None + self._timestamp = None + self.discriminator = None + + if contributions is not None: + self.contributions = contributions + if timestamp is not None: + self.timestamp = timestamp + + @property + def contributions(self): + """Gets the contributions of this UserHeatmapData. # noqa: E501 + + + :return: The contributions of this UserHeatmapData. # noqa: E501 + :rtype: int + """ + return self._contributions + + @contributions.setter + def contributions(self, contributions): + """Sets the contributions of this UserHeatmapData. + + + :param contributions: The contributions of this UserHeatmapData. # noqa: E501 + :type: int + """ + + self._contributions = contributions + + @property + def timestamp(self): + """Gets the timestamp of this UserHeatmapData. # noqa: E501 + + + :return: The timestamp of this UserHeatmapData. # noqa: E501 + :rtype: TimeStamp + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this UserHeatmapData. + + + :param timestamp: The timestamp of this UserHeatmapData. # noqa: E501 + :type: TimeStamp + """ + + self._timestamp = timestamp + + 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(UserHeatmapData, 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, UserHeatmapData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserHeatmapData): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/user_settings.py b/swagger_client/models/user_settings.py new file mode 100644 index 0000000..80e9fb2 --- /dev/null +++ b/swagger_client/models/user_settings.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class UserSettings(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', + 'diff_view_style': 'str', + 'full_name': 'str', + 'hide_activity': 'bool', + 'hide_email': 'bool', + 'language': 'str', + 'location': 'str', + 'theme': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'diff_view_style': 'diff_view_style', + 'full_name': 'full_name', + 'hide_activity': 'hide_activity', + 'hide_email': 'hide_email', + 'language': 'language', + 'location': 'location', + 'theme': 'theme', + 'website': 'website' + } + + def __init__(self, description=None, diff_view_style=None, full_name=None, hide_activity=None, hide_email=None, language=None, location=None, theme=None, website=None, _configuration=None): # noqa: E501 + """UserSettings - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._diff_view_style = None + self._full_name = None + self._hide_activity = None + self._hide_email = None + self._language = None + self._location = None + self._theme = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if diff_view_style is not None: + self.diff_view_style = diff_view_style + if full_name is not None: + self.full_name = full_name + if hide_activity is not None: + self.hide_activity = hide_activity + if hide_email is not None: + self.hide_email = hide_email + if language is not None: + self.language = language + if location is not None: + self.location = location + if theme is not None: + self.theme = theme + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this UserSettings. # noqa: E501 + + + :return: The description of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UserSettings. + + + :param description: The description of this UserSettings. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def diff_view_style(self): + """Gets the diff_view_style of this UserSettings. # noqa: E501 + + + :return: The diff_view_style of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._diff_view_style + + @diff_view_style.setter + def diff_view_style(self, diff_view_style): + """Sets the diff_view_style of this UserSettings. + + + :param diff_view_style: The diff_view_style of this UserSettings. # noqa: E501 + :type: str + """ + + self._diff_view_style = diff_view_style + + @property + def full_name(self): + """Gets the full_name of this UserSettings. # noqa: E501 + + + :return: The full_name of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this UserSettings. + + + :param full_name: The full_name of this UserSettings. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def hide_activity(self): + """Gets the hide_activity of this UserSettings. # noqa: E501 + + + :return: The hide_activity of this UserSettings. # noqa: E501 + :rtype: bool + """ + return self._hide_activity + + @hide_activity.setter + def hide_activity(self, hide_activity): + """Sets the hide_activity of this UserSettings. + + + :param hide_activity: The hide_activity of this UserSettings. # noqa: E501 + :type: bool + """ + + self._hide_activity = hide_activity + + @property + def hide_email(self): + """Gets the hide_email of this UserSettings. # noqa: E501 + + Privacy # noqa: E501 + + :return: The hide_email of this UserSettings. # noqa: E501 + :rtype: bool + """ + return self._hide_email + + @hide_email.setter + def hide_email(self, hide_email): + """Sets the hide_email of this UserSettings. + + Privacy # noqa: E501 + + :param hide_email: The hide_email of this UserSettings. # noqa: E501 + :type: bool + """ + + self._hide_email = hide_email + + @property + def language(self): + """Gets the language of this UserSettings. # noqa: E501 + + + :return: The language of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this UserSettings. + + + :param language: The language of this UserSettings. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def location(self): + """Gets the location of this UserSettings. # noqa: E501 + + + :return: The location of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this UserSettings. + + + :param location: The location of this UserSettings. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def theme(self): + """Gets the theme of this UserSettings. # noqa: E501 + + + :return: The theme of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._theme + + @theme.setter + def theme(self, theme): + """Sets the theme of this UserSettings. + + + :param theme: The theme of this UserSettings. # noqa: E501 + :type: str + """ + + self._theme = theme + + @property + def website(self): + """Gets the website of this UserSettings. # noqa: E501 + + + :return: The website of this UserSettings. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this UserSettings. + + + :param website: The website of this UserSettings. # noqa: E501 + :type: str + """ + + self._website = website + + 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(UserSettings, 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, UserSettings): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserSettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/user_settings_options.py b/swagger_client/models/user_settings_options.py new file mode 100644 index 0000000..af3ddba --- /dev/null +++ b/swagger_client/models/user_settings_options.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class UserSettingsOptions(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', + 'diff_view_style': 'str', + 'full_name': 'str', + 'hide_activity': 'bool', + 'hide_email': 'bool', + 'language': 'str', + 'location': 'str', + 'theme': 'str', + 'website': 'str' + } + + attribute_map = { + 'description': 'description', + 'diff_view_style': 'diff_view_style', + 'full_name': 'full_name', + 'hide_activity': 'hide_activity', + 'hide_email': 'hide_email', + 'language': 'language', + 'location': 'location', + 'theme': 'theme', + 'website': 'website' + } + + def __init__(self, description=None, diff_view_style=None, full_name=None, hide_activity=None, hide_email=None, language=None, location=None, theme=None, website=None, _configuration=None): # noqa: E501 + """UserSettingsOptions - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._diff_view_style = None + self._full_name = None + self._hide_activity = None + self._hide_email = None + self._language = None + self._location = None + self._theme = None + self._website = None + self.discriminator = None + + if description is not None: + self.description = description + if diff_view_style is not None: + self.diff_view_style = diff_view_style + if full_name is not None: + self.full_name = full_name + if hide_activity is not None: + self.hide_activity = hide_activity + if hide_email is not None: + self.hide_email = hide_email + if language is not None: + self.language = language + if location is not None: + self.location = location + if theme is not None: + self.theme = theme + if website is not None: + self.website = website + + @property + def description(self): + """Gets the description of this UserSettingsOptions. # noqa: E501 + + + :return: The description of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UserSettingsOptions. + + + :param description: The description of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def diff_view_style(self): + """Gets the diff_view_style of this UserSettingsOptions. # noqa: E501 + + + :return: The diff_view_style of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._diff_view_style + + @diff_view_style.setter + def diff_view_style(self, diff_view_style): + """Sets the diff_view_style of this UserSettingsOptions. + + + :param diff_view_style: The diff_view_style of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._diff_view_style = diff_view_style + + @property + def full_name(self): + """Gets the full_name of this UserSettingsOptions. # noqa: E501 + + + :return: The full_name of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this UserSettingsOptions. + + + :param full_name: The full_name of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def hide_activity(self): + """Gets the hide_activity of this UserSettingsOptions. # noqa: E501 + + + :return: The hide_activity of this UserSettingsOptions. # noqa: E501 + :rtype: bool + """ + return self._hide_activity + + @hide_activity.setter + def hide_activity(self, hide_activity): + """Sets the hide_activity of this UserSettingsOptions. + + + :param hide_activity: The hide_activity of this UserSettingsOptions. # noqa: E501 + :type: bool + """ + + self._hide_activity = hide_activity + + @property + def hide_email(self): + """Gets the hide_email of this UserSettingsOptions. # noqa: E501 + + Privacy # noqa: E501 + + :return: The hide_email of this UserSettingsOptions. # noqa: E501 + :rtype: bool + """ + return self._hide_email + + @hide_email.setter + def hide_email(self, hide_email): + """Sets the hide_email of this UserSettingsOptions. + + Privacy # noqa: E501 + + :param hide_email: The hide_email of this UserSettingsOptions. # noqa: E501 + :type: bool + """ + + self._hide_email = hide_email + + @property + def language(self): + """Gets the language of this UserSettingsOptions. # noqa: E501 + + + :return: The language of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this UserSettingsOptions. + + + :param language: The language of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._language = language + + @property + def location(self): + """Gets the location of this UserSettingsOptions. # noqa: E501 + + + :return: The location of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """Sets the location of this UserSettingsOptions. + + + :param location: The location of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._location = location + + @property + def theme(self): + """Gets the theme of this UserSettingsOptions. # noqa: E501 + + + :return: The theme of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._theme + + @theme.setter + def theme(self, theme): + """Sets the theme of this UserSettingsOptions. + + + :param theme: The theme of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._theme = theme + + @property + def website(self): + """Gets the website of this UserSettingsOptions. # noqa: E501 + + + :return: The website of this UserSettingsOptions. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this UserSettingsOptions. + + + :param website: The website of this UserSettingsOptions. # noqa: E501 + :type: str + """ + + self._website = website + + 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(UserSettingsOptions, 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, UserSettingsOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserSettingsOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/watch_info.py b/swagger_client/models/watch_info.py new file mode 100644 index 0000000..4de8ed3 --- /dev/null +++ b/swagger_client/models/watch_info.py @@ -0,0 +1,265 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class WatchInfo(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 = { + 'created_at': 'datetime', + 'ignored': 'bool', + 'reason': 'object', + 'repository_url': 'str', + 'subscribed': 'bool', + 'url': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'ignored': 'ignored', + 'reason': 'reason', + 'repository_url': 'repository_url', + 'subscribed': 'subscribed', + 'url': 'url' + } + + def __init__(self, created_at=None, ignored=None, reason=None, repository_url=None, subscribed=None, url=None, _configuration=None): # noqa: E501 + """WatchInfo - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._created_at = None + self._ignored = None + self._reason = None + self._repository_url = None + self._subscribed = None + self._url = None + self.discriminator = None + + if created_at is not None: + self.created_at = created_at + if ignored is not None: + self.ignored = ignored + if reason is not None: + self.reason = reason + if repository_url is not None: + self.repository_url = repository_url + if subscribed is not None: + self.subscribed = subscribed + if url is not None: + self.url = url + + @property + def created_at(self): + """Gets the created_at of this WatchInfo. # noqa: E501 + + The timestamp when the watch status was created # noqa: E501 + + :return: The created_at of this WatchInfo. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WatchInfo. + + The timestamp when the watch status was created # noqa: E501 + + :param created_at: The created_at of this WatchInfo. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def ignored(self): + """Gets the ignored of this WatchInfo. # noqa: E501 + + Whether notifications for the repository are ignored # noqa: E501 + + :return: The ignored of this WatchInfo. # noqa: E501 + :rtype: bool + """ + return self._ignored + + @ignored.setter + def ignored(self, ignored): + """Sets the ignored of this WatchInfo. + + Whether notifications for the repository are ignored # noqa: E501 + + :param ignored: The ignored of this WatchInfo. # noqa: E501 + :type: bool + """ + + self._ignored = ignored + + @property + def reason(self): + """Gets the reason of this WatchInfo. # noqa: E501 + + The reason for the current watch status # noqa: E501 + + :return: The reason of this WatchInfo. # noqa: E501 + :rtype: object + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this WatchInfo. + + The reason for the current watch status # noqa: E501 + + :param reason: The reason of this WatchInfo. # noqa: E501 + :type: object + """ + + self._reason = reason + + @property + def repository_url(self): + """Gets the repository_url of this WatchInfo. # noqa: E501 + + The URL of the repository being watched # noqa: E501 + + :return: The repository_url of this WatchInfo. # noqa: E501 + :rtype: str + """ + return self._repository_url + + @repository_url.setter + def repository_url(self, repository_url): + """Sets the repository_url of this WatchInfo. + + The URL of the repository being watched # noqa: E501 + + :param repository_url: The repository_url of this WatchInfo. # noqa: E501 + :type: str + """ + + self._repository_url = repository_url + + @property + def subscribed(self): + """Gets the subscribed of this WatchInfo. # noqa: E501 + + Whether the repository is being watched for notifications # noqa: E501 + + :return: The subscribed of this WatchInfo. # noqa: E501 + :rtype: bool + """ + return self._subscribed + + @subscribed.setter + def subscribed(self, subscribed): + """Sets the subscribed of this WatchInfo. + + Whether the repository is being watched for notifications # noqa: E501 + + :param subscribed: The subscribed of this WatchInfo. # noqa: E501 + :type: bool + """ + + self._subscribed = subscribed + + @property + def url(self): + """Gets the url of this WatchInfo. # noqa: E501 + + The URL for managing the watch status # noqa: E501 + + :return: The url of this WatchInfo. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this WatchInfo. + + The URL for managing the watch status # noqa: E501 + + :param url: The url of this WatchInfo. # 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(WatchInfo, 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, WatchInfo): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WatchInfo): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/wiki_commit.py b/swagger_client/models/wiki_commit.py new file mode 100644 index 0000000..3d2381a --- /dev/null +++ b/swagger_client/models/wiki_commit.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class WikiCommit(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 = { + 'author': 'CommitUser', + 'commiter': 'CommitUser', + 'message': 'str', + 'sha': 'str' + } + + attribute_map = { + 'author': 'author', + 'commiter': 'commiter', + 'message': 'message', + 'sha': 'sha' + } + + def __init__(self, author=None, commiter=None, message=None, sha=None, _configuration=None): # noqa: E501 + """WikiCommit - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._author = None + self._commiter = None + self._message = None + self._sha = None + self.discriminator = None + + if author is not None: + self.author = author + if commiter is not None: + self.commiter = commiter + if message is not None: + self.message = message + if sha is not None: + self.sha = sha + + @property + def author(self): + """Gets the author of this WikiCommit. # noqa: E501 + + + :return: The author of this WikiCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this WikiCommit. + + + :param author: The author of this WikiCommit. # noqa: E501 + :type: CommitUser + """ + + self._author = author + + @property + def commiter(self): + """Gets the commiter of this WikiCommit. # noqa: E501 + + + :return: The commiter of this WikiCommit. # noqa: E501 + :rtype: CommitUser + """ + return self._commiter + + @commiter.setter + def commiter(self, commiter): + """Sets the commiter of this WikiCommit. + + + :param commiter: The commiter of this WikiCommit. # noqa: E501 + :type: CommitUser + """ + + self._commiter = commiter + + @property + def message(self): + """Gets the message of this WikiCommit. # noqa: E501 + + The commit message # noqa: E501 + + :return: The message of this WikiCommit. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this WikiCommit. + + The commit message # noqa: E501 + + :param message: The message of this WikiCommit. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def sha(self): + """Gets the sha of this WikiCommit. # noqa: E501 + + The commit SHA hash # noqa: E501 + + :return: The sha of this WikiCommit. # noqa: E501 + :rtype: str + """ + return self._sha + + @sha.setter + def sha(self, sha): + """Sets the sha of this WikiCommit. + + The commit SHA hash # noqa: E501 + + :param sha: The sha of this WikiCommit. # noqa: E501 + :type: str + """ + + self._sha = sha + + 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(WikiCommit, 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, WikiCommit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WikiCommit): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/wiki_commit_list.py b/swagger_client/models/wiki_commit_list.py new file mode 100644 index 0000000..a37718b --- /dev/null +++ b/swagger_client/models/wiki_commit_list.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class WikiCommitList(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 = { + 'commits': 'list[WikiCommit]', + 'count': 'int' + } + + attribute_map = { + 'commits': 'commits', + 'count': 'count' + } + + def __init__(self, commits=None, count=None, _configuration=None): # noqa: E501 + """WikiCommitList - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commits = None + self._count = None + self.discriminator = None + + if commits is not None: + self.commits = commits + if count is not None: + self.count = count + + @property + def commits(self): + """Gets the commits of this WikiCommitList. # noqa: E501 + + The list of wiki commits # noqa: E501 + + :return: The commits of this WikiCommitList. # noqa: E501 + :rtype: list[WikiCommit] + """ + return self._commits + + @commits.setter + def commits(self, commits): + """Sets the commits of this WikiCommitList. + + The list of wiki commits # noqa: E501 + + :param commits: The commits of this WikiCommitList. # noqa: E501 + :type: list[WikiCommit] + """ + + self._commits = commits + + @property + def count(self): + """Gets the count of this WikiCommitList. # noqa: E501 + + The total count of commits # noqa: E501 + + :return: The count of this WikiCommitList. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this WikiCommitList. + + The total count of commits # noqa: E501 + + :param count: The count of this WikiCommitList. # noqa: E501 + :type: int + """ + + self._count = count + + 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(WikiCommitList, 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, WikiCommitList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WikiCommitList): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/wiki_page.py b/swagger_client/models/wiki_page.py new file mode 100644 index 0000000..a8a8165 --- /dev/null +++ b/swagger_client/models/wiki_page.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class WikiPage(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 = { + 'commit_count': 'int', + 'content_base64': 'str', + 'footer': 'str', + 'html_url': 'str', + 'last_commit': 'WikiCommit', + 'sidebar': 'str', + 'sub_url': 'str', + 'title': 'str' + } + + attribute_map = { + 'commit_count': 'commit_count', + 'content_base64': 'content_base64', + 'footer': 'footer', + 'html_url': 'html_url', + 'last_commit': 'last_commit', + 'sidebar': 'sidebar', + 'sub_url': 'sub_url', + 'title': 'title' + } + + def __init__(self, commit_count=None, content_base64=None, footer=None, html_url=None, last_commit=None, sidebar=None, sub_url=None, title=None, _configuration=None): # noqa: E501 + """WikiPage - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commit_count = None + self._content_base64 = None + self._footer = None + self._html_url = None + self._last_commit = None + self._sidebar = None + self._sub_url = None + self._title = None + self.discriminator = None + + if commit_count is not None: + self.commit_count = commit_count + if content_base64 is not None: + self.content_base64 = content_base64 + if footer is not None: + self.footer = footer + if html_url is not None: + self.html_url = html_url + if last_commit is not None: + self.last_commit = last_commit + if sidebar is not None: + self.sidebar = sidebar + if sub_url is not None: + self.sub_url = sub_url + if title is not None: + self.title = title + + @property + def commit_count(self): + """Gets the commit_count of this WikiPage. # noqa: E501 + + The number of commits that modified this page # noqa: E501 + + :return: The commit_count of this WikiPage. # noqa: E501 + :rtype: int + """ + return self._commit_count + + @commit_count.setter + def commit_count(self, commit_count): + """Sets the commit_count of this WikiPage. + + The number of commits that modified this page # noqa: E501 + + :param commit_count: The commit_count of this WikiPage. # noqa: E501 + :type: int + """ + + self._commit_count = commit_count + + @property + def content_base64(self): + """Gets the content_base64 of this WikiPage. # noqa: E501 + + Page content, base64 encoded # noqa: E501 + + :return: The content_base64 of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._content_base64 + + @content_base64.setter + def content_base64(self, content_base64): + """Sets the content_base64 of this WikiPage. + + Page content, base64 encoded # noqa: E501 + + :param content_base64: The content_base64 of this WikiPage. # noqa: E501 + :type: str + """ + + self._content_base64 = content_base64 + + @property + def footer(self): + """Gets the footer of this WikiPage. # noqa: E501 + + The footer content for the wiki page # noqa: E501 + + :return: The footer of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._footer + + @footer.setter + def footer(self, footer): + """Sets the footer of this WikiPage. + + The footer content for the wiki page # noqa: E501 + + :param footer: The footer of this WikiPage. # noqa: E501 + :type: str + """ + + self._footer = footer + + @property + def html_url(self): + """Gets the html_url of this WikiPage. # noqa: E501 + + The HTML URL to view the wiki page # noqa: E501 + + :return: The html_url of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this WikiPage. + + The HTML URL to view the wiki page # noqa: E501 + + :param html_url: The html_url of this WikiPage. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def last_commit(self): + """Gets the last_commit of this WikiPage. # noqa: E501 + + + :return: The last_commit of this WikiPage. # noqa: E501 + :rtype: WikiCommit + """ + return self._last_commit + + @last_commit.setter + def last_commit(self, last_commit): + """Sets the last_commit of this WikiPage. + + + :param last_commit: The last_commit of this WikiPage. # noqa: E501 + :type: WikiCommit + """ + + self._last_commit = last_commit + + @property + def sidebar(self): + """Gets the sidebar of this WikiPage. # noqa: E501 + + The sidebar content for the wiki page # noqa: E501 + + :return: The sidebar of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._sidebar + + @sidebar.setter + def sidebar(self, sidebar): + """Sets the sidebar of this WikiPage. + + The sidebar content for the wiki page # noqa: E501 + + :param sidebar: The sidebar of this WikiPage. # noqa: E501 + :type: str + """ + + self._sidebar = sidebar + + @property + def sub_url(self): + """Gets the sub_url of this WikiPage. # noqa: E501 + + The sub URL path for the wiki page # noqa: E501 + + :return: The sub_url of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._sub_url + + @sub_url.setter + def sub_url(self, sub_url): + """Sets the sub_url of this WikiPage. + + The sub URL path for the wiki page # noqa: E501 + + :param sub_url: The sub_url of this WikiPage. # noqa: E501 + :type: str + """ + + self._sub_url = sub_url + + @property + def title(self): + """Gets the title of this WikiPage. # noqa: E501 + + The title of the wiki page # noqa: E501 + + :return: The title of this WikiPage. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this WikiPage. + + The title of the wiki page # noqa: E501 + + :param title: The title of this WikiPage. # noqa: E501 + :type: str + """ + + self._title = title + + 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(WikiPage, 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, WikiPage): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WikiPage): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/models/wiki_page_meta_data.py b/swagger_client/models/wiki_page_meta_data.py new file mode 100644 index 0000000..8b8ac6b --- /dev/null +++ b/swagger_client/models/wiki_page_meta_data.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from swagger_client.configuration import Configuration + + +class WikiPageMetaData(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 = { + 'html_url': 'str', + 'last_commit': 'WikiCommit', + 'sub_url': 'str', + 'title': 'str' + } + + attribute_map = { + 'html_url': 'html_url', + 'last_commit': 'last_commit', + 'sub_url': 'sub_url', + 'title': 'title' + } + + def __init__(self, html_url=None, last_commit=None, sub_url=None, title=None, _configuration=None): # noqa: E501 + """WikiPageMetaData - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._html_url = None + self._last_commit = None + self._sub_url = None + self._title = None + self.discriminator = None + + if html_url is not None: + self.html_url = html_url + if last_commit is not None: + self.last_commit = last_commit + if sub_url is not None: + self.sub_url = sub_url + if title is not None: + self.title = title + + @property + def html_url(self): + """Gets the html_url of this WikiPageMetaData. # noqa: E501 + + The HTML URL to view the wiki page # noqa: E501 + + :return: The html_url of this WikiPageMetaData. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this WikiPageMetaData. + + The HTML URL to view the wiki page # noqa: E501 + + :param html_url: The html_url of this WikiPageMetaData. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def last_commit(self): + """Gets the last_commit of this WikiPageMetaData. # noqa: E501 + + + :return: The last_commit of this WikiPageMetaData. # noqa: E501 + :rtype: WikiCommit + """ + return self._last_commit + + @last_commit.setter + def last_commit(self, last_commit): + """Sets the last_commit of this WikiPageMetaData. + + + :param last_commit: The last_commit of this WikiPageMetaData. # noqa: E501 + :type: WikiCommit + """ + + self._last_commit = last_commit + + @property + def sub_url(self): + """Gets the sub_url of this WikiPageMetaData. # noqa: E501 + + The sub URL path for the wiki page # noqa: E501 + + :return: The sub_url of this WikiPageMetaData. # noqa: E501 + :rtype: str + """ + return self._sub_url + + @sub_url.setter + def sub_url(self, sub_url): + """Sets the sub_url of this WikiPageMetaData. + + The sub URL path for the wiki page # noqa: E501 + + :param sub_url: The sub_url of this WikiPageMetaData. # noqa: E501 + :type: str + """ + + self._sub_url = sub_url + + @property + def title(self): + """Gets the title of this WikiPageMetaData. # noqa: E501 + + The title of the wiki page # noqa: E501 + + :return: The title of this WikiPageMetaData. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this WikiPageMetaData. + + The title of the wiki page # noqa: E501 + + :param title: The title of this WikiPageMetaData. # noqa: E501 + :type: str + """ + + self._title = title + + 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(WikiPageMetaData, 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, WikiPageMetaData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WikiPageMetaData): + return True + + return self.to_dict() != other.to_dict() diff --git a/swagger_client/rest.py b/swagger_client/rest.py new file mode 100644 index 0000000..d87a886 --- /dev/null +++ b/swagger_client/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + 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.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(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) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # 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/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_access_token.py b/test/test_access_token.py new file mode 100644 index 0000000..fba151f --- /dev/null +++ b/test/test_access_token.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.access_token import AccessToken # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAccessToken(unittest.TestCase): + """AccessToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccessToken(self): + """Test AccessToken""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.access_token.AccessToken() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_artifact.py b/test/test_action_artifact.py new file mode 100644 index 0000000..0d609fc --- /dev/null +++ b/test/test_action_artifact.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_artifact import ActionArtifact # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionArtifact(unittest.TestCase): + """ActionArtifact unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionArtifact(self): + """Test ActionArtifact""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_artifact.ActionArtifact() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_artifacts_response.py b/test/test_action_artifacts_response.py new file mode 100644 index 0000000..cc24686 --- /dev/null +++ b/test/test_action_artifacts_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_artifacts_response import ActionArtifactsResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionArtifactsResponse(unittest.TestCase): + """ActionArtifactsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionArtifactsResponse(self): + """Test ActionArtifactsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_artifacts_response.ActionArtifactsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_runner.py b/test/test_action_runner.py new file mode 100644 index 0000000..932b870 --- /dev/null +++ b/test/test_action_runner.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_runner import ActionRunner # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionRunner(unittest.TestCase): + """ActionRunner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionRunner(self): + """Test ActionRunner""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_runner.ActionRunner() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_runner_label.py b/test/test_action_runner_label.py new file mode 100644 index 0000000..1ddfbf6 --- /dev/null +++ b/test/test_action_runner_label.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_runner_label import ActionRunnerLabel # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionRunnerLabel(unittest.TestCase): + """ActionRunnerLabel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionRunnerLabel(self): + """Test ActionRunnerLabel""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_runner_label.ActionRunnerLabel() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_runners_response.py b/test/test_action_runners_response.py new file mode 100644 index 0000000..f6bc54a --- /dev/null +++ b/test/test_action_runners_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_runners_response import ActionRunnersResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionRunnersResponse(unittest.TestCase): + """ActionRunnersResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionRunnersResponse(self): + """Test ActionRunnersResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_runners_response.ActionRunnersResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_task.py b/test/test_action_task.py new file mode 100644 index 0000000..0175677 --- /dev/null +++ b/test/test_action_task.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_task import ActionTask # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionTask(unittest.TestCase): + """ActionTask unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionTask(self): + """Test ActionTask""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_task.ActionTask() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_task_response.py b/test/test_action_task_response.py new file mode 100644 index 0000000..78a4927 --- /dev/null +++ b/test/test_action_task_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_task_response import ActionTaskResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionTaskResponse(unittest.TestCase): + """ActionTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionTaskResponse(self): + """Test ActionTaskResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_task_response.ActionTaskResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_variable.py b/test/test_action_variable.py new file mode 100644 index 0000000..fee96b7 --- /dev/null +++ b/test/test_action_variable.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_variable import ActionVariable # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionVariable(unittest.TestCase): + """ActionVariable unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionVariable(self): + """Test ActionVariable""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_variable.ActionVariable() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_workflow.py b/test/test_action_workflow.py new file mode 100644 index 0000000..58705c1 --- /dev/null +++ b/test/test_action_workflow.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_workflow import ActionWorkflow # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionWorkflow(unittest.TestCase): + """ActionWorkflow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionWorkflow(self): + """Test ActionWorkflow""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_workflow.ActionWorkflow() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_workflow_job.py b/test/test_action_workflow_job.py new file mode 100644 index 0000000..8366f62 --- /dev/null +++ b/test/test_action_workflow_job.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_workflow_job import ActionWorkflowJob # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionWorkflowJob(unittest.TestCase): + """ActionWorkflowJob unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionWorkflowJob(self): + """Test ActionWorkflowJob""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_workflow_job.ActionWorkflowJob() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_workflow_jobs_response.py b/test/test_action_workflow_jobs_response.py new file mode 100644 index 0000000..09b7701 --- /dev/null +++ b/test/test_action_workflow_jobs_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_workflow_jobs_response import ActionWorkflowJobsResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionWorkflowJobsResponse(unittest.TestCase): + """ActionWorkflowJobsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionWorkflowJobsResponse(self): + """Test ActionWorkflowJobsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_workflow_jobs_response.ActionWorkflowJobsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_workflow_response.py b/test/test_action_workflow_response.py new file mode 100644 index 0000000..f93baae --- /dev/null +++ b/test/test_action_workflow_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_workflow_response import ActionWorkflowResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionWorkflowResponse(unittest.TestCase): + """ActionWorkflowResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionWorkflowResponse(self): + """Test ActionWorkflowResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_workflow_response.ActionWorkflowResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_workflow_run.py b/test/test_action_workflow_run.py new file mode 100644 index 0000000..6eae159 --- /dev/null +++ b/test/test_action_workflow_run.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_workflow_run import ActionWorkflowRun # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionWorkflowRun(unittest.TestCase): + """ActionWorkflowRun unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionWorkflowRun(self): + """Test ActionWorkflowRun""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_workflow_run.ActionWorkflowRun() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_workflow_runs_response.py b/test/test_action_workflow_runs_response.py new file mode 100644 index 0000000..75db266 --- /dev/null +++ b/test/test_action_workflow_runs_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_workflow_runs_response import ActionWorkflowRunsResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionWorkflowRunsResponse(unittest.TestCase): + """ActionWorkflowRunsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionWorkflowRunsResponse(self): + """Test ActionWorkflowRunsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_workflow_runs_response.ActionWorkflowRunsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_action_workflow_step.py b/test/test_action_workflow_step.py new file mode 100644 index 0000000..7158335 --- /dev/null +++ b/test/test_action_workflow_step.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.action_workflow_step import ActionWorkflowStep # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActionWorkflowStep(unittest.TestCase): + """ActionWorkflowStep unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActionWorkflowStep(self): + """Test ActionWorkflowStep""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.action_workflow_step.ActionWorkflowStep() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity.py b/test/test_activity.py new file mode 100644 index 0000000..2140430 --- /dev/null +++ b/test/test_activity.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.activity import Activity # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActivity(unittest.TestCase): + """Activity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActivity(self): + """Test Activity""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.activity.Activity() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_pub.py b/test/test_activity_pub.py new file mode 100644 index 0000000..ffde81a --- /dev/null +++ b/test/test_activity_pub.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.activity_pub import ActivityPub # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActivityPub(unittest.TestCase): + """ActivityPub unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActivityPub(self): + """Test ActivityPub""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.activity_pub.ActivityPub() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activitypub_api.py b/test/test_activitypub_api.py new file mode 100644 index 0000000..5a2a2f3 --- /dev/null +++ b/test/test_activitypub_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.activitypub_api import ActivitypubApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestActivitypubApi(unittest.TestCase): + """ActivitypubApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.activitypub_api.ActivitypubApi() # noqa: E501 + + def tearDown(self): + pass + + def test_activitypub_person(self): + """Test case for activitypub_person + + Returns the Person actor for a user # noqa: E501 + """ + pass + + def test_activitypub_person_inbox(self): + """Test case for activitypub_person_inbox + + Send to the inbox # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_collaborator_option.py b/test/test_add_collaborator_option.py new file mode 100644 index 0000000..c8a61a3 --- /dev/null +++ b/test/test_add_collaborator_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.add_collaborator_option import AddCollaboratorOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAddCollaboratorOption(unittest.TestCase): + """AddCollaboratorOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAddCollaboratorOption(self): + """Test AddCollaboratorOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.add_collaborator_option.AddCollaboratorOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_time_option.py b/test/test_add_time_option.py new file mode 100644 index 0000000..5b31545 --- /dev/null +++ b/test/test_add_time_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.add_time_option import AddTimeOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAddTimeOption(unittest.TestCase): + """AddTimeOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAddTimeOption(self): + """Test AddTimeOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.add_time_option.AddTimeOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_api.py b/test/test_admin_api.py new file mode 100644 index 0000000..70c683c --- /dev/null +++ b/test/test_admin_api.py @@ -0,0 +1,258 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.admin_api import AdminApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAdminApi(unittest.TestCase): + """AdminApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.admin_api.AdminApi() # noqa: E501 + + def tearDown(self): + pass + + def test_admin_add_user_badges(self): + """Test case for admin_add_user_badges + + Add a badge to a user # noqa: E501 + """ + pass + + def test_admin_adopt_repository(self): + """Test case for admin_adopt_repository + + Adopt unadopted files as a repository # noqa: E501 + """ + pass + + def test_admin_create_hook(self): + """Test case for admin_create_hook + + Create a hook # noqa: E501 + """ + pass + + def test_admin_create_org(self): + """Test case for admin_create_org + + Create an organization # noqa: E501 + """ + pass + + def test_admin_create_public_key(self): + """Test case for admin_create_public_key + + Add a public key on behalf of a user # noqa: E501 + """ + pass + + def test_admin_create_repo(self): + """Test case for admin_create_repo + + Create a repository on behalf of a user # noqa: E501 + """ + pass + + def test_admin_create_runner_registration_token(self): + """Test case for admin_create_runner_registration_token + + Get an global actions runner registration token # noqa: E501 + """ + pass + + def test_admin_create_user(self): + """Test case for admin_create_user + + Create a user # noqa: E501 + """ + pass + + def test_admin_cron_list(self): + """Test case for admin_cron_list + + List cron tasks # noqa: E501 + """ + pass + + def test_admin_cron_run(self): + """Test case for admin_cron_run + + Run cron task # noqa: E501 + """ + pass + + def test_admin_delete_hook(self): + """Test case for admin_delete_hook + + Delete a hook # noqa: E501 + """ + pass + + def test_admin_delete_unadopted_repository(self): + """Test case for admin_delete_unadopted_repository + + Delete unadopted files # noqa: E501 + """ + pass + + def test_admin_delete_user(self): + """Test case for admin_delete_user + + Delete a user # noqa: E501 + """ + pass + + def test_admin_delete_user_badges(self): + """Test case for admin_delete_user_badges + + Remove a badge from a user # noqa: E501 + """ + pass + + def test_admin_delete_user_public_key(self): + """Test case for admin_delete_user_public_key + + Delete a user's public key # noqa: E501 + """ + pass + + def test_admin_edit_hook(self): + """Test case for admin_edit_hook + + Update a hook # noqa: E501 + """ + pass + + def test_admin_edit_user(self): + """Test case for admin_edit_user + + Edit an existing user # noqa: E501 + """ + pass + + def test_admin_get_all_emails(self): + """Test case for admin_get_all_emails + + List all emails # noqa: E501 + """ + pass + + def test_admin_get_all_orgs(self): + """Test case for admin_get_all_orgs + + List all organizations # noqa: E501 + """ + pass + + def test_admin_get_hook(self): + """Test case for admin_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_admin_get_runner_registration_token(self): + """Test case for admin_get_runner_registration_token + + Get an global actions runner registration token # noqa: E501 + """ + pass + + def test_admin_list_hooks(self): + """Test case for admin_list_hooks + + List system's webhooks # noqa: E501 + """ + pass + + def test_admin_list_user_badges(self): + """Test case for admin_list_user_badges + + List a user's badges # noqa: E501 + """ + pass + + def test_admin_rename_user(self): + """Test case for admin_rename_user + + Rename a user # noqa: E501 + """ + pass + + def test_admin_search_emails(self): + """Test case for admin_search_emails + + Search all emails # noqa: E501 + """ + pass + + def test_admin_search_users(self): + """Test case for admin_search_users + + Search users according filter conditions # noqa: E501 + """ + pass + + def test_admin_unadopted_list(self): + """Test case for admin_unadopted_list + + List unadopted repositories # noqa: E501 + """ + pass + + def test_delete_admin_runner(self): + """Test case for delete_admin_runner + + Delete an global runner # noqa: E501 + """ + pass + + def test_get_admin_runner(self): + """Test case for get_admin_runner + + Get an global runner # noqa: E501 + """ + pass + + def test_get_admin_runners(self): + """Test case for get_admin_runners + + Get all runners # noqa: E501 + """ + pass + + def test_list_admin_workflow_jobs(self): + """Test case for list_admin_workflow_jobs + + Lists all jobs # noqa: E501 + """ + pass + + def test_list_admin_workflow_runs(self): + """Test case for list_admin_workflow_runs + + Lists all runs # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_annotated_tag.py b/test/test_annotated_tag.py new file mode 100644 index 0000000..a43406f --- /dev/null +++ b/test/test_annotated_tag.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.annotated_tag import AnnotatedTag # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAnnotatedTag(unittest.TestCase): + """AnnotatedTag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnnotatedTag(self): + """Test AnnotatedTag""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.annotated_tag.AnnotatedTag() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_annotated_tag_object.py b/test/test_annotated_tag_object.py new file mode 100644 index 0000000..830593a --- /dev/null +++ b/test/test_annotated_tag_object.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.annotated_tag_object import AnnotatedTagObject # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAnnotatedTagObject(unittest.TestCase): + """AnnotatedTagObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnnotatedTagObject(self): + """Test AnnotatedTagObject""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.annotated_tag_object.AnnotatedTagObject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_error.py b/test/test_api_error.py new file mode 100644 index 0000000..d5ba218 --- /dev/null +++ b/test/test_api_error.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.api_error import APIError # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAPIError(unittest.TestCase): + """APIError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAPIError(self): + """Test APIError""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.api_error.APIError() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_apply_diff_patch_file_options.py b/test/test_apply_diff_patch_file_options.py new file mode 100644 index 0000000..4a0040d --- /dev/null +++ b/test/test_apply_diff_patch_file_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.apply_diff_patch_file_options import ApplyDiffPatchFileOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestApplyDiffPatchFileOptions(unittest.TestCase): + """ApplyDiffPatchFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplyDiffPatchFileOptions(self): + """Test ApplyDiffPatchFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.apply_diff_patch_file_options.ApplyDiffPatchFileOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attachment.py b/test/test_attachment.py new file mode 100644 index 0000000..b7b07c0 --- /dev/null +++ b/test/test_attachment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.attachment import Attachment # noqa: E501 +from swagger_client.rest import ApiException + + +class TestAttachment(unittest.TestCase): + """Attachment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAttachment(self): + """Test Attachment""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.attachment.Attachment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_badge.py b/test/test_badge.py new file mode 100644 index 0000000..2937f5c --- /dev/null +++ b/test/test_badge.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.badge import Badge # noqa: E501 +from swagger_client.rest import ApiException + + +class TestBadge(unittest.TestCase): + """Badge unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBadge(self): + """Test Badge""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.badge.Badge() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_branch.py b/test/test_branch.py new file mode 100644 index 0000000..fa50e1f --- /dev/null +++ b/test/test_branch.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.branch import Branch # noqa: E501 +from swagger_client.rest import ApiException + + +class TestBranch(unittest.TestCase): + """Branch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBranch(self): + """Test Branch""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.branch.Branch() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_branch_protection.py b/test/test_branch_protection.py new file mode 100644 index 0000000..f15331f --- /dev/null +++ b/test/test_branch_protection.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.branch_protection import BranchProtection # noqa: E501 +from swagger_client.rest import ApiException + + +class TestBranchProtection(unittest.TestCase): + """BranchProtection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBranchProtection(self): + """Test BranchProtection""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.branch_protection.BranchProtection() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_change_file_operation.py b/test/test_change_file_operation.py new file mode 100644 index 0000000..de09871 --- /dev/null +++ b/test/test_change_file_operation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.change_file_operation import ChangeFileOperation # noqa: E501 +from swagger_client.rest import ApiException + + +class TestChangeFileOperation(unittest.TestCase): + """ChangeFileOperation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChangeFileOperation(self): + """Test ChangeFileOperation""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.change_file_operation.ChangeFileOperation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_change_files_options.py b/test/test_change_files_options.py new file mode 100644 index 0000000..d6a44ea --- /dev/null +++ b/test/test_change_files_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.change_files_options import ChangeFilesOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestChangeFilesOptions(unittest.TestCase): + """ChangeFilesOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChangeFilesOptions(self): + """Test ChangeFilesOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.change_files_options.ChangeFilesOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_changed_file.py b/test/test_changed_file.py new file mode 100644 index 0000000..1daa411 --- /dev/null +++ b/test/test_changed_file.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.changed_file import ChangedFile # noqa: E501 +from swagger_client.rest import ApiException + + +class TestChangedFile(unittest.TestCase): + """ChangedFile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChangedFile(self): + """Test ChangedFile""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.changed_file.ChangedFile() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_combined_status.py b/test/test_combined_status.py new file mode 100644 index 0000000..962e7c2 --- /dev/null +++ b/test/test_combined_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.combined_status import CombinedStatus # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCombinedStatus(unittest.TestCase): + """CombinedStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCombinedStatus(self): + """Test CombinedStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.combined_status.CombinedStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_comment.py b/test/test_comment.py new file mode 100644 index 0000000..9236089 --- /dev/null +++ b/test/test_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.comment import Comment # noqa: E501 +from swagger_client.rest import ApiException + + +class TestComment(unittest.TestCase): + """Comment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testComment(self): + """Test Comment""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.comment.Comment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit.py b/test/test_commit.py new file mode 100644 index 0000000..90f619c --- /dev/null +++ b/test/test_commit.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.commit import Commit # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCommit(unittest.TestCase): + """Commit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommit(self): + """Test Commit""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.commit.Commit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_affected_files.py b/test/test_commit_affected_files.py new file mode 100644 index 0000000..8d4234d --- /dev/null +++ b/test/test_commit_affected_files.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.commit_affected_files import CommitAffectedFiles # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCommitAffectedFiles(unittest.TestCase): + """CommitAffectedFiles unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitAffectedFiles(self): + """Test CommitAffectedFiles""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.commit_affected_files.CommitAffectedFiles() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_date_options.py b/test/test_commit_date_options.py new file mode 100644 index 0000000..57c4882 --- /dev/null +++ b/test/test_commit_date_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.commit_date_options import CommitDateOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCommitDateOptions(unittest.TestCase): + """CommitDateOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitDateOptions(self): + """Test CommitDateOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.commit_date_options.CommitDateOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_meta.py b/test/test_commit_meta.py new file mode 100644 index 0000000..1e6f3b6 --- /dev/null +++ b/test/test_commit_meta.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.commit_meta import CommitMeta # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCommitMeta(unittest.TestCase): + """CommitMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitMeta(self): + """Test CommitMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.commit_meta.CommitMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_stats.py b/test/test_commit_stats.py new file mode 100644 index 0000000..49132c2 --- /dev/null +++ b/test/test_commit_stats.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.commit_stats import CommitStats # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCommitStats(unittest.TestCase): + """CommitStats unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitStats(self): + """Test CommitStats""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.commit_stats.CommitStats() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_status.py b/test/test_commit_status.py new file mode 100644 index 0000000..f475683 --- /dev/null +++ b/test/test_commit_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.commit_status import CommitStatus # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCommitStatus(unittest.TestCase): + """CommitStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitStatus(self): + """Test CommitStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.commit_status.CommitStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_user.py b/test/test_commit_user.py new file mode 100644 index 0000000..f0d9874 --- /dev/null +++ b/test/test_commit_user.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.commit_user import CommitUser # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCommitUser(unittest.TestCase): + """CommitUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitUser(self): + """Test CommitUser""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.commit_user.CommitUser() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_compare.py b/test/test_compare.py new file mode 100644 index 0000000..5b84be5 --- /dev/null +++ b/test/test_compare.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.compare import Compare # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCompare(unittest.TestCase): + """Compare unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCompare(self): + """Test Compare""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.compare.Compare() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contents_ext_response.py b/test/test_contents_ext_response.py new file mode 100644 index 0000000..e52ce1c --- /dev/null +++ b/test/test_contents_ext_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.contents_ext_response import ContentsExtResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestContentsExtResponse(unittest.TestCase): + """ContentsExtResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContentsExtResponse(self): + """Test ContentsExtResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.contents_ext_response.ContentsExtResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contents_response.py b/test/test_contents_response.py new file mode 100644 index 0000000..9511972 --- /dev/null +++ b/test/test_contents_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.contents_response import ContentsResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestContentsResponse(unittest.TestCase): + """ContentsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testContentsResponse(self): + """Test ContentsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.contents_response.ContentsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_access_token_option.py b/test/test_create_access_token_option.py new file mode 100644 index 0000000..28f5b45 --- /dev/null +++ b/test/test_create_access_token_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_access_token_option import CreateAccessTokenOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateAccessTokenOption(unittest.TestCase): + """CreateAccessTokenOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateAccessTokenOption(self): + """Test CreateAccessTokenOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_access_token_option.CreateAccessTokenOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_action_workflow_dispatch.py b/test/test_create_action_workflow_dispatch.py new file mode 100644 index 0000000..bf1998c --- /dev/null +++ b/test/test_create_action_workflow_dispatch.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_action_workflow_dispatch import CreateActionWorkflowDispatch # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateActionWorkflowDispatch(unittest.TestCase): + """CreateActionWorkflowDispatch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateActionWorkflowDispatch(self): + """Test CreateActionWorkflowDispatch""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_action_workflow_dispatch.CreateActionWorkflowDispatch() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_branch_protection_option.py b/test/test_create_branch_protection_option.py new file mode 100644 index 0000000..3bf9bbf --- /dev/null +++ b/test/test_create_branch_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_branch_protection_option import CreateBranchProtectionOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateBranchProtectionOption(unittest.TestCase): + """CreateBranchProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateBranchProtectionOption(self): + """Test CreateBranchProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_branch_protection_option.CreateBranchProtectionOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_branch_repo_option.py b/test/test_create_branch_repo_option.py new file mode 100644 index 0000000..061b5ae --- /dev/null +++ b/test/test_create_branch_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_branch_repo_option import CreateBranchRepoOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateBranchRepoOption(unittest.TestCase): + """CreateBranchRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateBranchRepoOption(self): + """Test CreateBranchRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_branch_repo_option.CreateBranchRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_email_option.py b/test/test_create_email_option.py new file mode 100644 index 0000000..5b765c1 --- /dev/null +++ b/test/test_create_email_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_email_option import CreateEmailOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateEmailOption(unittest.TestCase): + """CreateEmailOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateEmailOption(self): + """Test CreateEmailOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_email_option.CreateEmailOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_file_options.py b/test/test_create_file_options.py new file mode 100644 index 0000000..d717366 --- /dev/null +++ b/test/test_create_file_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_file_options import CreateFileOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateFileOptions(unittest.TestCase): + """CreateFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateFileOptions(self): + """Test CreateFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_file_options.CreateFileOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_fork_option.py b/test/test_create_fork_option.py new file mode 100644 index 0000000..2d04abf --- /dev/null +++ b/test/test_create_fork_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_fork_option import CreateForkOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateForkOption(unittest.TestCase): + """CreateForkOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateForkOption(self): + """Test CreateForkOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_fork_option.CreateForkOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_gpg_key_option.py b/test/test_create_gpg_key_option.py new file mode 100644 index 0000000..ac65d36 --- /dev/null +++ b/test/test_create_gpg_key_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_gpg_key_option import CreateGPGKeyOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateGPGKeyOption(unittest.TestCase): + """CreateGPGKeyOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateGPGKeyOption(self): + """Test CreateGPGKeyOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_gpg_key_option.CreateGPGKeyOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_hook_option.py b/test/test_create_hook_option.py new file mode 100644 index 0000000..b020863 --- /dev/null +++ b/test/test_create_hook_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_hook_option import CreateHookOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateHookOption(unittest.TestCase): + """CreateHookOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateHookOption(self): + """Test CreateHookOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_hook_option.CreateHookOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_hook_option_config.py b/test/test_create_hook_option_config.py new file mode 100644 index 0000000..7561101 --- /dev/null +++ b/test/test_create_hook_option_config.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_hook_option_config import CreateHookOptionConfig # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateHookOptionConfig(unittest.TestCase): + """CreateHookOptionConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateHookOptionConfig(self): + """Test CreateHookOptionConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_hook_option_config.CreateHookOptionConfig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_issue_comment_option.py b/test/test_create_issue_comment_option.py new file mode 100644 index 0000000..e25ccf6 --- /dev/null +++ b/test/test_create_issue_comment_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_issue_comment_option import CreateIssueCommentOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateIssueCommentOption(unittest.TestCase): + """CreateIssueCommentOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateIssueCommentOption(self): + """Test CreateIssueCommentOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_issue_comment_option.CreateIssueCommentOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_issue_option.py b/test/test_create_issue_option.py new file mode 100644 index 0000000..afd3348 --- /dev/null +++ b/test/test_create_issue_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_issue_option import CreateIssueOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateIssueOption(unittest.TestCase): + """CreateIssueOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateIssueOption(self): + """Test CreateIssueOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_issue_option.CreateIssueOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_key_option.py b/test/test_create_key_option.py new file mode 100644 index 0000000..76244c3 --- /dev/null +++ b/test/test_create_key_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_key_option import CreateKeyOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateKeyOption(unittest.TestCase): + """CreateKeyOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateKeyOption(self): + """Test CreateKeyOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_key_option.CreateKeyOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_label_option.py b/test/test_create_label_option.py new file mode 100644 index 0000000..d35763f --- /dev/null +++ b/test/test_create_label_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_label_option import CreateLabelOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateLabelOption(unittest.TestCase): + """CreateLabelOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateLabelOption(self): + """Test CreateLabelOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_label_option.CreateLabelOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_milestone_option.py b/test/test_create_milestone_option.py new file mode 100644 index 0000000..77b9ba3 --- /dev/null +++ b/test/test_create_milestone_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_milestone_option import CreateMilestoneOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateMilestoneOption(unittest.TestCase): + """CreateMilestoneOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateMilestoneOption(self): + """Test CreateMilestoneOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_milestone_option.CreateMilestoneOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_o_auth2_application_options.py b/test/test_create_o_auth2_application_options.py new file mode 100644 index 0000000..47fb1b6 --- /dev/null +++ b/test/test_create_o_auth2_application_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateOAuth2ApplicationOptions(unittest.TestCase): + """CreateOAuth2ApplicationOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOAuth2ApplicationOptions(self): + """Test CreateOAuth2ApplicationOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_o_auth2_application_options.CreateOAuth2ApplicationOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_or_update_secret_option.py b/test/test_create_or_update_secret_option.py new file mode 100644 index 0000000..6bcce02 --- /dev/null +++ b/test/test_create_or_update_secret_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_or_update_secret_option import CreateOrUpdateSecretOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateOrUpdateSecretOption(unittest.TestCase): + """CreateOrUpdateSecretOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOrUpdateSecretOption(self): + """Test CreateOrUpdateSecretOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_or_update_secret_option.CreateOrUpdateSecretOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_org_option.py b/test/test_create_org_option.py new file mode 100644 index 0000000..2ab561f --- /dev/null +++ b/test/test_create_org_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_org_option import CreateOrgOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateOrgOption(unittest.TestCase): + """CreateOrgOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOrgOption(self): + """Test CreateOrgOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_org_option.CreateOrgOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_pull_request_option.py b/test/test_create_pull_request_option.py new file mode 100644 index 0000000..3abaacc --- /dev/null +++ b/test/test_create_pull_request_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_pull_request_option import CreatePullRequestOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreatePullRequestOption(unittest.TestCase): + """CreatePullRequestOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePullRequestOption(self): + """Test CreatePullRequestOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_pull_request_option.CreatePullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_pull_review_comment.py b/test/test_create_pull_review_comment.py new file mode 100644 index 0000000..5b849d9 --- /dev/null +++ b/test/test_create_pull_review_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_pull_review_comment import CreatePullReviewComment # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreatePullReviewComment(unittest.TestCase): + """CreatePullReviewComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePullReviewComment(self): + """Test CreatePullReviewComment""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_pull_review_comment.CreatePullReviewComment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_pull_review_options.py b/test/test_create_pull_review_options.py new file mode 100644 index 0000000..e5c8c2c --- /dev/null +++ b/test/test_create_pull_review_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_pull_review_options import CreatePullReviewOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreatePullReviewOptions(unittest.TestCase): + """CreatePullReviewOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePullReviewOptions(self): + """Test CreatePullReviewOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_pull_review_options.CreatePullReviewOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_push_mirror_option.py b/test/test_create_push_mirror_option.py new file mode 100644 index 0000000..6d7ecf1 --- /dev/null +++ b/test/test_create_push_mirror_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_push_mirror_option import CreatePushMirrorOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreatePushMirrorOption(unittest.TestCase): + """CreatePushMirrorOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePushMirrorOption(self): + """Test CreatePushMirrorOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_push_mirror_option.CreatePushMirrorOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_release_option.py b/test/test_create_release_option.py new file mode 100644 index 0000000..c5c665a --- /dev/null +++ b/test/test_create_release_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_release_option import CreateReleaseOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateReleaseOption(unittest.TestCase): + """CreateReleaseOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateReleaseOption(self): + """Test CreateReleaseOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_release_option.CreateReleaseOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_repo_option.py b/test/test_create_repo_option.py new file mode 100644 index 0000000..df311c6 --- /dev/null +++ b/test/test_create_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_repo_option import CreateRepoOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateRepoOption(unittest.TestCase): + """CreateRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateRepoOption(self): + """Test CreateRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_repo_option.CreateRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_status_option.py b/test/test_create_status_option.py new file mode 100644 index 0000000..d117496 --- /dev/null +++ b/test/test_create_status_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_status_option import CreateStatusOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateStatusOption(unittest.TestCase): + """CreateStatusOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateStatusOption(self): + """Test CreateStatusOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_status_option.CreateStatusOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_tag_option.py b/test/test_create_tag_option.py new file mode 100644 index 0000000..726ef3e --- /dev/null +++ b/test/test_create_tag_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_tag_option import CreateTagOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateTagOption(unittest.TestCase): + """CreateTagOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateTagOption(self): + """Test CreateTagOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_tag_option.CreateTagOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_tag_protection_option.py b/test/test_create_tag_protection_option.py new file mode 100644 index 0000000..e28227d --- /dev/null +++ b/test/test_create_tag_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_tag_protection_option import CreateTagProtectionOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateTagProtectionOption(unittest.TestCase): + """CreateTagProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateTagProtectionOption(self): + """Test CreateTagProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_tag_protection_option.CreateTagProtectionOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_team_option.py b/test/test_create_team_option.py new file mode 100644 index 0000000..0fc7ac5 --- /dev/null +++ b/test/test_create_team_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_team_option import CreateTeamOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateTeamOption(unittest.TestCase): + """CreateTeamOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateTeamOption(self): + """Test CreateTeamOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_team_option.CreateTeamOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_user_option.py b/test/test_create_user_option.py new file mode 100644 index 0000000..aa4abb5 --- /dev/null +++ b/test/test_create_user_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_user_option import CreateUserOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateUserOption(unittest.TestCase): + """CreateUserOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateUserOption(self): + """Test CreateUserOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_user_option.CreateUserOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_variable_option.py b/test/test_create_variable_option.py new file mode 100644 index 0000000..7b8d3ee --- /dev/null +++ b/test/test_create_variable_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_variable_option import CreateVariableOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateVariableOption(unittest.TestCase): + """CreateVariableOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateVariableOption(self): + """Test CreateVariableOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_variable_option.CreateVariableOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_wiki_page_options.py b/test/test_create_wiki_page_options.py new file mode 100644 index 0000000..0164169 --- /dev/null +++ b/test/test_create_wiki_page_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.create_wiki_page_options import CreateWikiPageOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCreateWikiPageOptions(unittest.TestCase): + """CreateWikiPageOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateWikiPageOptions(self): + """Test CreateWikiPageOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.create_wiki_page_options.CreateWikiPageOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cron.py b/test/test_cron.py new file mode 100644 index 0000000..6753730 --- /dev/null +++ b/test/test_cron.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.cron import Cron # noqa: E501 +from swagger_client.rest import ApiException + + +class TestCron(unittest.TestCase): + """Cron unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCron(self): + """Test Cron""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.cron.Cron() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_email_option.py b/test/test_delete_email_option.py new file mode 100644 index 0000000..6d4d576 --- /dev/null +++ b/test/test_delete_email_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.delete_email_option import DeleteEmailOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestDeleteEmailOption(unittest.TestCase): + """DeleteEmailOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteEmailOption(self): + """Test DeleteEmailOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.delete_email_option.DeleteEmailOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_file_options.py b/test/test_delete_file_options.py new file mode 100644 index 0000000..2d6988a --- /dev/null +++ b/test/test_delete_file_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.delete_file_options import DeleteFileOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestDeleteFileOptions(unittest.TestCase): + """DeleteFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeleteFileOptions(self): + """Test DeleteFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.delete_file_options.DeleteFileOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_deploy_key.py b/test/test_deploy_key.py new file mode 100644 index 0000000..c5897c0 --- /dev/null +++ b/test/test_deploy_key.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.deploy_key import DeployKey # noqa: E501 +from swagger_client.rest import ApiException + + +class TestDeployKey(unittest.TestCase): + """DeployKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeployKey(self): + """Test DeployKey""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.deploy_key.DeployKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dismiss_pull_review_options.py b/test/test_dismiss_pull_review_options.py new file mode 100644 index 0000000..d5995fb --- /dev/null +++ b/test/test_dismiss_pull_review_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.dismiss_pull_review_options import DismissPullReviewOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestDismissPullReviewOptions(unittest.TestCase): + """DismissPullReviewOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDismissPullReviewOptions(self): + """Test DismissPullReviewOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.dismiss_pull_review_options.DismissPullReviewOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_attachment_options.py b/test/test_edit_attachment_options.py new file mode 100644 index 0000000..a349b7f --- /dev/null +++ b/test/test_edit_attachment_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_attachment_options import EditAttachmentOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditAttachmentOptions(unittest.TestCase): + """EditAttachmentOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditAttachmentOptions(self): + """Test EditAttachmentOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_attachment_options.EditAttachmentOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_branch_protection_option.py b/test/test_edit_branch_protection_option.py new file mode 100644 index 0000000..51adf48 --- /dev/null +++ b/test/test_edit_branch_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_branch_protection_option import EditBranchProtectionOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditBranchProtectionOption(unittest.TestCase): + """EditBranchProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditBranchProtectionOption(self): + """Test EditBranchProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_branch_protection_option.EditBranchProtectionOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_deadline_option.py b/test/test_edit_deadline_option.py new file mode 100644 index 0000000..9c70396 --- /dev/null +++ b/test/test_edit_deadline_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_deadline_option import EditDeadlineOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditDeadlineOption(unittest.TestCase): + """EditDeadlineOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditDeadlineOption(self): + """Test EditDeadlineOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_deadline_option.EditDeadlineOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_git_hook_option.py b/test/test_edit_git_hook_option.py new file mode 100644 index 0000000..822c4d8 --- /dev/null +++ b/test/test_edit_git_hook_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_git_hook_option import EditGitHookOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditGitHookOption(unittest.TestCase): + """EditGitHookOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditGitHookOption(self): + """Test EditGitHookOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_git_hook_option.EditGitHookOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_hook_option.py b/test/test_edit_hook_option.py new file mode 100644 index 0000000..6036c13 --- /dev/null +++ b/test/test_edit_hook_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_hook_option import EditHookOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditHookOption(unittest.TestCase): + """EditHookOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditHookOption(self): + """Test EditHookOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_hook_option.EditHookOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_issue_comment_option.py b/test/test_edit_issue_comment_option.py new file mode 100644 index 0000000..9963d8f --- /dev/null +++ b/test/test_edit_issue_comment_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_issue_comment_option import EditIssueCommentOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditIssueCommentOption(unittest.TestCase): + """EditIssueCommentOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditIssueCommentOption(self): + """Test EditIssueCommentOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_issue_comment_option.EditIssueCommentOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_issue_option.py b/test/test_edit_issue_option.py new file mode 100644 index 0000000..e84fd16 --- /dev/null +++ b/test/test_edit_issue_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_issue_option import EditIssueOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditIssueOption(unittest.TestCase): + """EditIssueOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditIssueOption(self): + """Test EditIssueOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_issue_option.EditIssueOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_label_option.py b/test/test_edit_label_option.py new file mode 100644 index 0000000..e006f5d --- /dev/null +++ b/test/test_edit_label_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_label_option import EditLabelOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditLabelOption(unittest.TestCase): + """EditLabelOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditLabelOption(self): + """Test EditLabelOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_label_option.EditLabelOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_milestone_option.py b/test/test_edit_milestone_option.py new file mode 100644 index 0000000..4b477d1 --- /dev/null +++ b/test/test_edit_milestone_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_milestone_option import EditMilestoneOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditMilestoneOption(unittest.TestCase): + """EditMilestoneOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditMilestoneOption(self): + """Test EditMilestoneOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_milestone_option.EditMilestoneOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_org_option.py b/test/test_edit_org_option.py new file mode 100644 index 0000000..95ee1c4 --- /dev/null +++ b/test/test_edit_org_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_org_option import EditOrgOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditOrgOption(unittest.TestCase): + """EditOrgOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditOrgOption(self): + """Test EditOrgOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_org_option.EditOrgOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_pull_request_option.py b/test/test_edit_pull_request_option.py new file mode 100644 index 0000000..b78bda4 --- /dev/null +++ b/test/test_edit_pull_request_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_pull_request_option import EditPullRequestOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditPullRequestOption(unittest.TestCase): + """EditPullRequestOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditPullRequestOption(self): + """Test EditPullRequestOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_pull_request_option.EditPullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_reaction_option.py b/test/test_edit_reaction_option.py new file mode 100644 index 0000000..0eeada2 --- /dev/null +++ b/test/test_edit_reaction_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_reaction_option import EditReactionOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditReactionOption(unittest.TestCase): + """EditReactionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditReactionOption(self): + """Test EditReactionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_reaction_option.EditReactionOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_release_option.py b/test/test_edit_release_option.py new file mode 100644 index 0000000..4c08b1c --- /dev/null +++ b/test/test_edit_release_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_release_option import EditReleaseOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditReleaseOption(unittest.TestCase): + """EditReleaseOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditReleaseOption(self): + """Test EditReleaseOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_release_option.EditReleaseOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_repo_option.py b/test/test_edit_repo_option.py new file mode 100644 index 0000000..a6de710 --- /dev/null +++ b/test/test_edit_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_repo_option import EditRepoOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditRepoOption(unittest.TestCase): + """EditRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditRepoOption(self): + """Test EditRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_repo_option.EditRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_tag_protection_option.py b/test/test_edit_tag_protection_option.py new file mode 100644 index 0000000..047b5d9 --- /dev/null +++ b/test/test_edit_tag_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_tag_protection_option import EditTagProtectionOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditTagProtectionOption(unittest.TestCase): + """EditTagProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditTagProtectionOption(self): + """Test EditTagProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_tag_protection_option.EditTagProtectionOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_team_option.py b/test/test_edit_team_option.py new file mode 100644 index 0000000..58988de --- /dev/null +++ b/test/test_edit_team_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_team_option import EditTeamOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditTeamOption(unittest.TestCase): + """EditTeamOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditTeamOption(self): + """Test EditTeamOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_team_option.EditTeamOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_user_option.py b/test/test_edit_user_option.py new file mode 100644 index 0000000..e50b698 --- /dev/null +++ b/test/test_edit_user_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.edit_user_option import EditUserOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEditUserOption(unittest.TestCase): + """EditUserOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditUserOption(self): + """Test EditUserOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.edit_user_option.EditUserOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email.py b/test/test_email.py new file mode 100644 index 0000000..9957910 --- /dev/null +++ b/test/test_email.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.email import Email # noqa: E501 +from swagger_client.rest import ApiException + + +class TestEmail(unittest.TestCase): + """Email unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmail(self): + """Test Email""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.email.Email() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_tracker.py b/test/test_external_tracker.py new file mode 100644 index 0000000..3375dc3 --- /dev/null +++ b/test/test_external_tracker.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.external_tracker import ExternalTracker # noqa: E501 +from swagger_client.rest import ApiException + + +class TestExternalTracker(unittest.TestCase): + """ExternalTracker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExternalTracker(self): + """Test ExternalTracker""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.external_tracker.ExternalTracker() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_wiki.py b/test/test_external_wiki.py new file mode 100644 index 0000000..faead16 --- /dev/null +++ b/test/test_external_wiki.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.external_wiki import ExternalWiki # noqa: E501 +from swagger_client.rest import ApiException + + +class TestExternalWiki(unittest.TestCase): + """ExternalWiki unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExternalWiki(self): + """Test ExternalWiki""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.external_wiki.ExternalWiki() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_commit_response.py b/test/test_file_commit_response.py new file mode 100644 index 0000000..a91d620 --- /dev/null +++ b/test/test_file_commit_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.file_commit_response import FileCommitResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestFileCommitResponse(unittest.TestCase): + """FileCommitResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileCommitResponse(self): + """Test FileCommitResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.file_commit_response.FileCommitResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_delete_response.py b/test/test_file_delete_response.py new file mode 100644 index 0000000..34b20d2 --- /dev/null +++ b/test/test_file_delete_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.file_delete_response import FileDeleteResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestFileDeleteResponse(unittest.TestCase): + """FileDeleteResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileDeleteResponse(self): + """Test FileDeleteResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.file_delete_response.FileDeleteResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_links_response.py b/test/test_file_links_response.py new file mode 100644 index 0000000..54b63ae --- /dev/null +++ b/test/test_file_links_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.file_links_response import FileLinksResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestFileLinksResponse(unittest.TestCase): + """FileLinksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileLinksResponse(self): + """Test FileLinksResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.file_links_response.FileLinksResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_response.py b/test/test_file_response.py new file mode 100644 index 0000000..2067b71 --- /dev/null +++ b/test/test_file_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.file_response import FileResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestFileResponse(unittest.TestCase): + """FileResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFileResponse(self): + """Test FileResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.file_response.FileResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_files_response.py b/test/test_files_response.py new file mode 100644 index 0000000..a13b39f --- /dev/null +++ b/test/test_files_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.files_response import FilesResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestFilesResponse(unittest.TestCase): + """FilesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFilesResponse(self): + """Test FilesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.files_response.FilesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_general_api_settings.py b/test/test_general_api_settings.py new file mode 100644 index 0000000..e2bc664 --- /dev/null +++ b/test/test_general_api_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.general_api_settings import GeneralAPISettings # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGeneralAPISettings(unittest.TestCase): + """GeneralAPISettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGeneralAPISettings(self): + """Test GeneralAPISettings""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.general_api_settings.GeneralAPISettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_general_attachment_settings.py b/test/test_general_attachment_settings.py new file mode 100644 index 0000000..337a21f --- /dev/null +++ b/test/test_general_attachment_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.general_attachment_settings import GeneralAttachmentSettings # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGeneralAttachmentSettings(unittest.TestCase): + """GeneralAttachmentSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGeneralAttachmentSettings(self): + """Test GeneralAttachmentSettings""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.general_attachment_settings.GeneralAttachmentSettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_general_repo_settings.py b/test/test_general_repo_settings.py new file mode 100644 index 0000000..d6d9a00 --- /dev/null +++ b/test/test_general_repo_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.general_repo_settings import GeneralRepoSettings # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGeneralRepoSettings(unittest.TestCase): + """GeneralRepoSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGeneralRepoSettings(self): + """Test GeneralRepoSettings""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.general_repo_settings.GeneralRepoSettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_general_ui_settings.py b/test/test_general_ui_settings.py new file mode 100644 index 0000000..fdfec2c --- /dev/null +++ b/test/test_general_ui_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.general_ui_settings import GeneralUISettings # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGeneralUISettings(unittest.TestCase): + """GeneralUISettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGeneralUISettings(self): + """Test GeneralUISettings""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.general_ui_settings.GeneralUISettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_generate_repo_option.py b/test/test_generate_repo_option.py new file mode 100644 index 0000000..36a9cab --- /dev/null +++ b/test/test_generate_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.generate_repo_option import GenerateRepoOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGenerateRepoOption(unittest.TestCase): + """GenerateRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGenerateRepoOption(self): + """Test GenerateRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.generate_repo_option.GenerateRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_files_options.py b/test/test_get_files_options.py new file mode 100644 index 0000000..96aea2a --- /dev/null +++ b/test/test_get_files_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.get_files_options import GetFilesOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGetFilesOptions(unittest.TestCase): + """GetFilesOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGetFilesOptions(self): + """Test GetFilesOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.get_files_options.GetFilesOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_blob_response.py b/test/test_git_blob_response.py new file mode 100644 index 0000000..1cbb1b1 --- /dev/null +++ b/test/test_git_blob_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.git_blob_response import GitBlobResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGitBlobResponse(unittest.TestCase): + """GitBlobResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitBlobResponse(self): + """Test GitBlobResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.git_blob_response.GitBlobResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_entry.py b/test/test_git_entry.py new file mode 100644 index 0000000..c05ee11 --- /dev/null +++ b/test/test_git_entry.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.git_entry import GitEntry # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGitEntry(unittest.TestCase): + """GitEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitEntry(self): + """Test GitEntry""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.git_entry.GitEntry() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_hook.py b/test/test_git_hook.py new file mode 100644 index 0000000..ba9ff30 --- /dev/null +++ b/test/test_git_hook.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.git_hook import GitHook # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGitHook(unittest.TestCase): + """GitHook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitHook(self): + """Test GitHook""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.git_hook.GitHook() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_object.py b/test/test_git_object.py new file mode 100644 index 0000000..299b418 --- /dev/null +++ b/test/test_git_object.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.git_object import GitObject # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGitObject(unittest.TestCase): + """GitObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitObject(self): + """Test GitObject""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.git_object.GitObject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_tree_response.py b/test/test_git_tree_response.py new file mode 100644 index 0000000..9d04561 --- /dev/null +++ b/test/test_git_tree_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.git_tree_response import GitTreeResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGitTreeResponse(unittest.TestCase): + """GitTreeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitTreeResponse(self): + """Test GitTreeResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.git_tree_response.GitTreeResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gitignore_template_info.py b/test/test_gitignore_template_info.py new file mode 100644 index 0000000..a8351b3 --- /dev/null +++ b/test/test_gitignore_template_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.gitignore_template_info import GitignoreTemplateInfo # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGitignoreTemplateInfo(unittest.TestCase): + """GitignoreTemplateInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGitignoreTemplateInfo(self): + """Test GitignoreTemplateInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.gitignore_template_info.GitignoreTemplateInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gpg_key.py b/test/test_gpg_key.py new file mode 100644 index 0000000..c2c5379 --- /dev/null +++ b/test/test_gpg_key.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.gpg_key import GPGKey # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGPGKey(unittest.TestCase): + """GPGKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGPGKey(self): + """Test GPGKey""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.gpg_key.GPGKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gpg_key_email.py b/test/test_gpg_key_email.py new file mode 100644 index 0000000..05a2ed0 --- /dev/null +++ b/test/test_gpg_key_email.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.gpg_key_email import GPGKeyEmail # noqa: E501 +from swagger_client.rest import ApiException + + +class TestGPGKeyEmail(unittest.TestCase): + """GPGKeyEmail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGPGKeyEmail(self): + """Test GPGKeyEmail""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.gpg_key_email.GPGKeyEmail() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hook.py b/test/test_hook.py new file mode 100644 index 0000000..311c3f3 --- /dev/null +++ b/test/test_hook.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.hook import Hook # noqa: E501 +from swagger_client.rest import ApiException + + +class TestHook(unittest.TestCase): + """Hook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHook(self): + """Test Hook""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.hook.Hook() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_identity.py b/test/test_identity.py new file mode 100644 index 0000000..f9deb15 --- /dev/null +++ b/test/test_identity.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.identity import Identity # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIdentity(unittest.TestCase): + """Identity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIdentity(self): + """Test Identity""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.identity.Identity() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response200.py b/test/test_inline_response200.py new file mode 100644 index 0000000..8a8e7e6 --- /dev/null +++ b/test/test_inline_response200.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.inline_response200 import InlineResponse200 # noqa: E501 +from swagger_client.rest import ApiException + + +class TestInlineResponse200(unittest.TestCase): + """InlineResponse200 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse200(self): + """Test InlineResponse200""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.inline_response200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_response2001.py b/test/test_inline_response2001.py new file mode 100644 index 0000000..fabe801 --- /dev/null +++ b/test/test_inline_response2001.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.inline_response2001 import InlineResponse2001 # noqa: E501 +from swagger_client.rest import ApiException + + +class TestInlineResponse2001(unittest.TestCase): + """InlineResponse2001 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2001(self): + """Test InlineResponse2001""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.inline_response2001.InlineResponse2001() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_internal_tracker.py b/test/test_internal_tracker.py new file mode 100644 index 0000000..8b4e182 --- /dev/null +++ b/test/test_internal_tracker.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.internal_tracker import InternalTracker # noqa: E501 +from swagger_client.rest import ApiException + + +class TestInternalTracker(unittest.TestCase): + """InternalTracker unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInternalTracker(self): + """Test InternalTracker""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.internal_tracker.InternalTracker() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue.py b/test/test_issue.py new file mode 100644 index 0000000..085d405 --- /dev/null +++ b/test/test_issue.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue import Issue # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssue(unittest.TestCase): + """Issue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssue(self): + """Test Issue""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue.Issue() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_api.py b/test/test_issue_api.py new file mode 100644 index 0000000..6721cbb --- /dev/null +++ b/test/test_issue_api.py @@ -0,0 +1,517 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.issue_api import IssueApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueApi(unittest.TestCase): + """IssueApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.issue_api.IssueApi() # noqa: E501 + + def tearDown(self): + pass + + def test_issue_add_label(self): + """Test case for issue_add_label + + Add a label to an issue # noqa: E501 + """ + pass + + def test_issue_add_subscription(self): + """Test case for issue_add_subscription + + Subscribe user to issue # noqa: E501 + """ + pass + + def test_issue_add_time(self): + """Test case for issue_add_time + + Add tracked time to a issue # noqa: E501 + """ + pass + + def test_issue_check_subscription(self): + """Test case for issue_check_subscription + + Check if user is subscribed to an issue # noqa: E501 + """ + pass + + def test_issue_clear_labels(self): + """Test case for issue_clear_labels + + Remove all labels from an issue # noqa: E501 + """ + pass + + def test_issue_create_comment(self): + """Test case for issue_create_comment + + Add a comment to an issue # noqa: E501 + """ + pass + + def test_issue_create_issue(self): + """Test case for issue_create_issue + + Create an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_issue_create_issue_attachment(self): + """Test case for issue_create_issue_attachment + + Create an issue attachment # noqa: E501 + """ + pass + + def test_issue_create_issue_blocking(self): + """Test case for issue_create_issue_blocking + + Block the issue given in the body by the issue in path # noqa: E501 + """ + pass + + def test_issue_create_issue_comment_attachment(self): + """Test case for issue_create_issue_comment_attachment + + Create a comment attachment # noqa: E501 + """ + pass + + def test_issue_create_issue_dependencies(self): + """Test case for issue_create_issue_dependencies + + Make the issue in the url depend on the issue in the form. # noqa: E501 + """ + pass + + def test_issue_create_label(self): + """Test case for issue_create_label + + Create a label # noqa: E501 + """ + pass + + def test_issue_create_milestone(self): + """Test case for issue_create_milestone + + Create a milestone # noqa: E501 + """ + pass + + def test_issue_delete(self): + """Test case for issue_delete + + Delete an issue # noqa: E501 + """ + pass + + def test_issue_delete_comment(self): + """Test case for issue_delete_comment + + Delete a comment # noqa: E501 + """ + pass + + def test_issue_delete_comment_deprecated(self): + """Test case for issue_delete_comment_deprecated + + Delete a comment # noqa: E501 + """ + pass + + def test_issue_delete_comment_reaction(self): + """Test case for issue_delete_comment_reaction + + Remove a reaction from a comment of an issue # noqa: E501 + """ + pass + + def test_issue_delete_issue_attachment(self): + """Test case for issue_delete_issue_attachment + + Delete an issue attachment # noqa: E501 + """ + pass + + def test_issue_delete_issue_comment_attachment(self): + """Test case for issue_delete_issue_comment_attachment + + Delete a comment attachment # noqa: E501 + """ + pass + + def test_issue_delete_issue_reaction(self): + """Test case for issue_delete_issue_reaction + + Remove a reaction from an issue # noqa: E501 + """ + pass + + def test_issue_delete_label(self): + """Test case for issue_delete_label + + Delete a label # noqa: E501 + """ + pass + + def test_issue_delete_milestone(self): + """Test case for issue_delete_milestone + + Delete a milestone # noqa: E501 + """ + pass + + def test_issue_delete_stop_watch(self): + """Test case for issue_delete_stop_watch + + Delete an issue's existing stopwatch. # noqa: E501 + """ + pass + + def test_issue_delete_subscription(self): + """Test case for issue_delete_subscription + + Unsubscribe user from issue # noqa: E501 + """ + pass + + def test_issue_delete_time(self): + """Test case for issue_delete_time + + Delete specific tracked time # noqa: E501 + """ + pass + + def test_issue_edit_comment(self): + """Test case for issue_edit_comment + + Edit a comment # noqa: E501 + """ + pass + + def test_issue_edit_comment_deprecated(self): + """Test case for issue_edit_comment_deprecated + + Edit a comment # noqa: E501 + """ + pass + + def test_issue_edit_issue(self): + """Test case for issue_edit_issue + + Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_issue_edit_issue_attachment(self): + """Test case for issue_edit_issue_attachment + + Edit an issue attachment # noqa: E501 + """ + pass + + def test_issue_edit_issue_comment_attachment(self): + """Test case for issue_edit_issue_comment_attachment + + Edit a comment attachment # noqa: E501 + """ + pass + + def test_issue_edit_issue_deadline(self): + """Test case for issue_edit_issue_deadline + + Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_issue_edit_label(self): + """Test case for issue_edit_label + + Update a label # noqa: E501 + """ + pass + + def test_issue_edit_milestone(self): + """Test case for issue_edit_milestone + + Update a milestone # noqa: E501 + """ + pass + + def test_issue_get_comment(self): + """Test case for issue_get_comment + + Get a comment # noqa: E501 + """ + pass + + def test_issue_get_comment_reactions(self): + """Test case for issue_get_comment_reactions + + Get a list of reactions from a comment of an issue # noqa: E501 + """ + pass + + def test_issue_get_comments(self): + """Test case for issue_get_comments + + List all comments on an issue # noqa: E501 + """ + pass + + def test_issue_get_comments_and_timeline(self): + """Test case for issue_get_comments_and_timeline + + List all comments and events on an issue # noqa: E501 + """ + pass + + def test_issue_get_issue(self): + """Test case for issue_get_issue + + Get an issue # noqa: E501 + """ + pass + + def test_issue_get_issue_attachment(self): + """Test case for issue_get_issue_attachment + + Get an issue attachment # noqa: E501 + """ + pass + + def test_issue_get_issue_comment_attachment(self): + """Test case for issue_get_issue_comment_attachment + + Get a comment attachment # noqa: E501 + """ + pass + + def test_issue_get_issue_reactions(self): + """Test case for issue_get_issue_reactions + + Get a list reactions of an issue # noqa: E501 + """ + pass + + def test_issue_get_label(self): + """Test case for issue_get_label + + Get a single label # noqa: E501 + """ + pass + + def test_issue_get_labels(self): + """Test case for issue_get_labels + + Get an issue's labels # noqa: E501 + """ + pass + + def test_issue_get_milestone(self): + """Test case for issue_get_milestone + + Get a milestone # noqa: E501 + """ + pass + + def test_issue_get_milestones_list(self): + """Test case for issue_get_milestones_list + + Get all of a repository's opened milestones # noqa: E501 + """ + pass + + def test_issue_get_repo_comments(self): + """Test case for issue_get_repo_comments + + List all comments in a repository # noqa: E501 + """ + pass + + def test_issue_list_blocks(self): + """Test case for issue_list_blocks + + List issues that are blocked by this issue # noqa: E501 + """ + pass + + def test_issue_list_issue_attachments(self): + """Test case for issue_list_issue_attachments + + List issue's attachments # noqa: E501 + """ + pass + + def test_issue_list_issue_comment_attachments(self): + """Test case for issue_list_issue_comment_attachments + + List comment's attachments # noqa: E501 + """ + pass + + def test_issue_list_issue_dependencies(self): + """Test case for issue_list_issue_dependencies + + List an issue's dependencies, i.e all issues that block this issue. # noqa: E501 + """ + pass + + def test_issue_list_issues(self): + """Test case for issue_list_issues + + List a repository's issues # noqa: E501 + """ + pass + + def test_issue_list_labels(self): + """Test case for issue_list_labels + + Get all of a repository's labels # noqa: E501 + """ + pass + + def test_issue_lock_issue(self): + """Test case for issue_lock_issue + + Lock an issue # noqa: E501 + """ + pass + + def test_issue_post_comment_reaction(self): + """Test case for issue_post_comment_reaction + + Add a reaction to a comment of an issue # noqa: E501 + """ + pass + + def test_issue_post_issue_reaction(self): + """Test case for issue_post_issue_reaction + + Add a reaction to an issue # noqa: E501 + """ + pass + + def test_issue_remove_issue_blocking(self): + """Test case for issue_remove_issue_blocking + + Unblock the issue given in the body by the issue in path # noqa: E501 + """ + pass + + def test_issue_remove_issue_dependencies(self): + """Test case for issue_remove_issue_dependencies + + Remove an issue dependency # noqa: E501 + """ + pass + + def test_issue_remove_label(self): + """Test case for issue_remove_label + + Remove a label from an issue # noqa: E501 + """ + pass + + def test_issue_replace_labels(self): + """Test case for issue_replace_labels + + Replace an issue's labels # noqa: E501 + """ + pass + + def test_issue_reset_time(self): + """Test case for issue_reset_time + + Reset a tracked time of an issue # noqa: E501 + """ + pass + + def test_issue_search_issues(self): + """Test case for issue_search_issues + + Search for issues across the repositories that the user has access to # noqa: E501 + """ + pass + + def test_issue_start_stop_watch(self): + """Test case for issue_start_stop_watch + + Start stopwatch on an issue. # noqa: E501 + """ + pass + + def test_issue_stop_stop_watch(self): + """Test case for issue_stop_stop_watch + + Stop an issue's existing stopwatch. # noqa: E501 + """ + pass + + def test_issue_subscriptions(self): + """Test case for issue_subscriptions + + Get users who subscribed on an issue. # noqa: E501 + """ + pass + + def test_issue_tracked_times(self): + """Test case for issue_tracked_times + + List an issue's tracked times # noqa: E501 + """ + pass + + def test_issue_unlock_issue(self): + """Test case for issue_unlock_issue + + Unlock an issue # noqa: E501 + """ + pass + + def test_move_issue_pin(self): + """Test case for move_issue_pin + + Moves the Pin to the given Position # noqa: E501 + """ + pass + + def test_pin_issue(self): + """Test case for pin_issue + + Pin an Issue # noqa: E501 + """ + pass + + def test_unpin_issue(self): + """Test case for unpin_issue + + Unpin an Issue # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_config.py b/test/test_issue_config.py new file mode 100644 index 0000000..610893f --- /dev/null +++ b/test/test_issue_config.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_config import IssueConfig # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueConfig(unittest.TestCase): + """IssueConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueConfig(self): + """Test IssueConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_config.IssueConfig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_config_contact_link.py b/test/test_issue_config_contact_link.py new file mode 100644 index 0000000..3674aaf --- /dev/null +++ b/test/test_issue_config_contact_link.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_config_contact_link import IssueConfigContactLink # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueConfigContactLink(unittest.TestCase): + """IssueConfigContactLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueConfigContactLink(self): + """Test IssueConfigContactLink""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_config_contact_link.IssueConfigContactLink() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_config_validation.py b/test/test_issue_config_validation.py new file mode 100644 index 0000000..ae8b802 --- /dev/null +++ b/test/test_issue_config_validation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_config_validation import IssueConfigValidation # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueConfigValidation(unittest.TestCase): + """IssueConfigValidation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueConfigValidation(self): + """Test IssueConfigValidation""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_config_validation.IssueConfigValidation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_deadline.py b/test/test_issue_deadline.py new file mode 100644 index 0000000..7bb17ec --- /dev/null +++ b/test/test_issue_deadline.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_deadline import IssueDeadline # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueDeadline(unittest.TestCase): + """IssueDeadline unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueDeadline(self): + """Test IssueDeadline""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_deadline.IssueDeadline() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_form_field.py b/test/test_issue_form_field.py new file mode 100644 index 0000000..5427f97 --- /dev/null +++ b/test/test_issue_form_field.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_form_field import IssueFormField # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueFormField(unittest.TestCase): + """IssueFormField unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueFormField(self): + """Test IssueFormField""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_form_field.IssueFormField() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_form_field_type.py b/test/test_issue_form_field_type.py new file mode 100644 index 0000000..3eca000 --- /dev/null +++ b/test/test_issue_form_field_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_form_field_type import IssueFormFieldType # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueFormFieldType(unittest.TestCase): + """IssueFormFieldType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueFormFieldType(self): + """Test IssueFormFieldType""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_form_field_type.IssueFormFieldType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_form_field_visible.py b/test/test_issue_form_field_visible.py new file mode 100644 index 0000000..8faff40 --- /dev/null +++ b/test/test_issue_form_field_visible.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_form_field_visible import IssueFormFieldVisible # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueFormFieldVisible(unittest.TestCase): + """IssueFormFieldVisible unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueFormFieldVisible(self): + """Test IssueFormFieldVisible""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_form_field_visible.IssueFormFieldVisible() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_labels_option.py b/test/test_issue_labels_option.py new file mode 100644 index 0000000..a518497 --- /dev/null +++ b/test/test_issue_labels_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_labels_option import IssueLabelsOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueLabelsOption(unittest.TestCase): + """IssueLabelsOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueLabelsOption(self): + """Test IssueLabelsOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_labels_option.IssueLabelsOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_meta.py b/test/test_issue_meta.py new file mode 100644 index 0000000..ec41f60 --- /dev/null +++ b/test/test_issue_meta.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_meta import IssueMeta # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueMeta(unittest.TestCase): + """IssueMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueMeta(self): + """Test IssueMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_meta.IssueMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_template.py b/test/test_issue_template.py new file mode 100644 index 0000000..7713489 --- /dev/null +++ b/test/test_issue_template.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_template import IssueTemplate # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueTemplate(unittest.TestCase): + """IssueTemplate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueTemplate(self): + """Test IssueTemplate""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_template.IssueTemplate() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_issue_template_string_slice.py b/test/test_issue_template_string_slice.py new file mode 100644 index 0000000..2da5ff9 --- /dev/null +++ b/test/test_issue_template_string_slice.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.issue_template_string_slice import IssueTemplateStringSlice # noqa: E501 +from swagger_client.rest import ApiException + + +class TestIssueTemplateStringSlice(unittest.TestCase): + """IssueTemplateStringSlice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIssueTemplateStringSlice(self): + """Test IssueTemplateStringSlice""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.issue_template_string_slice.IssueTemplateStringSlice() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_label.py b/test/test_label.py new file mode 100644 index 0000000..b2bf7ba --- /dev/null +++ b/test/test_label.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.label import Label # noqa: E501 +from swagger_client.rest import ApiException + + +class TestLabel(unittest.TestCase): + """Label unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLabel(self): + """Test Label""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.label.Label() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_label_template.py b/test/test_label_template.py new file mode 100644 index 0000000..33a9ff1 --- /dev/null +++ b/test/test_label_template.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.label_template import LabelTemplate # noqa: E501 +from swagger_client.rest import ApiException + + +class TestLabelTemplate(unittest.TestCase): + """LabelTemplate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLabelTemplate(self): + """Test LabelTemplate""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.label_template.LabelTemplate() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_license_template_info.py b/test/test_license_template_info.py new file mode 100644 index 0000000..cb15419 --- /dev/null +++ b/test/test_license_template_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.license_template_info import LicenseTemplateInfo # noqa: E501 +from swagger_client.rest import ApiException + + +class TestLicenseTemplateInfo(unittest.TestCase): + """LicenseTemplateInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLicenseTemplateInfo(self): + """Test LicenseTemplateInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.license_template_info.LicenseTemplateInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_licenses_template_list_entry.py b/test/test_licenses_template_list_entry.py new file mode 100644 index 0000000..91bbcf6 --- /dev/null +++ b/test/test_licenses_template_list_entry.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.licenses_template_list_entry import LicensesTemplateListEntry # noqa: E501 +from swagger_client.rest import ApiException + + +class TestLicensesTemplateListEntry(unittest.TestCase): + """LicensesTemplateListEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLicensesTemplateListEntry(self): + """Test LicensesTemplateListEntry""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.licenses_template_list_entry.LicensesTemplateListEntry() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_lock_issue_option.py b/test/test_lock_issue_option.py new file mode 100644 index 0000000..44eb996 --- /dev/null +++ b/test/test_lock_issue_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.lock_issue_option import LockIssueOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestLockIssueOption(unittest.TestCase): + """LockIssueOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLockIssueOption(self): + """Test LockIssueOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.lock_issue_option.LockIssueOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_markdown_option.py b/test/test_markdown_option.py new file mode 100644 index 0000000..e326fb4 --- /dev/null +++ b/test/test_markdown_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.markdown_option import MarkdownOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMarkdownOption(unittest.TestCase): + """MarkdownOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMarkdownOption(self): + """Test MarkdownOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.markdown_option.MarkdownOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_markup_option.py b/test/test_markup_option.py new file mode 100644 index 0000000..8f3f731 --- /dev/null +++ b/test/test_markup_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.markup_option import MarkupOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMarkupOption(unittest.TestCase): + """MarkupOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMarkupOption(self): + """Test MarkupOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.markup_option.MarkupOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_merge_pull_request_option.py b/test/test_merge_pull_request_option.py new file mode 100644 index 0000000..c6e460a --- /dev/null +++ b/test/test_merge_pull_request_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.merge_pull_request_option import MergePullRequestOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMergePullRequestOption(unittest.TestCase): + """MergePullRequestOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMergePullRequestOption(self): + """Test MergePullRequestOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.merge_pull_request_option.MergePullRequestOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_merge_upstream_request.py b/test/test_merge_upstream_request.py new file mode 100644 index 0000000..a457179 --- /dev/null +++ b/test/test_merge_upstream_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.merge_upstream_request import MergeUpstreamRequest # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMergeUpstreamRequest(unittest.TestCase): + """MergeUpstreamRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMergeUpstreamRequest(self): + """Test MergeUpstreamRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.merge_upstream_request.MergeUpstreamRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_merge_upstream_response.py b/test/test_merge_upstream_response.py new file mode 100644 index 0000000..acb1f27 --- /dev/null +++ b/test/test_merge_upstream_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.merge_upstream_response import MergeUpstreamResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMergeUpstreamResponse(unittest.TestCase): + """MergeUpstreamResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMergeUpstreamResponse(self): + """Test MergeUpstreamResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.merge_upstream_response.MergeUpstreamResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_migrate_repo_options.py b/test/test_migrate_repo_options.py new file mode 100644 index 0000000..c8b26db --- /dev/null +++ b/test/test_migrate_repo_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.migrate_repo_options import MigrateRepoOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMigrateRepoOptions(unittest.TestCase): + """MigrateRepoOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMigrateRepoOptions(self): + """Test MigrateRepoOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.migrate_repo_options.MigrateRepoOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_milestone.py b/test/test_milestone.py new file mode 100644 index 0000000..d77825e --- /dev/null +++ b/test/test_milestone.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.milestone import Milestone # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMilestone(unittest.TestCase): + """Milestone unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMilestone(self): + """Test Milestone""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.milestone.Milestone() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_miscellaneous_api.py b/test/test_miscellaneous_api.py new file mode 100644 index 0000000..bc2db75 --- /dev/null +++ b/test/test_miscellaneous_api.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.miscellaneous_api import MiscellaneousApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMiscellaneousApi(unittest.TestCase): + """MiscellaneousApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.miscellaneous_api.MiscellaneousApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_gitignore_template_info(self): + """Test case for get_gitignore_template_info + + Returns information about a gitignore template # noqa: E501 + """ + pass + + def test_get_label_template_info(self): + """Test case for get_label_template_info + + Returns all labels in a template # noqa: E501 + """ + pass + + def test_get_license_template_info(self): + """Test case for get_license_template_info + + Returns information about a license template # noqa: E501 + """ + pass + + def test_get_node_info(self): + """Test case for get_node_info + + Returns the nodeinfo of the Gitea application # noqa: E501 + """ + pass + + def test_get_signing_key(self): + """Test case for get_signing_key + + Get default signing-key.gpg # noqa: E501 + """ + pass + + def test_get_signing_key_ssh(self): + """Test case for get_signing_key_ssh + + Get default signing-key.pub # noqa: E501 + """ + pass + + def test_get_version(self): + """Test case for get_version + + Returns the version of the Gitea application # noqa: E501 + """ + pass + + def test_list_gitignores_templates(self): + """Test case for list_gitignores_templates + + Returns a list of all gitignore templates # noqa: E501 + """ + pass + + def test_list_label_templates(self): + """Test case for list_label_templates + + Returns a list of all label templates # noqa: E501 + """ + pass + + def test_list_license_templates(self): + """Test case for list_license_templates + + Returns a list of all license templates # noqa: E501 + """ + pass + + def test_render_markdown(self): + """Test case for render_markdown + + Render a markdown document as HTML # noqa: E501 + """ + pass + + def test_render_markdown_raw(self): + """Test case for render_markdown_raw + + Render raw markdown as HTML # noqa: E501 + """ + pass + + def test_render_markup(self): + """Test case for render_markup + + Render a markup document as HTML # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_new_issue_pins_allowed.py b/test/test_new_issue_pins_allowed.py new file mode 100644 index 0000000..a37d7e2 --- /dev/null +++ b/test/test_new_issue_pins_allowed.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.new_issue_pins_allowed import NewIssuePinsAllowed # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNewIssuePinsAllowed(unittest.TestCase): + """NewIssuePinsAllowed unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNewIssuePinsAllowed(self): + """Test NewIssuePinsAllowed""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.new_issue_pins_allowed.NewIssuePinsAllowed() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info.py b/test/test_node_info.py new file mode 100644 index 0000000..84f7f64 --- /dev/null +++ b/test/test_node_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.node_info import NodeInfo # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNodeInfo(unittest.TestCase): + """NodeInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfo(self): + """Test NodeInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.node_info.NodeInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info_services.py b/test/test_node_info_services.py new file mode 100644 index 0000000..ab19826 --- /dev/null +++ b/test/test_node_info_services.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.node_info_services import NodeInfoServices # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNodeInfoServices(unittest.TestCase): + """NodeInfoServices unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfoServices(self): + """Test NodeInfoServices""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.node_info_services.NodeInfoServices() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info_software.py b/test/test_node_info_software.py new file mode 100644 index 0000000..b89b693 --- /dev/null +++ b/test/test_node_info_software.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.node_info_software import NodeInfoSoftware # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNodeInfoSoftware(unittest.TestCase): + """NodeInfoSoftware unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfoSoftware(self): + """Test NodeInfoSoftware""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.node_info_software.NodeInfoSoftware() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info_usage.py b/test/test_node_info_usage.py new file mode 100644 index 0000000..9e1ab04 --- /dev/null +++ b/test/test_node_info_usage.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.node_info_usage import NodeInfoUsage # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNodeInfoUsage(unittest.TestCase): + """NodeInfoUsage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfoUsage(self): + """Test NodeInfoUsage""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.node_info_usage.NodeInfoUsage() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_info_usage_users.py b/test/test_node_info_usage_users.py new file mode 100644 index 0000000..b1d80e3 --- /dev/null +++ b/test/test_node_info_usage_users.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.node_info_usage_users import NodeInfoUsageUsers # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNodeInfoUsageUsers(unittest.TestCase): + """NodeInfoUsageUsers unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeInfoUsageUsers(self): + """Test NodeInfoUsageUsers""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.node_info_usage_users.NodeInfoUsageUsers() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_note.py b/test/test_note.py new file mode 100644 index 0000000..ea7faf3 --- /dev/null +++ b/test/test_note.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.note import Note # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNote(unittest.TestCase): + """Note unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNote(self): + """Test Note""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.note.Note() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_api.py b/test/test_notification_api.py new file mode 100644 index 0000000..9fa3faa --- /dev/null +++ b/test/test_notification_api.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.notification_api import NotificationApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNotificationApi(unittest.TestCase): + """NotificationApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.notification_api.NotificationApi() # noqa: E501 + + def tearDown(self): + pass + + def test_notify_get_list(self): + """Test case for notify_get_list + + List users's notification threads # noqa: E501 + """ + pass + + def test_notify_get_repo_list(self): + """Test case for notify_get_repo_list + + List users's notification threads on a specific repo # noqa: E501 + """ + pass + + def test_notify_get_thread(self): + """Test case for notify_get_thread + + Get notification thread by ID # noqa: E501 + """ + pass + + def test_notify_new_available(self): + """Test case for notify_new_available + + Check if unread notifications exist # noqa: E501 + """ + pass + + def test_notify_read_list(self): + """Test case for notify_read_list + + Mark notification threads as read, pinned or unread # noqa: E501 + """ + pass + + def test_notify_read_repo_list(self): + """Test case for notify_read_repo_list + + Mark notification threads as read, pinned or unread on a specific repo # noqa: E501 + """ + pass + + def test_notify_read_thread(self): + """Test case for notify_read_thread + + Mark notification thread as read by ID # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_count.py b/test/test_notification_count.py new file mode 100644 index 0000000..1ffc72f --- /dev/null +++ b/test/test_notification_count.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.notification_count import NotificationCount # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNotificationCount(unittest.TestCase): + """NotificationCount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationCount(self): + """Test NotificationCount""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.notification_count.NotificationCount() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_subject.py b/test/test_notification_subject.py new file mode 100644 index 0000000..dbb4cc2 --- /dev/null +++ b/test/test_notification_subject.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.notification_subject import NotificationSubject # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNotificationSubject(unittest.TestCase): + """NotificationSubject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationSubject(self): + """Test NotificationSubject""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.notification_subject.NotificationSubject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_thread.py b/test/test_notification_thread.py new file mode 100644 index 0000000..791dc23 --- /dev/null +++ b/test/test_notification_thread.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.notification_thread import NotificationThread # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNotificationThread(unittest.TestCase): + """NotificationThread unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationThread(self): + """Test NotificationThread""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.notification_thread.NotificationThread() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notify_subject_type.py b/test/test_notify_subject_type.py new file mode 100644 index 0000000..075ff0a --- /dev/null +++ b/test/test_notify_subject_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.notify_subject_type import NotifySubjectType # noqa: E501 +from swagger_client.rest import ApiException + + +class TestNotifySubjectType(unittest.TestCase): + """NotifySubjectType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotifySubjectType(self): + """Test NotifySubjectType""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.notify_subject_type.NotifySubjectType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_o_auth2_application.py b/test/test_o_auth2_application.py new file mode 100644 index 0000000..93e01c7 --- /dev/null +++ b/test/test_o_auth2_application.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.o_auth2_application import OAuth2Application # noqa: E501 +from swagger_client.rest import ApiException + + +class TestOAuth2Application(unittest.TestCase): + """OAuth2Application unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2Application(self): + """Test OAuth2Application""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.o_auth2_application.OAuth2Application() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization.py b/test/test_organization.py new file mode 100644 index 0000000..b54e74c --- /dev/null +++ b/test/test_organization.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.organization import Organization # noqa: E501 +from swagger_client.rest import ApiException + + +class TestOrganization(unittest.TestCase): + """Organization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganization(self): + """Test Organization""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.organization.Organization() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_api.py b/test/test_organization_api.py new file mode 100644 index 0000000..fada480 --- /dev/null +++ b/test/test_organization_api.py @@ -0,0 +1,496 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.organization_api import OrganizationApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestOrganizationApi(unittest.TestCase): + """OrganizationApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.organization_api.OrganizationApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_org_repo(self): + """Test case for create_org_repo + + Create a repository in an organization # noqa: E501 + """ + pass + + def test_create_org_repo_deprecated(self): + """Test case for create_org_repo_deprecated + + Create a repository in an organization # noqa: E501 + """ + pass + + def test_create_org_variable(self): + """Test case for create_org_variable + + Create an org-level variable # noqa: E501 + """ + pass + + def test_delete_org_runner(self): + """Test case for delete_org_runner + + Delete an org-level runner # noqa: E501 + """ + pass + + def test_delete_org_secret(self): + """Test case for delete_org_secret + + Delete a secret in an organization # noqa: E501 + """ + pass + + def test_delete_org_variable(self): + """Test case for delete_org_variable + + Delete an org-level variable # noqa: E501 + """ + pass + + def test_get_org_runner(self): + """Test case for get_org_runner + + Get an org-level runner # noqa: E501 + """ + pass + + def test_get_org_runners(self): + """Test case for get_org_runners + + Get org-level runners # noqa: E501 + """ + pass + + def test_get_org_variable(self): + """Test case for get_org_variable + + Get an org-level variable # noqa: E501 + """ + pass + + def test_get_org_variables_list(self): + """Test case for get_org_variables_list + + Get an org-level variables list # noqa: E501 + """ + pass + + def test_get_org_workflow_jobs(self): + """Test case for get_org_workflow_jobs + + Get org-level workflow jobs # noqa: E501 + """ + pass + + def test_get_org_workflow_runs(self): + """Test case for get_org_workflow_runs + + Get org-level workflow runs # noqa: E501 + """ + pass + + def test_org_add_team_member(self): + """Test case for org_add_team_member + + Add a team member # noqa: E501 + """ + pass + + def test_org_add_team_repository(self): + """Test case for org_add_team_repository + + Add a repository to a team # noqa: E501 + """ + pass + + def test_org_conceal_member(self): + """Test case for org_conceal_member + + Conceal a user's membership # noqa: E501 + """ + pass + + def test_org_create(self): + """Test case for org_create + + Create an organization # noqa: E501 + """ + pass + + def test_org_create_hook(self): + """Test case for org_create_hook + + Create a hook # noqa: E501 + """ + pass + + def test_org_create_label(self): + """Test case for org_create_label + + Create a label for an organization # noqa: E501 + """ + pass + + def test_org_create_runner_registration_token(self): + """Test case for org_create_runner_registration_token + + Get an organization's actions runner registration token # noqa: E501 + """ + pass + + def test_org_create_team(self): + """Test case for org_create_team + + Create a team # noqa: E501 + """ + pass + + def test_org_delete(self): + """Test case for org_delete + + Delete an organization # noqa: E501 + """ + pass + + def test_org_delete_avatar(self): + """Test case for org_delete_avatar + + Delete Avatar # noqa: E501 + """ + pass + + def test_org_delete_hook(self): + """Test case for org_delete_hook + + Delete a hook # noqa: E501 + """ + pass + + def test_org_delete_label(self): + """Test case for org_delete_label + + Delete a label # noqa: E501 + """ + pass + + def test_org_delete_member(self): + """Test case for org_delete_member + + Remove a member from an organization # noqa: E501 + """ + pass + + def test_org_delete_team(self): + """Test case for org_delete_team + + Delete a team # noqa: E501 + """ + pass + + def test_org_edit(self): + """Test case for org_edit + + Edit an organization # noqa: E501 + """ + pass + + def test_org_edit_hook(self): + """Test case for org_edit_hook + + Update a hook # noqa: E501 + """ + pass + + def test_org_edit_label(self): + """Test case for org_edit_label + + Update a label # noqa: E501 + """ + pass + + def test_org_edit_team(self): + """Test case for org_edit_team + + Edit a team # noqa: E501 + """ + pass + + def test_org_get(self): + """Test case for org_get + + Get an organization # noqa: E501 + """ + pass + + def test_org_get_all(self): + """Test case for org_get_all + + Get list of organizations # noqa: E501 + """ + pass + + def test_org_get_hook(self): + """Test case for org_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_org_get_label(self): + """Test case for org_get_label + + Get a single label # noqa: E501 + """ + pass + + def test_org_get_runner_registration_token(self): + """Test case for org_get_runner_registration_token + + Get an organization's actions runner registration token # noqa: E501 + """ + pass + + def test_org_get_team(self): + """Test case for org_get_team + + Get a team # noqa: E501 + """ + pass + + def test_org_get_user_permissions(self): + """Test case for org_get_user_permissions + + Get user permissions in organization # noqa: E501 + """ + pass + + def test_org_is_member(self): + """Test case for org_is_member + + Check if a user is a member of an organization # noqa: E501 + """ + pass + + def test_org_is_public_member(self): + """Test case for org_is_public_member + + Check if a user is a public member of an organization # noqa: E501 + """ + pass + + def test_org_list_actions_secrets(self): + """Test case for org_list_actions_secrets + + List an organization's actions secrets # noqa: E501 + """ + pass + + def test_org_list_activity_feeds(self): + """Test case for org_list_activity_feeds + + List an organization's activity feeds # noqa: E501 + """ + pass + + def test_org_list_current_user_orgs(self): + """Test case for org_list_current_user_orgs + + List the current user's organizations # noqa: E501 + """ + pass + + def test_org_list_hooks(self): + """Test case for org_list_hooks + + List an organization's webhooks # noqa: E501 + """ + pass + + def test_org_list_labels(self): + """Test case for org_list_labels + + List an organization's labels # noqa: E501 + """ + pass + + def test_org_list_members(self): + """Test case for org_list_members + + List an organization's members # noqa: E501 + """ + pass + + def test_org_list_public_members(self): + """Test case for org_list_public_members + + List an organization's public members # noqa: E501 + """ + pass + + def test_org_list_repos(self): + """Test case for org_list_repos + + List an organization's repos # noqa: E501 + """ + pass + + def test_org_list_team_activity_feeds(self): + """Test case for org_list_team_activity_feeds + + List a team's activity feeds # noqa: E501 + """ + pass + + def test_org_list_team_member(self): + """Test case for org_list_team_member + + List a particular member of team # noqa: E501 + """ + pass + + def test_org_list_team_members(self): + """Test case for org_list_team_members + + List a team's members # noqa: E501 + """ + pass + + def test_org_list_team_repo(self): + """Test case for org_list_team_repo + + List a particular repo of team # noqa: E501 + """ + pass + + def test_org_list_team_repos(self): + """Test case for org_list_team_repos + + List a team's repos # noqa: E501 + """ + pass + + def test_org_list_teams(self): + """Test case for org_list_teams + + List an organization's teams # noqa: E501 + """ + pass + + def test_org_list_user_orgs(self): + """Test case for org_list_user_orgs + + List a user's organizations # noqa: E501 + """ + pass + + def test_org_publicize_member(self): + """Test case for org_publicize_member + + Publicize a user's membership # noqa: E501 + """ + pass + + def test_org_remove_team_member(self): + """Test case for org_remove_team_member + + Remove a team member # noqa: E501 + """ + pass + + def test_org_remove_team_repository(self): + """Test case for org_remove_team_repository + + Remove a repository from a team # noqa: E501 + """ + pass + + def test_org_update_avatar(self): + """Test case for org_update_avatar + + Update Avatar # noqa: E501 + """ + pass + + def test_organization_block_user(self): + """Test case for organization_block_user + + Block a user # noqa: E501 + """ + pass + + def test_organization_check_user_block(self): + """Test case for organization_check_user_block + + Check if a user is blocked by the organization # noqa: E501 + """ + pass + + def test_organization_list_blocks(self): + """Test case for organization_list_blocks + + List users blocked by the organization # noqa: E501 + """ + pass + + def test_organization_unblock_user(self): + """Test case for organization_unblock_user + + Unblock a user # noqa: E501 + """ + pass + + def test_rename_org(self): + """Test case for rename_org + + Rename an organization # noqa: E501 + """ + pass + + def test_team_search(self): + """Test case for team_search + + Search for teams within an organization # noqa: E501 + """ + pass + + def test_update_org_secret(self): + """Test case for update_org_secret + + Create or Update a secret value in an organization # noqa: E501 + """ + pass + + def test_update_org_variable(self): + """Test case for update_org_variable + + Update an org-level variable # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_permissions.py b/test/test_organization_permissions.py new file mode 100644 index 0000000..9aec53e --- /dev/null +++ b/test/test_organization_permissions.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.organization_permissions import OrganizationPermissions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestOrganizationPermissions(unittest.TestCase): + """OrganizationPermissions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationPermissions(self): + """Test OrganizationPermissions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.organization_permissions.OrganizationPermissions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_package.py b/test/test_package.py new file mode 100644 index 0000000..69cdb3c --- /dev/null +++ b/test/test_package.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.package import Package # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPackage(unittest.TestCase): + """Package unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPackage(self): + """Test Package""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.package.Package() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_package_api.py b/test/test_package_api.py new file mode 100644 index 0000000..313a2d1 --- /dev/null +++ b/test/test_package_api.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.package_api import PackageApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPackageApi(unittest.TestCase): + """PackageApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.package_api.PackageApi() # noqa: E501 + + def tearDown(self): + pass + + def test_delete_package(self): + """Test case for delete_package + + Delete a package # noqa: E501 + """ + pass + + def test_get_latest_package_version(self): + """Test case for get_latest_package_version + + Gets the latest version of a package # noqa: E501 + """ + pass + + def test_get_package(self): + """Test case for get_package + + Gets a package # noqa: E501 + """ + pass + + def test_link_package(self): + """Test case for link_package + + Link a package to a repository # noqa: E501 + """ + pass + + def test_list_package_files(self): + """Test case for list_package_files + + Gets all files of a package # noqa: E501 + """ + pass + + def test_list_package_versions(self): + """Test case for list_package_versions + + Gets all versions of a package # noqa: E501 + """ + pass + + def test_list_packages(self): + """Test case for list_packages + + Gets all packages of an owner # noqa: E501 + """ + pass + + def test_unlink_package(self): + """Test case for unlink_package + + Unlink a package from a repository # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_package_file.py b/test/test_package_file.py new file mode 100644 index 0000000..8d1748c --- /dev/null +++ b/test/test_package_file.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.package_file import PackageFile # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPackageFile(unittest.TestCase): + """PackageFile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPackageFile(self): + """Test PackageFile""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.package_file.PackageFile() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payload_commit.py b/test/test_payload_commit.py new file mode 100644 index 0000000..99e6616 --- /dev/null +++ b/test/test_payload_commit.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.payload_commit import PayloadCommit # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPayloadCommit(unittest.TestCase): + """PayloadCommit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayloadCommit(self): + """Test PayloadCommit""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.payload_commit.PayloadCommit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payload_commit_verification.py b/test/test_payload_commit_verification.py new file mode 100644 index 0000000..8e251c3 --- /dev/null +++ b/test/test_payload_commit_verification.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.payload_commit_verification import PayloadCommitVerification # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPayloadCommitVerification(unittest.TestCase): + """PayloadCommitVerification unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayloadCommitVerification(self): + """Test PayloadCommitVerification""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.payload_commit_verification.PayloadCommitVerification() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payload_user.py b/test/test_payload_user.py new file mode 100644 index 0000000..96c30db --- /dev/null +++ b/test/test_payload_user.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.payload_user import PayloadUser # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPayloadUser(unittest.TestCase): + """PayloadUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayloadUser(self): + """Test PayloadUser""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.payload_user.PayloadUser() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_permission.py b/test/test_permission.py new file mode 100644 index 0000000..3588173 --- /dev/null +++ b/test/test_permission.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.permission import Permission # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPermission(unittest.TestCase): + """Permission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPermission(self): + """Test Permission""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.permission.Permission() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pr_branch_info.py b/test/test_pr_branch_info.py new file mode 100644 index 0000000..2db863c --- /dev/null +++ b/test/test_pr_branch_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.pr_branch_info import PRBranchInfo # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPRBranchInfo(unittest.TestCase): + """PRBranchInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPRBranchInfo(self): + """Test PRBranchInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.pr_branch_info.PRBranchInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_public_key.py b/test/test_public_key.py new file mode 100644 index 0000000..a04ca6e --- /dev/null +++ b/test/test_public_key.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.public_key import PublicKey # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPublicKey(unittest.TestCase): + """PublicKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPublicKey(self): + """Test PublicKey""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.public_key.PublicKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_request.py b/test/test_pull_request.py new file mode 100644 index 0000000..02c3ac4 --- /dev/null +++ b/test/test_pull_request.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.pull_request import PullRequest # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPullRequest(unittest.TestCase): + """PullRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullRequest(self): + """Test PullRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.pull_request.PullRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_request_meta.py b/test/test_pull_request_meta.py new file mode 100644 index 0000000..5ffb20b --- /dev/null +++ b/test/test_pull_request_meta.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.pull_request_meta import PullRequestMeta # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPullRequestMeta(unittest.TestCase): + """PullRequestMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullRequestMeta(self): + """Test PullRequestMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.pull_request_meta.PullRequestMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_review.py b/test/test_pull_review.py new file mode 100644 index 0000000..abc5f6d --- /dev/null +++ b/test/test_pull_review.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.pull_review import PullReview # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPullReview(unittest.TestCase): + """PullReview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullReview(self): + """Test PullReview""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.pull_review.PullReview() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_review_comment.py b/test/test_pull_review_comment.py new file mode 100644 index 0000000..e88a722 --- /dev/null +++ b/test/test_pull_review_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.pull_review_comment import PullReviewComment # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPullReviewComment(unittest.TestCase): + """PullReviewComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullReviewComment(self): + """Test PullReviewComment""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.pull_review_comment.PullReviewComment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_review_request_options.py b/test/test_pull_review_request_options.py new file mode 100644 index 0000000..eba0498 --- /dev/null +++ b/test/test_pull_review_request_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.pull_review_request_options import PullReviewRequestOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPullReviewRequestOptions(unittest.TestCase): + """PullReviewRequestOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullReviewRequestOptions(self): + """Test PullReviewRequestOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.pull_review_request_options.PullReviewRequestOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_push_mirror.py b/test/test_push_mirror.py new file mode 100644 index 0000000..8c38482 --- /dev/null +++ b/test/test_push_mirror.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.push_mirror import PushMirror # noqa: E501 +from swagger_client.rest import ApiException + + +class TestPushMirror(unittest.TestCase): + """PushMirror unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPushMirror(self): + """Test PushMirror""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.push_mirror.PushMirror() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reaction.py b/test/test_reaction.py new file mode 100644 index 0000000..4d11c23 --- /dev/null +++ b/test/test_reaction.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.reaction import Reaction # noqa: E501 +from swagger_client.rest import ApiException + + +class TestReaction(unittest.TestCase): + """Reaction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReaction(self): + """Test Reaction""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.reaction.Reaction() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reference.py b/test/test_reference.py new file mode 100644 index 0000000..b03a57e --- /dev/null +++ b/test/test_reference.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.reference import Reference # noqa: E501 +from swagger_client.rest import ApiException + + +class TestReference(unittest.TestCase): + """Reference unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReference(self): + """Test Reference""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.reference.Reference() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_release.py b/test/test_release.py new file mode 100644 index 0000000..9e80057 --- /dev/null +++ b/test/test_release.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.release import Release # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRelease(unittest.TestCase): + """Release unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRelease(self): + """Test Release""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.release.Release() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rename_branch_repo_option.py b/test/test_rename_branch_repo_option.py new file mode 100644 index 0000000..c642157 --- /dev/null +++ b/test/test_rename_branch_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.rename_branch_repo_option import RenameBranchRepoOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRenameBranchRepoOption(unittest.TestCase): + """RenameBranchRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRenameBranchRepoOption(self): + """Test RenameBranchRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.rename_branch_repo_option.RenameBranchRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rename_org_option.py b/test/test_rename_org_option.py new file mode 100644 index 0000000..72bce46 --- /dev/null +++ b/test/test_rename_org_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.rename_org_option import RenameOrgOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRenameOrgOption(unittest.TestCase): + """RenameOrgOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRenameOrgOption(self): + """Test RenameOrgOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.rename_org_option.RenameOrgOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rename_user_option.py b/test/test_rename_user_option.py new file mode 100644 index 0000000..1b52d9f --- /dev/null +++ b/test/test_rename_user_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.rename_user_option import RenameUserOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRenameUserOption(unittest.TestCase): + """RenameUserOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRenameUserOption(self): + """Test RenameUserOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.rename_user_option.RenameUserOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_collaborator_permission.py b/test/test_repo_collaborator_permission.py new file mode 100644 index 0000000..7bd5848 --- /dev/null +++ b/test/test_repo_collaborator_permission.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.repo_collaborator_permission import RepoCollaboratorPermission # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRepoCollaboratorPermission(unittest.TestCase): + """RepoCollaboratorPermission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoCollaboratorPermission(self): + """Test RepoCollaboratorPermission""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.repo_collaborator_permission.RepoCollaboratorPermission() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_commit.py b/test/test_repo_commit.py new file mode 100644 index 0000000..86b260e --- /dev/null +++ b/test/test_repo_commit.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.repo_commit import RepoCommit # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRepoCommit(unittest.TestCase): + """RepoCommit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoCommit(self): + """Test RepoCommit""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.repo_commit.RepoCommit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_topic_options.py b/test/test_repo_topic_options.py new file mode 100644 index 0000000..31e2792 --- /dev/null +++ b/test/test_repo_topic_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.repo_topic_options import RepoTopicOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRepoTopicOptions(unittest.TestCase): + """RepoTopicOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoTopicOptions(self): + """Test RepoTopicOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.repo_topic_options.RepoTopicOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repo_transfer.py b/test/test_repo_transfer.py new file mode 100644 index 0000000..e60a504 --- /dev/null +++ b/test/test_repo_transfer.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.repo_transfer import RepoTransfer # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRepoTransfer(unittest.TestCase): + """RepoTransfer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepoTransfer(self): + """Test RepoTransfer""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.repo_transfer.RepoTransfer() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repository.py b/test/test_repository.py new file mode 100644 index 0000000..e43dcad --- /dev/null +++ b/test/test_repository.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.repository import Repository # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRepository(unittest.TestCase): + """Repository unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepository(self): + """Test Repository""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.repository.Repository() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repository_api.py b/test/test_repository_api.py new file mode 100644 index 0000000..66234b6 --- /dev/null +++ b/test/test_repository_api.py @@ -0,0 +1,1371 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.repository_api import RepositoryApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRepositoryApi(unittest.TestCase): + """RepositoryApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.repository_api.RepositoryApi() # noqa: E501 + + def tearDown(self): + pass + + def test_accept_repo_transfer(self): + """Test case for accept_repo_transfer + + Accept a repo transfer # noqa: E501 + """ + pass + + def test_actions_disable_workflow(self): + """Test case for actions_disable_workflow + + Disable a workflow # noqa: E501 + """ + pass + + def test_actions_dispatch_workflow(self): + """Test case for actions_dispatch_workflow + + Create a workflow dispatch event # noqa: E501 + """ + pass + + def test_actions_enable_workflow(self): + """Test case for actions_enable_workflow + + Enable a workflow # noqa: E501 + """ + pass + + def test_actions_get_workflow(self): + """Test case for actions_get_workflow + + Get a workflow # noqa: E501 + """ + pass + + def test_actions_list_repository_workflows(self): + """Test case for actions_list_repository_workflows + + List repository workflows # noqa: E501 + """ + pass + + def test_create_current_user_repo(self): + """Test case for create_current_user_repo + + Create a repository # noqa: E501 + """ + pass + + def test_create_fork(self): + """Test case for create_fork + + Fork a repository # noqa: E501 + """ + pass + + def test_create_repo_variable(self): + """Test case for create_repo_variable + + Create a repo-level variable # noqa: E501 + """ + pass + + def test_delete_action_run(self): + """Test case for delete_action_run + + Delete a workflow run # noqa: E501 + """ + pass + + def test_delete_artifact(self): + """Test case for delete_artifact + + Deletes a specific artifact for a workflow run # noqa: E501 + """ + pass + + def test_delete_repo_runner(self): + """Test case for delete_repo_runner + + Delete an repo-level runner # noqa: E501 + """ + pass + + def test_delete_repo_secret(self): + """Test case for delete_repo_secret + + Delete a secret in a repository # noqa: E501 + """ + pass + + def test_delete_repo_variable(self): + """Test case for delete_repo_variable + + Delete a repo-level variable # noqa: E501 + """ + pass + + def test_download_actions_run_job_logs(self): + """Test case for download_actions_run_job_logs + + Downloads the job logs for a workflow run # noqa: E501 + """ + pass + + def test_download_artifact(self): + """Test case for download_artifact + + Downloads a specific artifact for a workflow run redirects to blob url # noqa: E501 + """ + pass + + def test_generate_repo(self): + """Test case for generate_repo + + Create a repository using a template # noqa: E501 + """ + pass + + def test_get_annotated_tag(self): + """Test case for get_annotated_tag + + Gets the tag object of an annotated tag (not lightweight tags) # noqa: E501 + """ + pass + + def test_get_artifact(self): + """Test case for get_artifact + + Gets a specific artifact for a workflow run # noqa: E501 + """ + pass + + def test_get_artifacts(self): + """Test case for get_artifacts + + Lists all artifacts for a repository # noqa: E501 + """ + pass + + def test_get_artifacts_of_run(self): + """Test case for get_artifacts_of_run + + Lists all artifacts for a repository run # noqa: E501 + """ + pass + + def test_get_blob(self): + """Test case for get_blob + + Gets the blob of a repository. # noqa: E501 + """ + pass + + def test_get_repo_runner(self): + """Test case for get_repo_runner + + Get an repo-level runner # noqa: E501 + """ + pass + + def test_get_repo_runners(self): + """Test case for get_repo_runners + + Get repo-level runners # noqa: E501 + """ + pass + + def test_get_repo_variable(self): + """Test case for get_repo_variable + + Get a repo-level variable # noqa: E501 + """ + pass + + def test_get_repo_variables_list(self): + """Test case for get_repo_variables_list + + Get repo-level variables list # noqa: E501 + """ + pass + + def test_get_tree(self): + """Test case for get_tree + + Gets the tree of a repository. # noqa: E501 + """ + pass + + def test_get_workflow_job(self): + """Test case for get_workflow_job + + Gets a specific workflow job for a workflow run # noqa: E501 + """ + pass + + def test_get_workflow_run(self): + """Test case for get_workflow_run + + Gets a specific workflow run # noqa: E501 + """ + pass + + def test_get_workflow_runs(self): + """Test case for get_workflow_runs + + Lists all runs for a repository run # noqa: E501 + """ + pass + + def test_list_action_tasks(self): + """Test case for list_action_tasks + + List a repository's action tasks # noqa: E501 + """ + pass + + def test_list_forks(self): + """Test case for list_forks + + List a repository's forks # noqa: E501 + """ + pass + + def test_list_workflow_jobs(self): + """Test case for list_workflow_jobs + + Lists all jobs for a repository # noqa: E501 + """ + pass + + def test_list_workflow_run_jobs(self): + """Test case for list_workflow_run_jobs + + Lists all jobs for a workflow run # noqa: E501 + """ + pass + + def test_reject_repo_transfer(self): + """Test case for reject_repo_transfer + + Reject a repo transfer # noqa: E501 + """ + pass + + def test_repo_add_collaborator(self): + """Test case for repo_add_collaborator + + Add or Update a collaborator to a repository # noqa: E501 + """ + pass + + def test_repo_add_push_mirror(self): + """Test case for repo_add_push_mirror + + add a push mirror to the repository # noqa: E501 + """ + pass + + def test_repo_add_team(self): + """Test case for repo_add_team + + Add a team to a repository # noqa: E501 + """ + pass + + def test_repo_add_topic(self): + """Test case for repo_add_topic + + Add a topic to a repository # noqa: E501 + """ + pass + + def test_repo_apply_diff_patch(self): + """Test case for repo_apply_diff_patch + + Apply diff patch to repository # noqa: E501 + """ + pass + + def test_repo_cancel_scheduled_auto_merge(self): + """Test case for repo_cancel_scheduled_auto_merge + + Cancel the scheduled auto merge for the given pull request # noqa: E501 + """ + pass + + def test_repo_change_files(self): + """Test case for repo_change_files + + Modify multiple files in a repository # noqa: E501 + """ + pass + + def test_repo_check_collaborator(self): + """Test case for repo_check_collaborator + + Check if a user is a collaborator of a repository # noqa: E501 + """ + pass + + def test_repo_check_team(self): + """Test case for repo_check_team + + Check if a team is assigned to a repository # noqa: E501 + """ + pass + + def test_repo_compare_diff(self): + """Test case for repo_compare_diff + + Get commit comparison information # noqa: E501 + """ + pass + + def test_repo_create_branch(self): + """Test case for repo_create_branch + + Create a branch # noqa: E501 + """ + pass + + def test_repo_create_branch_protection(self): + """Test case for repo_create_branch_protection + + Create a branch protections for a repository # noqa: E501 + """ + pass + + def test_repo_create_file(self): + """Test case for repo_create_file + + Create a file in a repository # noqa: E501 + """ + pass + + def test_repo_create_hook(self): + """Test case for repo_create_hook + + Create a hook # noqa: E501 + """ + pass + + def test_repo_create_key(self): + """Test case for repo_create_key + + Add a key to a repository # noqa: E501 + """ + pass + + def test_repo_create_pull_request(self): + """Test case for repo_create_pull_request + + Create a pull request # noqa: E501 + """ + pass + + def test_repo_create_pull_review(self): + """Test case for repo_create_pull_review + + Create a review to an pull request # noqa: E501 + """ + pass + + def test_repo_create_pull_review_requests(self): + """Test case for repo_create_pull_review_requests + + create review requests for a pull request # noqa: E501 + """ + pass + + def test_repo_create_release(self): + """Test case for repo_create_release + + Create a release # noqa: E501 + """ + pass + + def test_repo_create_release_attachment(self): + """Test case for repo_create_release_attachment + + Create a release attachment # noqa: E501 + """ + pass + + def test_repo_create_runner_registration_token(self): + """Test case for repo_create_runner_registration_token + + Get a repository's actions runner registration token # noqa: E501 + """ + pass + + def test_repo_create_status(self): + """Test case for repo_create_status + + Create a commit status # noqa: E501 + """ + pass + + def test_repo_create_tag(self): + """Test case for repo_create_tag + + Create a new git tag in a repository # noqa: E501 + """ + pass + + def test_repo_create_tag_protection(self): + """Test case for repo_create_tag_protection + + Create a tag protections for a repository # noqa: E501 + """ + pass + + def test_repo_create_wiki_page(self): + """Test case for repo_create_wiki_page + + Create a wiki page # noqa: E501 + """ + pass + + def test_repo_delete(self): + """Test case for repo_delete + + Delete a repository # noqa: E501 + """ + pass + + def test_repo_delete_avatar(self): + """Test case for repo_delete_avatar + + Delete avatar # noqa: E501 + """ + pass + + def test_repo_delete_branch(self): + """Test case for repo_delete_branch + + Delete a specific branch from a repository # noqa: E501 + """ + pass + + def test_repo_delete_branch_protection(self): + """Test case for repo_delete_branch_protection + + Delete a specific branch protection for the repository # noqa: E501 + """ + pass + + def test_repo_delete_collaborator(self): + """Test case for repo_delete_collaborator + + Delete a collaborator from a repository # noqa: E501 + """ + pass + + def test_repo_delete_file(self): + """Test case for repo_delete_file + + Delete a file in a repository # noqa: E501 + """ + pass + + def test_repo_delete_git_hook(self): + """Test case for repo_delete_git_hook + + Delete a Git hook in a repository # noqa: E501 + """ + pass + + def test_repo_delete_hook(self): + """Test case for repo_delete_hook + + Delete a hook in a repository # noqa: E501 + """ + pass + + def test_repo_delete_key(self): + """Test case for repo_delete_key + + Delete a key from a repository # noqa: E501 + """ + pass + + def test_repo_delete_pull_review(self): + """Test case for repo_delete_pull_review + + Delete a specific review from a pull request # noqa: E501 + """ + pass + + def test_repo_delete_pull_review_requests(self): + """Test case for repo_delete_pull_review_requests + + cancel review requests for a pull request # noqa: E501 + """ + pass + + def test_repo_delete_push_mirror(self): + """Test case for repo_delete_push_mirror + + deletes a push mirror from a repository by remoteName # noqa: E501 + """ + pass + + def test_repo_delete_release(self): + """Test case for repo_delete_release + + Delete a release # noqa: E501 + """ + pass + + def test_repo_delete_release_attachment(self): + """Test case for repo_delete_release_attachment + + Delete a release attachment # noqa: E501 + """ + pass + + def test_repo_delete_release_by_tag(self): + """Test case for repo_delete_release_by_tag + + Delete a release by tag name # noqa: E501 + """ + pass + + def test_repo_delete_tag(self): + """Test case for repo_delete_tag + + Delete a repository's tag by name # noqa: E501 + """ + pass + + def test_repo_delete_tag_protection(self): + """Test case for repo_delete_tag_protection + + Delete a specific tag protection for the repository # noqa: E501 + """ + pass + + def test_repo_delete_team(self): + """Test case for repo_delete_team + + Delete a team from a repository # noqa: E501 + """ + pass + + def test_repo_delete_topic(self): + """Test case for repo_delete_topic + + Delete a topic from a repository # noqa: E501 + """ + pass + + def test_repo_delete_wiki_page(self): + """Test case for repo_delete_wiki_page + + Delete a wiki page # noqa: E501 + """ + pass + + def test_repo_dismiss_pull_review(self): + """Test case for repo_dismiss_pull_review + + Dismiss a review for a pull request # noqa: E501 + """ + pass + + def test_repo_download_commit_diff_or_patch(self): + """Test case for repo_download_commit_diff_or_patch + + Get a commit's diff or patch # noqa: E501 + """ + pass + + def test_repo_download_pull_diff_or_patch(self): + """Test case for repo_download_pull_diff_or_patch + + Get a pull request diff or patch # noqa: E501 + """ + pass + + def test_repo_edit(self): + """Test case for repo_edit + + Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 + """ + pass + + def test_repo_edit_branch_protection(self): + """Test case for repo_edit_branch_protection + + Edit a branch protections for a repository. Only fields that are set will be changed # noqa: E501 + """ + pass + + def test_repo_edit_git_hook(self): + """Test case for repo_edit_git_hook + + Edit a Git hook in a repository # noqa: E501 + """ + pass + + def test_repo_edit_hook(self): + """Test case for repo_edit_hook + + Edit a hook in a repository # noqa: E501 + """ + pass + + def test_repo_edit_pull_request(self): + """Test case for repo_edit_pull_request + + Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + """ + pass + + def test_repo_edit_release(self): + """Test case for repo_edit_release + + Update a release # noqa: E501 + """ + pass + + def test_repo_edit_release_attachment(self): + """Test case for repo_edit_release_attachment + + Edit a release attachment # noqa: E501 + """ + pass + + def test_repo_edit_tag_protection(self): + """Test case for repo_edit_tag_protection + + Edit a tag protections for a repository. Only fields that are set will be changed # noqa: E501 + """ + pass + + def test_repo_edit_wiki_page(self): + """Test case for repo_edit_wiki_page + + Edit a wiki page # noqa: E501 + """ + pass + + def test_repo_get(self): + """Test case for repo_get + + Get a repository # noqa: E501 + """ + pass + + def test_repo_get_all_commits(self): + """Test case for repo_get_all_commits + + Get a list of all commits from a repository # noqa: E501 + """ + pass + + def test_repo_get_archive(self): + """Test case for repo_get_archive + + Get an archive of a repository # noqa: E501 + """ + pass + + def test_repo_get_assignees(self): + """Test case for repo_get_assignees + + Return all users that have write access and can be assigned to issues # noqa: E501 + """ + pass + + def test_repo_get_branch(self): + """Test case for repo_get_branch + + Retrieve a specific branch from a repository, including its effective branch protection # noqa: E501 + """ + pass + + def test_repo_get_branch_protection(self): + """Test case for repo_get_branch_protection + + Get a specific branch protection for the repository # noqa: E501 + """ + pass + + def test_repo_get_by_id(self): + """Test case for repo_get_by_id + + Get a repository by id # noqa: E501 + """ + pass + + def test_repo_get_combined_status_by_ref(self): + """Test case for repo_get_combined_status_by_ref + + Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + """ + pass + + def test_repo_get_commit_pull_request(self): + """Test case for repo_get_commit_pull_request + + Get the merged pull request of the commit # noqa: E501 + """ + pass + + def test_repo_get_contents(self): + """Test case for repo_get_contents + + Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir. # noqa: E501 + """ + pass + + def test_repo_get_contents_ext(self): + """Test case for repo_get_contents_ext + + The extended \"contents\" API, to get file metadata and/or content, or list a directory. # noqa: E501 + """ + pass + + def test_repo_get_contents_list(self): + """Test case for repo_get_contents_list + + Gets the metadata of all the entries of the root dir. # noqa: E501 + """ + pass + + def test_repo_get_editor_config(self): + """Test case for repo_get_editor_config + + Get the EditorConfig definitions of a file in a repository # noqa: E501 + """ + pass + + def test_repo_get_file_contents(self): + """Test case for repo_get_file_contents + + Get the metadata and contents of requested files # noqa: E501 + """ + pass + + def test_repo_get_file_contents_post(self): + """Test case for repo_get_file_contents_post + + Get the metadata and contents of requested files # noqa: E501 + """ + pass + + def test_repo_get_git_hook(self): + """Test case for repo_get_git_hook + + Get a Git hook # noqa: E501 + """ + pass + + def test_repo_get_hook(self): + """Test case for repo_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_repo_get_issue_config(self): + """Test case for repo_get_issue_config + + Returns the issue config for a repo # noqa: E501 + """ + pass + + def test_repo_get_issue_templates(self): + """Test case for repo_get_issue_templates + + Get available issue templates for a repository # noqa: E501 + """ + pass + + def test_repo_get_key(self): + """Test case for repo_get_key + + Get a repository's key by id # noqa: E501 + """ + pass + + def test_repo_get_languages(self): + """Test case for repo_get_languages + + Get languages and number of bytes of code written # noqa: E501 + """ + pass + + def test_repo_get_latest_release(self): + """Test case for repo_get_latest_release + + Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at # noqa: E501 + """ + pass + + def test_repo_get_licenses(self): + """Test case for repo_get_licenses + + Get repo licenses # noqa: E501 + """ + pass + + def test_repo_get_note(self): + """Test case for repo_get_note + + Get a note corresponding to a single commit from a repository # noqa: E501 + """ + pass + + def test_repo_get_pull_request(self): + """Test case for repo_get_pull_request + + Get a pull request # noqa: E501 + """ + pass + + def test_repo_get_pull_request_by_base_head(self): + """Test case for repo_get_pull_request_by_base_head + + Get a pull request by base and head # noqa: E501 + """ + pass + + def test_repo_get_pull_request_commits(self): + """Test case for repo_get_pull_request_commits + + Get commits for a pull request # noqa: E501 + """ + pass + + def test_repo_get_pull_request_files(self): + """Test case for repo_get_pull_request_files + + Get changed files for a pull request # noqa: E501 + """ + pass + + def test_repo_get_pull_review(self): + """Test case for repo_get_pull_review + + Get a specific review for a pull request # noqa: E501 + """ + pass + + def test_repo_get_pull_review_comments(self): + """Test case for repo_get_pull_review_comments + + Get a specific review for a pull request # noqa: E501 + """ + pass + + def test_repo_get_push_mirror_by_remote_name(self): + """Test case for repo_get_push_mirror_by_remote_name + + Get push mirror of the repository by remoteName # noqa: E501 + """ + pass + + def test_repo_get_raw_file(self): + """Test case for repo_get_raw_file + + Get a file from a repository # noqa: E501 + """ + pass + + def test_repo_get_raw_file_or_lfs(self): + """Test case for repo_get_raw_file_or_lfs + + Get a file or it's LFS object from a repository # noqa: E501 + """ + pass + + def test_repo_get_release(self): + """Test case for repo_get_release + + Get a release # noqa: E501 + """ + pass + + def test_repo_get_release_attachment(self): + """Test case for repo_get_release_attachment + + Get a release attachment # noqa: E501 + """ + pass + + def test_repo_get_release_by_tag(self): + """Test case for repo_get_release_by_tag + + Get a release by tag name # noqa: E501 + """ + pass + + def test_repo_get_repo_permissions(self): + """Test case for repo_get_repo_permissions + + Get repository permissions for a user # noqa: E501 + """ + pass + + def test_repo_get_reviewers(self): + """Test case for repo_get_reviewers + + Return all users that can be requested to review in this repo # noqa: E501 + """ + pass + + def test_repo_get_runner_registration_token(self): + """Test case for repo_get_runner_registration_token + + Get a repository's actions runner registration token # noqa: E501 + """ + pass + + def test_repo_get_single_commit(self): + """Test case for repo_get_single_commit + + Get a single commit from a repository # noqa: E501 + """ + pass + + def test_repo_get_tag(self): + """Test case for repo_get_tag + + Get the tag of a repository by tag name # noqa: E501 + """ + pass + + def test_repo_get_tag_protection(self): + """Test case for repo_get_tag_protection + + Get a specific tag protection for the repository # noqa: E501 + """ + pass + + def test_repo_get_wiki_page(self): + """Test case for repo_get_wiki_page + + Get a wiki page # noqa: E501 + """ + pass + + def test_repo_get_wiki_page_revisions(self): + """Test case for repo_get_wiki_page_revisions + + Get revisions of a wiki page # noqa: E501 + """ + pass + + def test_repo_get_wiki_pages(self): + """Test case for repo_get_wiki_pages + + Get all wiki pages # noqa: E501 + """ + pass + + def test_repo_list_actions_secrets(self): + """Test case for repo_list_actions_secrets + + List an repo's actions secrets # noqa: E501 + """ + pass + + def test_repo_list_activity_feeds(self): + """Test case for repo_list_activity_feeds + + List a repository's activity feeds # noqa: E501 + """ + pass + + def test_repo_list_all_git_refs(self): + """Test case for repo_list_all_git_refs + + Get specified ref or filtered repository's refs # noqa: E501 + """ + pass + + def test_repo_list_branch_protection(self): + """Test case for repo_list_branch_protection + + List branch protections for a repository # noqa: E501 + """ + pass + + def test_repo_list_branches(self): + """Test case for repo_list_branches + + List a repository's branches # noqa: E501 + """ + pass + + def test_repo_list_collaborators(self): + """Test case for repo_list_collaborators + + List a repository's collaborators # noqa: E501 + """ + pass + + def test_repo_list_git_hooks(self): + """Test case for repo_list_git_hooks + + List the Git hooks in a repository # noqa: E501 + """ + pass + + def test_repo_list_git_refs(self): + """Test case for repo_list_git_refs + + Get specified ref or filtered repository's refs # noqa: E501 + """ + pass + + def test_repo_list_hooks(self): + """Test case for repo_list_hooks + + List the hooks in a repository # noqa: E501 + """ + pass + + def test_repo_list_keys(self): + """Test case for repo_list_keys + + List a repository's keys # noqa: E501 + """ + pass + + def test_repo_list_pinned_issues(self): + """Test case for repo_list_pinned_issues + + List a repo's pinned issues # noqa: E501 + """ + pass + + def test_repo_list_pinned_pull_requests(self): + """Test case for repo_list_pinned_pull_requests + + List a repo's pinned pull requests # noqa: E501 + """ + pass + + def test_repo_list_pull_requests(self): + """Test case for repo_list_pull_requests + + List a repo's pull requests # noqa: E501 + """ + pass + + def test_repo_list_pull_reviews(self): + """Test case for repo_list_pull_reviews + + List all reviews for a pull request # noqa: E501 + """ + pass + + def test_repo_list_push_mirrors(self): + """Test case for repo_list_push_mirrors + + Get all push mirrors of the repository # noqa: E501 + """ + pass + + def test_repo_list_release_attachments(self): + """Test case for repo_list_release_attachments + + List release's attachments # noqa: E501 + """ + pass + + def test_repo_list_releases(self): + """Test case for repo_list_releases + + List a repo's releases # noqa: E501 + """ + pass + + def test_repo_list_stargazers(self): + """Test case for repo_list_stargazers + + List a repo's stargazers # noqa: E501 + """ + pass + + def test_repo_list_statuses(self): + """Test case for repo_list_statuses + + Get a commit's statuses # noqa: E501 + """ + pass + + def test_repo_list_statuses_by_ref(self): + """Test case for repo_list_statuses_by_ref + + Get a commit's statuses, by branch/tag/commit reference # noqa: E501 + """ + pass + + def test_repo_list_subscribers(self): + """Test case for repo_list_subscribers + + List a repo's watchers # noqa: E501 + """ + pass + + def test_repo_list_tag_protection(self): + """Test case for repo_list_tag_protection + + List tag protections for a repository # noqa: E501 + """ + pass + + def test_repo_list_tags(self): + """Test case for repo_list_tags + + List a repository's tags # noqa: E501 + """ + pass + + def test_repo_list_teams(self): + """Test case for repo_list_teams + + List a repository's teams # noqa: E501 + """ + pass + + def test_repo_list_topics(self): + """Test case for repo_list_topics + + Get list of topics that a repository has # noqa: E501 + """ + pass + + def test_repo_merge_pull_request(self): + """Test case for repo_merge_pull_request + + Merge a pull request # noqa: E501 + """ + pass + + def test_repo_merge_upstream(self): + """Test case for repo_merge_upstream + + Merge a branch from upstream # noqa: E501 + """ + pass + + def test_repo_migrate(self): + """Test case for repo_migrate + + Migrate a remote git repository # noqa: E501 + """ + pass + + def test_repo_mirror_sync(self): + """Test case for repo_mirror_sync + + Sync a mirrored repository # noqa: E501 + """ + pass + + def test_repo_new_pin_allowed(self): + """Test case for repo_new_pin_allowed + + Returns if new Issue Pins are allowed # noqa: E501 + """ + pass + + def test_repo_pull_request_is_merged(self): + """Test case for repo_pull_request_is_merged + + Check if a pull request has been merged # noqa: E501 + """ + pass + + def test_repo_push_mirror_sync(self): + """Test case for repo_push_mirror_sync + + Sync all push mirrored repository # noqa: E501 + """ + pass + + def test_repo_rename_branch(self): + """Test case for repo_rename_branch + + Rename a branch # noqa: E501 + """ + pass + + def test_repo_search(self): + """Test case for repo_search + + Search for repositories # noqa: E501 + """ + pass + + def test_repo_signing_key(self): + """Test case for repo_signing_key + + Get signing-key.gpg for given repository # noqa: E501 + """ + pass + + def test_repo_signing_key_ssh(self): + """Test case for repo_signing_key_ssh + + Get signing-key.pub for given repository # noqa: E501 + """ + pass + + def test_repo_submit_pull_review(self): + """Test case for repo_submit_pull_review + + Submit a pending review to an pull request # noqa: E501 + """ + pass + + def test_repo_test_hook(self): + """Test case for repo_test_hook + + Test a push webhook # noqa: E501 + """ + pass + + def test_repo_tracked_times(self): + """Test case for repo_tracked_times + + List a repo's tracked times # noqa: E501 + """ + pass + + def test_repo_transfer(self): + """Test case for repo_transfer + + Transfer a repo ownership # noqa: E501 + """ + pass + + def test_repo_un_dismiss_pull_review(self): + """Test case for repo_un_dismiss_pull_review + + Cancel to dismiss a review for a pull request # noqa: E501 + """ + pass + + def test_repo_update_avatar(self): + """Test case for repo_update_avatar + + Update avatar # noqa: E501 + """ + pass + + def test_repo_update_branch_protection_priories(self): + """Test case for repo_update_branch_protection_priories + + Update the priorities of branch protections for a repository. # noqa: E501 + """ + pass + + def test_repo_update_file(self): + """Test case for repo_update_file + + Update a file in a repository # noqa: E501 + """ + pass + + def test_repo_update_pull_request(self): + """Test case for repo_update_pull_request + + Merge PR's baseBranch into headBranch # noqa: E501 + """ + pass + + def test_repo_update_topics(self): + """Test case for repo_update_topics + + Replace list of topics for a repository # noqa: E501 + """ + pass + + def test_repo_validate_issue_config(self): + """Test case for repo_validate_issue_config + + Returns the validation information for a issue config # noqa: E501 + """ + pass + + def test_topic_search(self): + """Test case for topic_search + + search topics via keyword # noqa: E501 + """ + pass + + def test_update_repo_secret(self): + """Test case for update_repo_secret + + Create or Update a secret value in a repository # noqa: E501 + """ + pass + + def test_update_repo_variable(self): + """Test case for update_repo_variable + + Update a repo-level variable # noqa: E501 + """ + pass + + def test_user_current_check_subscription(self): + """Test case for user_current_check_subscription + + Check if the current user is watching a repo # noqa: E501 + """ + pass + + def test_user_current_delete_subscription(self): + """Test case for user_current_delete_subscription + + Unwatch a repo # noqa: E501 + """ + pass + + def test_user_current_put_subscription(self): + """Test case for user_current_put_subscription + + Watch a repo # noqa: E501 + """ + pass + + def test_user_tracked_times(self): + """Test case for user_tracked_times + + List a user's tracked times in a repo # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repository_meta.py b/test/test_repository_meta.py new file mode 100644 index 0000000..e2e78f4 --- /dev/null +++ b/test/test_repository_meta.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.repository_meta import RepositoryMeta # noqa: E501 +from swagger_client.rest import ApiException + + +class TestRepositoryMeta(unittest.TestCase): + """RepositoryMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepositoryMeta(self): + """Test RepositoryMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.repository_meta.RepositoryMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_review_state_type.py b/test/test_review_state_type.py new file mode 100644 index 0000000..61b141c --- /dev/null +++ b/test/test_review_state_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.review_state_type import ReviewStateType # noqa: E501 +from swagger_client.rest import ApiException + + +class TestReviewStateType(unittest.TestCase): + """ReviewStateType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReviewStateType(self): + """Test ReviewStateType""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.review_state_type.ReviewStateType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_results.py b/test/test_search_results.py new file mode 100644 index 0000000..550dcb6 --- /dev/null +++ b/test/test_search_results.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.search_results import SearchResults # noqa: E501 +from swagger_client.rest import ApiException + + +class TestSearchResults(unittest.TestCase): + """SearchResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSearchResults(self): + """Test SearchResults""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.search_results.SearchResults() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_secret.py b/test/test_secret.py new file mode 100644 index 0000000..6e37b8e --- /dev/null +++ b/test/test_secret.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.secret import Secret # noqa: E501 +from swagger_client.rest import ApiException + + +class TestSecret(unittest.TestCase): + """Secret unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSecret(self): + """Test Secret""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.secret.Secret() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_server_version.py b/test/test_server_version.py new file mode 100644 index 0000000..7bfaff7 --- /dev/null +++ b/test/test_server_version.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.server_version import ServerVersion # noqa: E501 +from swagger_client.rest import ApiException + + +class TestServerVersion(unittest.TestCase): + """ServerVersion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testServerVersion(self): + """Test ServerVersion""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.server_version.ServerVersion() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_settings_api.py b/test/test_settings_api.py new file mode 100644 index 0000000..9b30a58 --- /dev/null +++ b/test/test_settings_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.settings_api import SettingsApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestSettingsApi(unittest.TestCase): + """SettingsApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.settings_api.SettingsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_general_api_settings(self): + """Test case for get_general_api_settings + + Get instance's global settings for api # noqa: E501 + """ + pass + + def test_get_general_attachment_settings(self): + """Test case for get_general_attachment_settings + + Get instance's global settings for Attachment # noqa: E501 + """ + pass + + def test_get_general_repository_settings(self): + """Test case for get_general_repository_settings + + Get instance's global settings for repositories # noqa: E501 + """ + pass + + def test_get_general_ui_settings(self): + """Test case for get_general_ui_settings + + Get instance's global settings for ui # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_state_type.py b/test/test_state_type.py new file mode 100644 index 0000000..e1980f7 --- /dev/null +++ b/test/test_state_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.state_type import StateType # noqa: E501 +from swagger_client.rest import ApiException + + +class TestStateType(unittest.TestCase): + """StateType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStateType(self): + """Test StateType""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.state_type.StateType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stop_watch.py b/test/test_stop_watch.py new file mode 100644 index 0000000..4148b60 --- /dev/null +++ b/test/test_stop_watch.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.stop_watch import StopWatch # noqa: E501 +from swagger_client.rest import ApiException + + +class TestStopWatch(unittest.TestCase): + """StopWatch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStopWatch(self): + """Test StopWatch""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.stop_watch.StopWatch() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_submit_pull_review_options.py b/test/test_submit_pull_review_options.py new file mode 100644 index 0000000..f1b5b5e --- /dev/null +++ b/test/test_submit_pull_review_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.submit_pull_review_options import SubmitPullReviewOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestSubmitPullReviewOptions(unittest.TestCase): + """SubmitPullReviewOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSubmitPullReviewOptions(self): + """Test SubmitPullReviewOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.submit_pull_review_options.SubmitPullReviewOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tag.py b/test/test_tag.py new file mode 100644 index 0000000..3bbdfab --- /dev/null +++ b/test/test_tag.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.tag import Tag # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTag(unittest.TestCase): + """Tag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTag(self): + """Test Tag""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.tag.Tag() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tag_protection.py b/test/test_tag_protection.py new file mode 100644 index 0000000..04e3d12 --- /dev/null +++ b/test/test_tag_protection.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.tag_protection import TagProtection # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTagProtection(unittest.TestCase): + """TagProtection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTagProtection(self): + """Test TagProtection""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.tag_protection.TagProtection() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team.py b/test/test_team.py new file mode 100644 index 0000000..070137d --- /dev/null +++ b/test/test_team.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.team import Team # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTeam(unittest.TestCase): + """Team unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTeam(self): + """Test Team""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.team.Team() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_time_stamp.py b/test/test_time_stamp.py new file mode 100644 index 0000000..acd5044 --- /dev/null +++ b/test/test_time_stamp.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.time_stamp import TimeStamp # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTimeStamp(unittest.TestCase): + """TimeStamp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTimeStamp(self): + """Test TimeStamp""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.time_stamp.TimeStamp() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_timeline_comment.py b/test/test_timeline_comment.py new file mode 100644 index 0000000..90947f0 --- /dev/null +++ b/test/test_timeline_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.timeline_comment import TimelineComment # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTimelineComment(unittest.TestCase): + """TimelineComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTimelineComment(self): + """Test TimelineComment""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.timeline_comment.TimelineComment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_topic_name.py b/test/test_topic_name.py new file mode 100644 index 0000000..bf4e664 --- /dev/null +++ b/test/test_topic_name.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.topic_name import TopicName # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTopicName(unittest.TestCase): + """TopicName unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTopicName(self): + """Test TopicName""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.topic_name.TopicName() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_topic_response.py b/test/test_topic_response.py new file mode 100644 index 0000000..f093e62 --- /dev/null +++ b/test/test_topic_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.topic_response import TopicResponse # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTopicResponse(unittest.TestCase): + """TopicResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTopicResponse(self): + """Test TopicResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.topic_response.TopicResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tracked_time.py b/test/test_tracked_time.py new file mode 100644 index 0000000..97a7b8f --- /dev/null +++ b/test/test_tracked_time.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.tracked_time import TrackedTime # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTrackedTime(unittest.TestCase): + """TrackedTime unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTrackedTime(self): + """Test TrackedTime""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.tracked_time.TrackedTime() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_transfer_repo_option.py b/test/test_transfer_repo_option.py new file mode 100644 index 0000000..ffc0ab1 --- /dev/null +++ b/test/test_transfer_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.transfer_repo_option import TransferRepoOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestTransferRepoOption(unittest.TestCase): + """TransferRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransferRepoOption(self): + """Test TransferRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.transfer_repo_option.TransferRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_branch_protection_priories.py b/test/test_update_branch_protection_priories.py new file mode 100644 index 0000000..f8534ec --- /dev/null +++ b/test/test_update_branch_protection_priories.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.update_branch_protection_priories import UpdateBranchProtectionPriories # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUpdateBranchProtectionPriories(unittest.TestCase): + """UpdateBranchProtectionPriories unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateBranchProtectionPriories(self): + """Test UpdateBranchProtectionPriories""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.update_branch_protection_priories.UpdateBranchProtectionPriories() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_file_options.py b/test/test_update_file_options.py new file mode 100644 index 0000000..d4ad3e0 --- /dev/null +++ b/test/test_update_file_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.update_file_options import UpdateFileOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUpdateFileOptions(unittest.TestCase): + """UpdateFileOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateFileOptions(self): + """Test UpdateFileOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.update_file_options.UpdateFileOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_repo_avatar_option.py b/test/test_update_repo_avatar_option.py new file mode 100644 index 0000000..36e236e --- /dev/null +++ b/test/test_update_repo_avatar_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.update_repo_avatar_option import UpdateRepoAvatarOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUpdateRepoAvatarOption(unittest.TestCase): + """UpdateRepoAvatarOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateRepoAvatarOption(self): + """Test UpdateRepoAvatarOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.update_repo_avatar_option.UpdateRepoAvatarOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_user_avatar_option.py b/test/test_update_user_avatar_option.py new file mode 100644 index 0000000..4fadf4c --- /dev/null +++ b/test/test_update_user_avatar_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.update_user_avatar_option import UpdateUserAvatarOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUpdateUserAvatarOption(unittest.TestCase): + """UpdateUserAvatarOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateUserAvatarOption(self): + """Test UpdateUserAvatarOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.update_user_avatar_option.UpdateUserAvatarOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_variable_option.py b/test/test_update_variable_option.py new file mode 100644 index 0000000..c83e7df --- /dev/null +++ b/test/test_update_variable_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.update_variable_option import UpdateVariableOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUpdateVariableOption(unittest.TestCase): + """UpdateVariableOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUpdateVariableOption(self): + """Test UpdateVariableOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.update_variable_option.UpdateVariableOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user.py b/test/test_user.py new file mode 100644 index 0000000..2a09597 --- /dev/null +++ b/test/test_user.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.user import User # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUser(unittest.TestCase): + """User unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUser(self): + """Test User""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.user.User() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_api.py b/test/test_user_api.py new file mode 100644 index 0000000..9454783 --- /dev/null +++ b/test/test_user_api.py @@ -0,0 +1,566 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.user_api import UserApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUserApi(unittest.TestCase): + """UserApi unit test stubs""" + + def setUp(self): + self.api = swagger_client.api.user_api.UserApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_current_user_repo(self): + """Test case for create_current_user_repo + + Create a repository # noqa: E501 + """ + pass + + def test_create_user_variable(self): + """Test case for create_user_variable + + Create a user-level variable # noqa: E501 + """ + pass + + def test_delete_user_runner(self): + """Test case for delete_user_runner + + Delete an user-level runner # noqa: E501 + """ + pass + + def test_delete_user_secret(self): + """Test case for delete_user_secret + + Delete a secret in a user scope # noqa: E501 + """ + pass + + def test_delete_user_variable(self): + """Test case for delete_user_variable + + Delete a user-level variable which is created by current doer # noqa: E501 + """ + pass + + def test_get_user_runner(self): + """Test case for get_user_runner + + Get an user-level runner # noqa: E501 + """ + pass + + def test_get_user_runners(self): + """Test case for get_user_runners + + Get user-level runners # noqa: E501 + """ + pass + + def test_get_user_settings(self): + """Test case for get_user_settings + + Get user settings # noqa: E501 + """ + pass + + def test_get_user_variable(self): + """Test case for get_user_variable + + Get a user-level variable which is created by current doer # noqa: E501 + """ + pass + + def test_get_user_variables_list(self): + """Test case for get_user_variables_list + + Get the user-level list of variables which is created by current doer # noqa: E501 + """ + pass + + def test_get_user_workflow_jobs(self): + """Test case for get_user_workflow_jobs + + Get workflow jobs # noqa: E501 + """ + pass + + def test_get_user_workflow_runs(self): + """Test case for get_user_workflow_runs + + Get workflow runs # noqa: E501 + """ + pass + + def test_get_verification_token(self): + """Test case for get_verification_token + + Get a Token to verify # noqa: E501 + """ + pass + + def test_update_user_secret(self): + """Test case for update_user_secret + + Create or Update a secret value in a user scope # noqa: E501 + """ + pass + + def test_update_user_settings(self): + """Test case for update_user_settings + + Update user settings # noqa: E501 + """ + pass + + def test_update_user_variable(self): + """Test case for update_user_variable + + Update a user-level variable which is created by current doer # noqa: E501 + """ + pass + + def test_user_add_email(self): + """Test case for user_add_email + + Add email addresses # noqa: E501 + """ + pass + + def test_user_block_user(self): + """Test case for user_block_user + + Block a user # noqa: E501 + """ + pass + + def test_user_check_following(self): + """Test case for user_check_following + + Check if one user is following another user # noqa: E501 + """ + pass + + def test_user_check_user_block(self): + """Test case for user_check_user_block + + Check if a user is blocked by the authenticated user # noqa: E501 + """ + pass + + def test_user_create_hook(self): + """Test case for user_create_hook + + Create a hook # noqa: E501 + """ + pass + + def test_user_create_o_auth2_application(self): + """Test case for user_create_o_auth2_application + + creates a new OAuth2 application # noqa: E501 + """ + pass + + def test_user_create_runner_registration_token(self): + """Test case for user_create_runner_registration_token + + Get an user's actions runner registration token # noqa: E501 + """ + pass + + def test_user_create_token(self): + """Test case for user_create_token + + Create an access token # noqa: E501 + """ + pass + + def test_user_current_check_following(self): + """Test case for user_current_check_following + + Check whether a user is followed by the authenticated user # noqa: E501 + """ + pass + + def test_user_current_check_starring(self): + """Test case for user_current_check_starring + + Whether the authenticated is starring the repo # noqa: E501 + """ + pass + + def test_user_current_delete_follow(self): + """Test case for user_current_delete_follow + + Unfollow a user # noqa: E501 + """ + pass + + def test_user_current_delete_gpg_key(self): + """Test case for user_current_delete_gpg_key + + Remove a GPG key # noqa: E501 + """ + pass + + def test_user_current_delete_key(self): + """Test case for user_current_delete_key + + Delete a public key # noqa: E501 + """ + pass + + def test_user_current_delete_star(self): + """Test case for user_current_delete_star + + Unstar the given repo # noqa: E501 + """ + pass + + def test_user_current_get_gpg_key(self): + """Test case for user_current_get_gpg_key + + Get a GPG key # noqa: E501 + """ + pass + + def test_user_current_get_key(self): + """Test case for user_current_get_key + + Get a public key # noqa: E501 + """ + pass + + def test_user_current_list_followers(self): + """Test case for user_current_list_followers + + List the authenticated user's followers # noqa: E501 + """ + pass + + def test_user_current_list_following(self): + """Test case for user_current_list_following + + List the users that the authenticated user is following # noqa: E501 + """ + pass + + def test_user_current_list_gpg_keys(self): + """Test case for user_current_list_gpg_keys + + List the authenticated user's GPG keys # noqa: E501 + """ + pass + + def test_user_current_list_keys(self): + """Test case for user_current_list_keys + + List the authenticated user's public keys # noqa: E501 + """ + pass + + def test_user_current_list_repos(self): + """Test case for user_current_list_repos + + List the repos that the authenticated user owns # noqa: E501 + """ + pass + + def test_user_current_list_starred(self): + """Test case for user_current_list_starred + + The repos that the authenticated user has starred # noqa: E501 + """ + pass + + def test_user_current_list_subscriptions(self): + """Test case for user_current_list_subscriptions + + List repositories watched by the authenticated user # noqa: E501 + """ + pass + + def test_user_current_post_gpg_key(self): + """Test case for user_current_post_gpg_key + + Create a GPG key # noqa: E501 + """ + pass + + def test_user_current_post_key(self): + """Test case for user_current_post_key + + Create a public key # noqa: E501 + """ + pass + + def test_user_current_put_follow(self): + """Test case for user_current_put_follow + + Follow a user # noqa: E501 + """ + pass + + def test_user_current_put_star(self): + """Test case for user_current_put_star + + Star the given repo # noqa: E501 + """ + pass + + def test_user_current_tracked_times(self): + """Test case for user_current_tracked_times + + List the current user's tracked times # noqa: E501 + """ + pass + + def test_user_delete_access_token(self): + """Test case for user_delete_access_token + + delete an access token # noqa: E501 + """ + pass + + def test_user_delete_avatar(self): + """Test case for user_delete_avatar + + Delete Avatar # noqa: E501 + """ + pass + + def test_user_delete_email(self): + """Test case for user_delete_email + + Delete email addresses # noqa: E501 + """ + pass + + def test_user_delete_hook(self): + """Test case for user_delete_hook + + Delete a hook # noqa: E501 + """ + pass + + def test_user_delete_o_auth2_application(self): + """Test case for user_delete_o_auth2_application + + delete an OAuth2 Application # noqa: E501 + """ + pass + + def test_user_edit_hook(self): + """Test case for user_edit_hook + + Update a hook # noqa: E501 + """ + pass + + def test_user_get(self): + """Test case for user_get + + Get a user # noqa: E501 + """ + pass + + def test_user_get_current(self): + """Test case for user_get_current + + Get the authenticated user # noqa: E501 + """ + pass + + def test_user_get_heatmap_data(self): + """Test case for user_get_heatmap_data + + Get a user's heatmap # noqa: E501 + """ + pass + + def test_user_get_hook(self): + """Test case for user_get_hook + + Get a hook # noqa: E501 + """ + pass + + def test_user_get_o_auth2_application(self): + """Test case for user_get_o_auth2_application + + get an OAuth2 Application # noqa: E501 + """ + pass + + def test_user_get_oauth2_application(self): + """Test case for user_get_oauth2_application + + List the authenticated user's oauth2 applications # noqa: E501 + """ + pass + + def test_user_get_runner_registration_token(self): + """Test case for user_get_runner_registration_token + + Get an user's actions runner registration token # noqa: E501 + """ + pass + + def test_user_get_stop_watches(self): + """Test case for user_get_stop_watches + + Get list of all existing stopwatches # noqa: E501 + """ + pass + + def test_user_get_tokens(self): + """Test case for user_get_tokens + + List the authenticated user's access tokens # noqa: E501 + """ + pass + + def test_user_list_activity_feeds(self): + """Test case for user_list_activity_feeds + + List a user's activity feeds # noqa: E501 + """ + pass + + def test_user_list_blocks(self): + """Test case for user_list_blocks + + List users blocked by the authenticated user # noqa: E501 + """ + pass + + def test_user_list_emails(self): + """Test case for user_list_emails + + List the authenticated user's email addresses # noqa: E501 + """ + pass + + def test_user_list_followers(self): + """Test case for user_list_followers + + List the given user's followers # noqa: E501 + """ + pass + + def test_user_list_following(self): + """Test case for user_list_following + + List the users that the given user is following # noqa: E501 + """ + pass + + def test_user_list_gpg_keys(self): + """Test case for user_list_gpg_keys + + List the given user's GPG keys # noqa: E501 + """ + pass + + def test_user_list_hooks(self): + """Test case for user_list_hooks + + List the authenticated user's webhooks # noqa: E501 + """ + pass + + def test_user_list_keys(self): + """Test case for user_list_keys + + List the given user's public keys # noqa: E501 + """ + pass + + def test_user_list_repos(self): + """Test case for user_list_repos + + List the repos owned by the given user # noqa: E501 + """ + pass + + def test_user_list_starred(self): + """Test case for user_list_starred + + The repos that the given user has starred # noqa: E501 + """ + pass + + def test_user_list_subscriptions(self): + """Test case for user_list_subscriptions + + List the repositories watched by a user # noqa: E501 + """ + pass + + def test_user_list_teams(self): + """Test case for user_list_teams + + List all the teams a user belongs to # noqa: E501 + """ + pass + + def test_user_search(self): + """Test case for user_search + + Search for users # noqa: E501 + """ + pass + + def test_user_unblock_user(self): + """Test case for user_unblock_user + + Unblock a user # noqa: E501 + """ + pass + + def test_user_update_avatar(self): + """Test case for user_update_avatar + + Update Avatar # noqa: E501 + """ + pass + + def test_user_update_o_auth2_application(self): + """Test case for user_update_o_auth2_application + + update an OAuth2 Application, this includes regenerating the client secret # noqa: E501 + """ + pass + + def test_user_verify_gpg_key(self): + """Test case for user_verify_gpg_key + + Verify a GPG key # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_badge_option.py b/test/test_user_badge_option.py new file mode 100644 index 0000000..58721e6 --- /dev/null +++ b/test/test_user_badge_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.user_badge_option import UserBadgeOption # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUserBadgeOption(unittest.TestCase): + """UserBadgeOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserBadgeOption(self): + """Test UserBadgeOption""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.user_badge_option.UserBadgeOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_heatmap_data.py b/test/test_user_heatmap_data.py new file mode 100644 index 0000000..a4bdad5 --- /dev/null +++ b/test/test_user_heatmap_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.user_heatmap_data import UserHeatmapData # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUserHeatmapData(unittest.TestCase): + """UserHeatmapData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserHeatmapData(self): + """Test UserHeatmapData""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.user_heatmap_data.UserHeatmapData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_settings.py b/test/test_user_settings.py new file mode 100644 index 0000000..82f54d1 --- /dev/null +++ b/test/test_user_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.user_settings import UserSettings # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUserSettings(unittest.TestCase): + """UserSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserSettings(self): + """Test UserSettings""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.user_settings.UserSettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_settings_options.py b/test/test_user_settings_options.py new file mode 100644 index 0000000..6887c79 --- /dev/null +++ b/test/test_user_settings_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.user_settings_options import UserSettingsOptions # noqa: E501 +from swagger_client.rest import ApiException + + +class TestUserSettingsOptions(unittest.TestCase): + """UserSettingsOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserSettingsOptions(self): + """Test UserSettingsOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.user_settings_options.UserSettingsOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_watch_info.py b/test/test_watch_info.py new file mode 100644 index 0000000..8bb6df8 --- /dev/null +++ b/test/test_watch_info.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.watch_info import WatchInfo # noqa: E501 +from swagger_client.rest import ApiException + + +class TestWatchInfo(unittest.TestCase): + """WatchInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWatchInfo(self): + """Test WatchInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.watch_info.WatchInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wiki_commit.py b/test/test_wiki_commit.py new file mode 100644 index 0000000..ee1c269 --- /dev/null +++ b/test/test_wiki_commit.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.wiki_commit import WikiCommit # noqa: E501 +from swagger_client.rest import ApiException + + +class TestWikiCommit(unittest.TestCase): + """WikiCommit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWikiCommit(self): + """Test WikiCommit""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.wiki_commit.WikiCommit() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wiki_commit_list.py b/test/test_wiki_commit_list.py new file mode 100644 index 0000000..8754ff3 --- /dev/null +++ b/test/test_wiki_commit_list.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.wiki_commit_list import WikiCommitList # noqa: E501 +from swagger_client.rest import ApiException + + +class TestWikiCommitList(unittest.TestCase): + """WikiCommitList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWikiCommitList(self): + """Test WikiCommitList""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.wiki_commit_list.WikiCommitList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wiki_page.py b/test/test_wiki_page.py new file mode 100644 index 0000000..f103bc6 --- /dev/null +++ b/test/test_wiki_page.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.wiki_page import WikiPage # noqa: E501 +from swagger_client.rest import ApiException + + +class TestWikiPage(unittest.TestCase): + """WikiPage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWikiPage(self): + """Test WikiPage""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.wiki_page.WikiPage() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wiki_page_meta_data.py b/test/test_wiki_page_meta_data.py new file mode 100644 index 0000000..62aefbf --- /dev/null +++ b/test/test_wiki_page_meta_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.25.2 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.wiki_page_meta_data import WikiPageMetaData # noqa: E501 +from swagger_client.rest import ApiException + + +class TestWikiPageMetaData(unittest.TestCase): + """WikiPageMetaData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWikiPageMetaData(self): + """Test WikiPageMetaData""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.wiki_page_meta_data.WikiPageMetaData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()