This commit is contained in:
dominoxp
2026-01-23 00:30:37 +01:00
commit 8b9fca043a
472 changed files with 124476 additions and 0 deletions

18
PKG-INFO Normal file
View File

@@ -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

847
README.md Normal file
View File

@@ -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

4
setup.cfg Normal file
View File

@@ -0,0 +1,4 @@
[egg_info]
tag_build =
tag_date = 0

46
setup.py Normal file
View File

@@ -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
"""
)

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,4 @@
certifi>=2017.4.17
python-dateutil>=2.1
six>=1.10
urllib3>=1.23

View File

@@ -0,0 +1,2 @@
swagger_client
test

251
swagger_client/__init__.py Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -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)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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)

File diff suppressed because it is too large Load Diff

View File

@@ -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)

File diff suppressed because it is too large Load Diff

View File

@@ -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)

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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 `<username>:<branch>` 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 `<username>:<branch>` 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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

Some files were not shown because too many files have changed in this diff Show More