diff --git a/backend/api/build_kfp_server_api_python_package.sh b/backend/api/build_kfp_server_api_python_package.sh index 44f73c704f1..28bc709c687 100755 --- a/backend/api/build_kfp_server_api_python_package.sh +++ b/backend/api/build_kfp_server_api_python_package.sh @@ -34,30 +34,24 @@ if [ -z "$VERSION" ]; then exit 1 fi -codegen_file=/tmp/swagger-codegen-cli.jar -# Browse all versions in: https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.7/ -codegen_uri=https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.7/swagger-codegen-cli-2.4.7.jar +codegen_file=/tmp/openapi-generator-cli.jar +# Browse all versions in: https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/ +codegen_uri="https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar" if ! [ -f "$codegen_file" ]; then - wget --no-verbose "$codegen_uri" -O "$codegen_file" + curl -L "$codegen_uri" -o "$codegen_file" fi pushd "$(dirname "$0")" -DIR=$(mktemp -d) +DIR="$(pwd)/python_http_client" +swagger_file="$(pwd)/swagger/kfp_api_single_file.swagger.json" -swagger_file=$(mktemp) - -echo "Merging all Swagger API definitions to $swagger_file." -jq -s ' - reduce .[] as $item ({}; . * $item) | - .info.title = "KF Pipelines API" | - .info.description = "Generated python client for the KF Pipelines server API" -' ./swagger/{run,job,pipeline,experiment,pipeline.upload}.swagger.json > "$swagger_file" +echo "Removing old content in DIR first." +rm -rf "$DIR" echo "Generating python code from swagger json in $DIR." -java -jar "$codegen_file" generate -l python -i "$swagger_file" -o "$DIR" -c <(echo '{ +java -jar "$codegen_file" generate -g python -i "$swagger_file" -o "$DIR" -c <(echo '{ "packageName": "kfp_server_api", - "projectName": "kfp-server-api", "packageVersion": "'"$VERSION"'", "packageUrl": "https://github.com/kubeflow/pipelines" }') @@ -71,4 +65,6 @@ echo "Run the following commands to update the package on PyPI" echo "python3 -m pip install twine" echo "python3 -m twine upload --username kubeflow-pipelines $DIR/dist/*" +echo "Please also push local changes to github.com/kubeflow/pipelines" + popd diff --git a/backend/api/generate_api.sh b/backend/api/generate_api.sh index ab131af6866..0916e2ff259 100755 --- a/backend/api/generate_api.sh +++ b/backend/api/generate_api.sh @@ -21,6 +21,7 @@ set -ex +VERSION="1.0.0-dev.1" BAZEL_BINDIR=$(bazel info bazel-bin) DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)" SWAGGER_CMD=${DIR}/../../bazel-bin/external/com_github_go_swagger/cmd/swagger/*stripped/swagger @@ -57,7 +58,9 @@ jq -s ' reduce .[] as $item ({}; . * $item) | .info.title = "Kubeflow Pipelines API" | .info.description = "This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition." | - .info.version = "0.5.1" + .info.version = "'$VERSION'" | + .info.contact = { "name": "google", "email": "kubeflow-pipelines@google.com", "url": "https://www.google.com" } | + .info.license = { "name": "Apache 2.0", "url": "https://raw.githubusercontent.com/kubeflow/pipelines/master/LICENSE" } ' ${DIR}/swagger/{run,job,pipeline,experiment,pipeline.upload}.swagger.json > "${DIR}/swagger/kfp_api_single_file.swagger.json" # Generate Go HTTP client from the swagger files. diff --git a/backend/api/python_http_client/.gitignore b/backend/api/python_http_client/.gitignore new file mode 100644 index 00000000000..43995bd42fa --- /dev/null +++ b/backend/api/python_http_client/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/backend/api/python_http_client/.gitlab-ci.yml b/backend/api/python_http_client/.gitlab-ci.yml new file mode 100644 index 00000000000..1098a4acf21 --- /dev/null +++ b/backend/api/python_http_client/.gitlab-ci.yml @@ -0,0 +1,33 @@ +# ref: https://docs.gitlab.com/ee/ci/README.html + +stages: + - test + +.nosetest: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=kfp_server_api + +nosetest-2.7: + extends: .nosetest + image: python:2.7-alpine +nosetest-3.3: + extends: .nosetest + image: python:3.3-alpine +nosetest-3.4: + extends: .nosetest + image: python:3.4-alpine +nosetest-3.5: + extends: .nosetest + image: python:3.5-alpine +nosetest-3.6: + extends: .nosetest + image: python:3.6-alpine +nosetest-3.7: + extends: .nosetest + image: python:3.7-alpine +nosetest-3.8: + extends: .nosetest + image: python:3.8-alpine diff --git a/backend/api/python_http_client/.openapi-generator-ignore b/backend/api/python_http_client/.openapi-generator-ignore new file mode 100644 index 00000000000..7484ee590a3 --- /dev/null +++ b/backend/api/python_http_client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/backend/api/python_http_client/.openapi-generator/VERSION b/backend/api/python_http_client/.openapi-generator/VERSION new file mode 100644 index 00000000000..ecedc98d1d5 --- /dev/null +++ b/backend/api/python_http_client/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.3.1 \ No newline at end of file diff --git a/backend/api/python_http_client/.travis.yml b/backend/api/python_http_client/.travis.yml new file mode 100644 index 00000000000..7f278fb3d11 --- /dev/null +++ b/backend/api/python_http_client/.travis.yml @@ -0,0 +1,17 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + - "3.6" + - "3.7" + - "3.8" +# command to install dependencies +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" +# command to run tests +script: pytest --cov=kfp_server_api diff --git a/backend/api/python_http_client/README.md b/backend/api/python_http_client/README.md new file mode 100644 index 00000000000..cde089e050d --- /dev/null +++ b/backend/api/python_http_client/README.md @@ -0,0 +1,188 @@ +# kfp-server-api +This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0-dev.1 +- Package version: 1.0.0-dev.1 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen +For more information, please visit [https://www.google.com](https://www.google.com) + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import kfp_server_api +``` + +### 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 kfp_server_api +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function + +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.ExperimentServiceApi(api_client) + id = 'id_example' # str | The ID of the experiment to be archived. + + try: + # Archives an experiment and the experiment's runs and jobs. + api_response = api_instance.archive_experiment(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExperimentServiceApi->archive_experiment: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ExperimentServiceApi* | [**archive_experiment**](docs/ExperimentServiceApi.md#archive_experiment) | **POST** /apis/v1beta1/experiments/{id}:archive | Archives an experiment and the experiment's runs and jobs. +*ExperimentServiceApi* | [**create_experiment**](docs/ExperimentServiceApi.md#create_experiment) | **POST** /apis/v1beta1/experiments | Creates a new experiment. +*ExperimentServiceApi* | [**delete_experiment**](docs/ExperimentServiceApi.md#delete_experiment) | **DELETE** /apis/v1beta1/experiments/{id} | Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment. +*ExperimentServiceApi* | [**get_experiment**](docs/ExperimentServiceApi.md#get_experiment) | **GET** /apis/v1beta1/experiments/{id} | Finds a specific experiment by ID. +*ExperimentServiceApi* | [**list_experiment**](docs/ExperimentServiceApi.md#list_experiment) | **GET** /apis/v1beta1/experiments | Finds all experiments. Supports pagination, and sorting on certain fields. +*ExperimentServiceApi* | [**unarchive_experiment**](docs/ExperimentServiceApi.md#unarchive_experiment) | **POST** /apis/v1beta1/experiments/{id}:unarchive | Restores an archived experiment. The experiment's archived runs and jobs will stay archived. +*JobServiceApi* | [**create_job**](docs/JobServiceApi.md#create_job) | **POST** /apis/v1beta1/jobs | Creates a new job. +*JobServiceApi* | [**delete_job**](docs/JobServiceApi.md#delete_job) | **DELETE** /apis/v1beta1/jobs/{id} | Deletes a job. +*JobServiceApi* | [**disable_job**](docs/JobServiceApi.md#disable_job) | **POST** /apis/v1beta1/jobs/{id}/disable | Stops a job and all its associated runs. The job is not deleted. +*JobServiceApi* | [**enable_job**](docs/JobServiceApi.md#enable_job) | **POST** /apis/v1beta1/jobs/{id}/enable | Restarts a job that was previously stopped. All runs associated with the job will continue. +*JobServiceApi* | [**get_job**](docs/JobServiceApi.md#get_job) | **GET** /apis/v1beta1/jobs/{id} | Finds a specific job by ID. +*JobServiceApi* | [**list_jobs**](docs/JobServiceApi.md#list_jobs) | **GET** /apis/v1beta1/jobs | Finds all jobs. +*PipelineServiceApi* | [**create_pipeline**](docs/PipelineServiceApi.md#create_pipeline) | **POST** /apis/v1beta1/pipelines | Creates a pipeline. +*PipelineServiceApi* | [**create_pipeline_version**](docs/PipelineServiceApi.md#create_pipeline_version) | **POST** /apis/v1beta1/pipeline_versions | Adds a pipeline version to the specified pipeline. +*PipelineServiceApi* | [**delete_pipeline**](docs/PipelineServiceApi.md#delete_pipeline) | **DELETE** /apis/v1beta1/pipelines/{id} | Deletes a pipeline and its pipeline versions. +*PipelineServiceApi* | [**delete_pipeline_version**](docs/PipelineServiceApi.md#delete_pipeline_version) | **DELETE** /apis/v1beta1/pipeline_versions/{version_id} | Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). +*PipelineServiceApi* | [**get_pipeline**](docs/PipelineServiceApi.md#get_pipeline) | **GET** /apis/v1beta1/pipelines/{id} | Finds a specific pipeline by ID. +*PipelineServiceApi* | [**get_pipeline_version**](docs/PipelineServiceApi.md#get_pipeline_version) | **GET** /apis/v1beta1/pipeline_versions/{version_id} | Gets a pipeline version by pipeline version ID. +*PipelineServiceApi* | [**get_pipeline_version_template**](docs/PipelineServiceApi.md#get_pipeline_version_template) | **GET** /apis/v1beta1/pipeline_versions/{version_id}/templates | Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. +*PipelineServiceApi* | [**get_template**](docs/PipelineServiceApi.md#get_template) | **GET** /apis/v1beta1/pipelines/{id}/templates | Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. +*PipelineServiceApi* | [**list_pipeline_versions**](docs/PipelineServiceApi.md#list_pipeline_versions) | **GET** /apis/v1beta1/pipeline_versions | Lists all pipeline versions of a given pipeline. +*PipelineServiceApi* | [**list_pipelines**](docs/PipelineServiceApi.md#list_pipelines) | **GET** /apis/v1beta1/pipelines | Finds all pipelines. +*PipelineUploadServiceApi* | [**upload_pipeline**](docs/PipelineUploadServiceApi.md#upload_pipeline) | **POST** /apis/v1beta1/pipelines/upload | +*PipelineUploadServiceApi* | [**upload_pipeline_version**](docs/PipelineUploadServiceApi.md#upload_pipeline_version) | **POST** /apis/v1beta1/pipelines/upload_version | +*RunServiceApi* | [**archive_run**](docs/RunServiceApi.md#archive_run) | **POST** /apis/v1beta1/runs/{id}:archive | Archives a run. +*RunServiceApi* | [**create_run**](docs/RunServiceApi.md#create_run) | **POST** /apis/v1beta1/runs | Creates a new run. +*RunServiceApi* | [**delete_run**](docs/RunServiceApi.md#delete_run) | **DELETE** /apis/v1beta1/runs/{id} | Deletes a run. +*RunServiceApi* | [**get_run**](docs/RunServiceApi.md#get_run) | **GET** /apis/v1beta1/runs/{run_id} | Finds a specific run by ID. +*RunServiceApi* | [**list_runs**](docs/RunServiceApi.md#list_runs) | **GET** /apis/v1beta1/runs | Finds all runs. +*RunServiceApi* | [**read_artifact**](docs/RunServiceApi.md#read_artifact) | **GET** /apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read | Finds a run's artifact data. +*RunServiceApi* | [**report_run_metrics**](docs/RunServiceApi.md#report_run_metrics) | **POST** /apis/v1beta1/runs/{run_id}:reportMetrics | ReportRunMetrics reports metrics of a run. Each metric is reported in its own transaction, so this API accepts partial failures. Metric can be uniquely identified by (run_id, node_id, name). Duplicate reporting will be ignored by the API. First reporting wins. +*RunServiceApi* | [**retry_run**](docs/RunServiceApi.md#retry_run) | **POST** /apis/v1beta1/runs/{run_id}/retry | Re-initiates a failed or terminated run. +*RunServiceApi* | [**terminate_run**](docs/RunServiceApi.md#terminate_run) | **POST** /apis/v1beta1/runs/{run_id}/terminate | Terminates an active run. +*RunServiceApi* | [**unarchive_run**](docs/RunServiceApi.md#unarchive_run) | **POST** /apis/v1beta1/runs/{id}:unarchive | Restores an archived run. + + +## Documentation For Models + + - [ApiCronSchedule](docs/ApiCronSchedule.md) + - [ApiExperiment](docs/ApiExperiment.md) + - [ApiGetTemplateResponse](docs/ApiGetTemplateResponse.md) + - [ApiJob](docs/ApiJob.md) + - [ApiListExperimentsResponse](docs/ApiListExperimentsResponse.md) + - [ApiListJobsResponse](docs/ApiListJobsResponse.md) + - [ApiListPipelineVersionsResponse](docs/ApiListPipelineVersionsResponse.md) + - [ApiListPipelinesResponse](docs/ApiListPipelinesResponse.md) + - [ApiListRunsResponse](docs/ApiListRunsResponse.md) + - [ApiParameter](docs/ApiParameter.md) + - [ApiPeriodicSchedule](docs/ApiPeriodicSchedule.md) + - [ApiPipeline](docs/ApiPipeline.md) + - [ApiPipelineRuntime](docs/ApiPipelineRuntime.md) + - [ApiPipelineSpec](docs/ApiPipelineSpec.md) + - [ApiPipelineVersion](docs/ApiPipelineVersion.md) + - [ApiReadArtifactResponse](docs/ApiReadArtifactResponse.md) + - [ApiRelationship](docs/ApiRelationship.md) + - [ApiReportRunMetricsRequest](docs/ApiReportRunMetricsRequest.md) + - [ApiReportRunMetricsResponse](docs/ApiReportRunMetricsResponse.md) + - [ApiResourceKey](docs/ApiResourceKey.md) + - [ApiResourceReference](docs/ApiResourceReference.md) + - [ApiResourceType](docs/ApiResourceType.md) + - [ApiRun](docs/ApiRun.md) + - [ApiRunDetail](docs/ApiRunDetail.md) + - [ApiRunMetric](docs/ApiRunMetric.md) + - [ApiStatus](docs/ApiStatus.md) + - [ApiTrigger](docs/ApiTrigger.md) + - [ApiUrl](docs/ApiUrl.md) + - [ExperimentStorageState](docs/ExperimentStorageState.md) + - [JobMode](docs/JobMode.md) + - [ProtobufAny](docs/ProtobufAny.md) + - [ReportRunMetricsResponseReportRunMetricResult](docs/ReportRunMetricsResponseReportRunMetricResult.md) + - [ReportRunMetricsResponseReportRunMetricResultStatus](docs/ReportRunMetricsResponseReportRunMetricResultStatus.md) + - [RunMetricFormat](docs/RunMetricFormat.md) + - [RunStorageState](docs/RunStorageState.md) + + +## Documentation For Authorization + + +## Bearer + +- **Type**: API key +- **API key parameter name**: authorization +- **Location**: HTTP header + + +## Author + +kubeflow-pipelines@google.com + + diff --git a/backend/api/python_http_client/docs/ApiCronSchedule.md b/backend/api/python_http_client/docs/ApiCronSchedule.md new file mode 100644 index 00000000000..140139b4784 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiCronSchedule.md @@ -0,0 +1,12 @@ +# ApiCronSchedule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_time** | **datetime** | | [optional] +**end_time** | **datetime** | | [optional] +**cron** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiExperiment.md b/backend/api/python_http_client/docs/ApiExperiment.md new file mode 100644 index 00000000000..c481c73cc66 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiExperiment.md @@ -0,0 +1,15 @@ +# ApiExperiment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Output. Unique experiment ID. Generated by API server. | [optional] +**name** | **str** | Required input field. Unique experiment name provided by user. | [optional] +**description** | **str** | | [optional] +**created_at** | **datetime** | Output. The time that the experiment created. | [optional] +**resource_references** | [**list[ApiResourceReference]**](ApiResourceReference.md) | Optional input field. Specify which resource this run belongs to. For Experiment, the only valid resource reference is a single Namespace. | [optional] +**storage_state** | [**ExperimentStorageState**](ExperimentStorageState.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiGetTemplateResponse.md b/backend/api/python_http_client/docs/ApiGetTemplateResponse.md new file mode 100644 index 00000000000..478c48166c5 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiGetTemplateResponse.md @@ -0,0 +1,10 @@ +# ApiGetTemplateResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**template** | **str** | The template of the pipeline specified in a GetTemplate request, or of a pipeline version specified in a GetPipelinesVersionTemplate request. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiJob.md b/backend/api/python_http_client/docs/ApiJob.md new file mode 100644 index 00000000000..6f4b0cbd488 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiJob.md @@ -0,0 +1,24 @@ +# ApiJob + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Output. Unique run ID. Generated by API server. | [optional] +**name** | **str** | Required input field. Job name provided by user. Not unique. | [optional] +**description** | **str** | | [optional] +**pipeline_spec** | [**ApiPipelineSpec**](ApiPipelineSpec.md) | | [optional] +**resource_references** | [**list[ApiResourceReference]**](ApiResourceReference.md) | Optional input field. Specify which resource this job belongs to. | [optional] +**service_account** | **str** | Optional input field. Specify which Kubernetes service account this job uses. | [optional] +**max_concurrency** | **str** | | [optional] +**trigger** | [**ApiTrigger**](ApiTrigger.md) | | [optional] +**mode** | [**JobMode**](JobMode.md) | | [optional] +**created_at** | **datetime** | Output. The time this job is created. | [optional] +**updated_at** | **datetime** | Output. The last time this job is updated. | [optional] +**status** | **str** | | [optional] +**error** | **str** | In case any error happens retrieving a job field, only job ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call. | [optional] +**enabled** | **bool** | Input. Whether the job is enabled or not. | [optional] +**no_catchup** | **bool** | Optional input field. Whether the job should catch up if behind schedule. If true, the job will only schedule the latest interval if behind schedule. If false, the job will catch up on each past interval. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiListExperimentsResponse.md b/backend/api/python_http_client/docs/ApiListExperimentsResponse.md new file mode 100644 index 00000000000..0f6529e36c6 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiListExperimentsResponse.md @@ -0,0 +1,12 @@ +# ApiListExperimentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**experiments** | [**list[ApiExperiment]**](ApiExperiment.md) | A list of experiments returned. | [optional] +**total_size** | **int** | The total number of experiments for the given query. | [optional] +**next_page_token** | **str** | The token to list the next page of experiments. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiListJobsResponse.md b/backend/api/python_http_client/docs/ApiListJobsResponse.md new file mode 100644 index 00000000000..8a94f7cc046 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiListJobsResponse.md @@ -0,0 +1,12 @@ +# ApiListJobsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**jobs** | [**list[ApiJob]**](ApiJob.md) | A list of jobs returned. | [optional] +**total_size** | **int** | The total number of jobs for the given query. | [optional] +**next_page_token** | **str** | The token to list the next page of jobs. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiListPipelineVersionsResponse.md b/backend/api/python_http_client/docs/ApiListPipelineVersionsResponse.md new file mode 100644 index 00000000000..9ab2eacb2e3 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiListPipelineVersionsResponse.md @@ -0,0 +1,12 @@ +# ApiListPipelineVersionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**versions** | [**list[ApiPipelineVersion]**](ApiPipelineVersion.md) | | [optional] +**next_page_token** | **str** | The token to list the next page of pipeline versions. | [optional] +**total_size** | **int** | The total number of pipeline versions for the given query. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiListPipelinesResponse.md b/backend/api/python_http_client/docs/ApiListPipelinesResponse.md new file mode 100644 index 00000000000..cb9d319b7ce --- /dev/null +++ b/backend/api/python_http_client/docs/ApiListPipelinesResponse.md @@ -0,0 +1,12 @@ +# ApiListPipelinesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pipelines** | [**list[ApiPipeline]**](ApiPipeline.md) | | [optional] +**total_size** | **int** | The total number of pipelines for the given query. | [optional] +**next_page_token** | **str** | The token to list the next page of pipelines. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiListRunsResponse.md b/backend/api/python_http_client/docs/ApiListRunsResponse.md new file mode 100644 index 00000000000..4b93b22d17d --- /dev/null +++ b/backend/api/python_http_client/docs/ApiListRunsResponse.md @@ -0,0 +1,12 @@ +# ApiListRunsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**runs** | [**list[ApiRun]**](ApiRun.md) | | [optional] +**total_size** | **int** | The total number of runs for the given query. | [optional] +**next_page_token** | **str** | The token to list the next page of runs. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiParameter.md b/backend/api/python_http_client/docs/ApiParameter.md new file mode 100644 index 00000000000..c13ddecead6 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiParameter.md @@ -0,0 +1,11 @@ +# ApiParameter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**value** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiPeriodicSchedule.md b/backend/api/python_http_client/docs/ApiPeriodicSchedule.md new file mode 100644 index 00000000000..0c382cbd87c --- /dev/null +++ b/backend/api/python_http_client/docs/ApiPeriodicSchedule.md @@ -0,0 +1,12 @@ +# ApiPeriodicSchedule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_time** | **datetime** | | [optional] +**end_time** | **datetime** | | [optional] +**interval_second** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiPipeline.md b/backend/api/python_http_client/docs/ApiPipeline.md new file mode 100644 index 00000000000..00495bcaf07 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiPipeline.md @@ -0,0 +1,17 @@ +# ApiPipeline + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Output. Unique pipeline ID. Generated by API server. | [optional] +**created_at** | **datetime** | Output. The time this pipeline is created. | [optional] +**name** | **str** | Optional input field. Pipeline name provided by user. If not specified, file name is used as pipeline name. | [optional] +**description** | **str** | Optional input field. Describing the purpose of the job. | [optional] +**parameters** | [**list[ApiParameter]**](ApiParameter.md) | Output. The input parameters for this pipeline. TODO(jingzhang36): replace this parameters field with the parameters field inside PipelineVersion when all usage of the former has been changed to use the latter. | [optional] +**url** | [**ApiUrl**](ApiUrl.md) | | [optional] +**error** | **str** | In case any error happens retrieving a pipeline field, only pipeline ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call. | [optional] +**default_version** | [**ApiPipelineVersion**](ApiPipelineVersion.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiPipelineRuntime.md b/backend/api/python_http_client/docs/ApiPipelineRuntime.md new file mode 100644 index 00000000000..c32e26cee52 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiPipelineRuntime.md @@ -0,0 +1,11 @@ +# ApiPipelineRuntime + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pipeline_manifest** | **str** | Output. The runtime JSON manifest of the pipeline, including the status of pipeline steps and fields need for UI visualization etc. | [optional] +**workflow_manifest** | **str** | Output. The runtime JSON manifest of the argo workflow. This is deprecated after pipeline_runtime_manifest is in use. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiPipelineSpec.md b/backend/api/python_http_client/docs/ApiPipelineSpec.md new file mode 100644 index 00000000000..b0e2f2c4df3 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiPipelineSpec.md @@ -0,0 +1,14 @@ +# ApiPipelineSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pipeline_id** | **str** | Optional input field. The ID of the pipeline user uploaded before. | [optional] +**pipeline_name** | **str** | Optional output field. The name of the pipeline. Not empty if the pipeline id is not empty. | [optional] +**workflow_manifest** | **str** | Optional input field. The marshalled raw argo JSON workflow. This will be deprecated when pipeline_manifest is in use. | [optional] +**pipeline_manifest** | **str** | Optional input field. The raw pipeline JSON spec. | [optional] +**parameters** | [**list[ApiParameter]**](ApiParameter.md) | The parameter user provide to inject to the pipeline JSON. If a default value of a parameter exist in the JSON, the value user provided here will replace. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiPipelineVersion.md b/backend/api/python_http_client/docs/ApiPipelineVersion.md new file mode 100644 index 00000000000..fea8886aad8 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiPipelineVersion.md @@ -0,0 +1,16 @@ +# ApiPipelineVersion + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Output. Unique version ID. Generated by API server. | [optional] +**name** | **str** | Optional input field. Version name provided by user. | [optional] +**created_at** | **datetime** | Output. The time this pipeline version is created. | [optional] +**parameters** | [**list[ApiParameter]**](ApiParameter.md) | Output. The input parameters for this pipeline. | [optional] +**code_source_url** | **str** | Input. Optional. Pipeline version code source. | [optional] +**package_url** | [**ApiUrl**](ApiUrl.md) | | [optional] +**resource_references** | [**list[ApiResourceReference]**](ApiResourceReference.md) | Input. Required. E.g., specify which pipeline this pipeline version belongs to. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiReadArtifactResponse.md b/backend/api/python_http_client/docs/ApiReadArtifactResponse.md new file mode 100644 index 00000000000..f2e187c4b5e --- /dev/null +++ b/backend/api/python_http_client/docs/ApiReadArtifactResponse.md @@ -0,0 +1,10 @@ +# ApiReadArtifactResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **str** | The bytes of the artifact content. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiRelationship.md b/backend/api/python_http_client/docs/ApiRelationship.md new file mode 100644 index 00000000000..3e6ef677702 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiRelationship.md @@ -0,0 +1,9 @@ +# ApiRelationship + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiReportRunMetricsRequest.md b/backend/api/python_http_client/docs/ApiReportRunMetricsRequest.md new file mode 100644 index 00000000000..2a7027ebaee --- /dev/null +++ b/backend/api/python_http_client/docs/ApiReportRunMetricsRequest.md @@ -0,0 +1,11 @@ +# ApiReportRunMetricsRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**run_id** | **str** | Required. The parent run ID of the metric. | [optional] +**metrics** | [**list[ApiRunMetric]**](ApiRunMetric.md) | List of metrics to report. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiReportRunMetricsResponse.md b/backend/api/python_http_client/docs/ApiReportRunMetricsResponse.md new file mode 100644 index 00000000000..b1b7e188b0a --- /dev/null +++ b/backend/api/python_http_client/docs/ApiReportRunMetricsResponse.md @@ -0,0 +1,10 @@ +# ApiReportRunMetricsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**list[ReportRunMetricsResponseReportRunMetricResult]**](ReportRunMetricsResponseReportRunMetricResult.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiResourceKey.md b/backend/api/python_http_client/docs/ApiResourceKey.md new file mode 100644 index 00000000000..f9ea3dd7b48 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiResourceKey.md @@ -0,0 +1,11 @@ +# ApiResourceKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**ApiResourceType**](ApiResourceType.md) | | [optional] +**id** | **str** | The ID of the resource that referred to. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiResourceReference.md b/backend/api/python_http_client/docs/ApiResourceReference.md new file mode 100644 index 00000000000..acbb24ed2dd --- /dev/null +++ b/backend/api/python_http_client/docs/ApiResourceReference.md @@ -0,0 +1,12 @@ +# ApiResourceReference + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | [**ApiResourceKey**](ApiResourceKey.md) | | [optional] +**name** | **str** | The name of the resource that referred to. | [optional] +**relationship** | [**ApiRelationship**](ApiRelationship.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiResourceType.md b/backend/api/python_http_client/docs/ApiResourceType.md new file mode 100644 index 00000000000..0d3f7688726 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiResourceType.md @@ -0,0 +1,9 @@ +# ApiResourceType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiRun.md b/backend/api/python_http_client/docs/ApiRun.md new file mode 100644 index 00000000000..adef1ebfd8a --- /dev/null +++ b/backend/api/python_http_client/docs/ApiRun.md @@ -0,0 +1,22 @@ +# ApiRun + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Output. Unique run ID. Generated by API server. | [optional] +**name** | **str** | Required input field. Name provided by user, or auto generated if run is created by scheduled job. Not unique. | [optional] +**storage_state** | [**RunStorageState**](RunStorageState.md) | | [optional] +**description** | **str** | | [optional] +**pipeline_spec** | [**ApiPipelineSpec**](ApiPipelineSpec.md) | | [optional] +**resource_references** | [**list[ApiResourceReference]**](ApiResourceReference.md) | Optional input field. Specify which resource this run belongs to. When creating a run from a particular pipeline version, the pipeline version can be specified here. | [optional] +**service_account** | **str** | Optional input field. Specify which Kubernetes service account this run uses. | [optional] +**created_at** | **datetime** | Output. The time that the run created. | [optional] +**scheduled_at** | **datetime** | Output. When this run is scheduled to run. This could be different from created_at. For example, if a run is from a backfilling job that was supposed to run 2 month ago, the scheduled_at is 2 month ago, v.s. created_at is the current time. | [optional] +**finished_at** | **datetime** | Output. The time this run is finished. | [optional] +**status** | **str** | | [optional] +**error** | **str** | In case any error happens retrieving a run field, only run ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call. | [optional] +**metrics** | [**list[ApiRunMetric]**](ApiRunMetric.md) | Output. The metrics of the run. The metrics are reported by ReportMetrics API. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiRunDetail.md b/backend/api/python_http_client/docs/ApiRunDetail.md new file mode 100644 index 00000000000..2d4be03b170 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiRunDetail.md @@ -0,0 +1,11 @@ +# ApiRunDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**run** | [**ApiRun**](ApiRun.md) | | [optional] +**pipeline_runtime** | [**ApiPipelineRuntime**](ApiPipelineRuntime.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiRunMetric.md b/backend/api/python_http_client/docs/ApiRunMetric.md new file mode 100644 index 00000000000..03f6e5e1a41 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiRunMetric.md @@ -0,0 +1,13 @@ +# ApiRunMetric + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Required. The user defined name of the metric. It must between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. | [optional] +**node_id** | **str** | Required. The runtime node ID which reports the metric. The node ID can be found in the RunDetail.workflow.Status. Metric with same (node_id, name) are considerd as duplicate. Only the first reporting will be recorded. Max length is 128. | [optional] +**number_value** | **float** | The number value of the metric. | [optional] +**format** | [**RunMetricFormat**](RunMetricFormat.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiStatus.md b/backend/api/python_http_client/docs/ApiStatus.md new file mode 100644 index 00000000000..6a3feb57f30 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiStatus.md @@ -0,0 +1,12 @@ +# ApiStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**code** | **int** | | [optional] +**details** | [**list[ProtobufAny]**](ProtobufAny.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiTrigger.md b/backend/api/python_http_client/docs/ApiTrigger.md new file mode 100644 index 00000000000..ff6b3c27164 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiTrigger.md @@ -0,0 +1,12 @@ +# ApiTrigger + +Trigger defines what starts a pipeline run. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cron_schedule** | [**ApiCronSchedule**](ApiCronSchedule.md) | | [optional] +**periodic_schedule** | [**ApiPeriodicSchedule**](ApiPeriodicSchedule.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ApiUrl.md b/backend/api/python_http_client/docs/ApiUrl.md new file mode 100644 index 00000000000..3b112d2b4f5 --- /dev/null +++ b/backend/api/python_http_client/docs/ApiUrl.md @@ -0,0 +1,10 @@ +# ApiUrl + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pipeline_url** | **str** | URL of the pipeline definition or the pipeline version definition. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ExperimentServiceApi.md b/backend/api/python_http_client/docs/ExperimentServiceApi.md new file mode 100644 index 00000000000..0ac2cc68a87 --- /dev/null +++ b/backend/api/python_http_client/docs/ExperimentServiceApi.md @@ -0,0 +1,480 @@ +# kfp_server_api.ExperimentServiceApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**archive_experiment**](ExperimentServiceApi.md#archive_experiment) | **POST** /apis/v1beta1/experiments/{id}:archive | Archives an experiment and the experiment's runs and jobs. +[**create_experiment**](ExperimentServiceApi.md#create_experiment) | **POST** /apis/v1beta1/experiments | Creates a new experiment. +[**delete_experiment**](ExperimentServiceApi.md#delete_experiment) | **DELETE** /apis/v1beta1/experiments/{id} | Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment. +[**get_experiment**](ExperimentServiceApi.md#get_experiment) | **GET** /apis/v1beta1/experiments/{id} | Finds a specific experiment by ID. +[**list_experiment**](ExperimentServiceApi.md#list_experiment) | **GET** /apis/v1beta1/experiments | Finds all experiments. Supports pagination, and sorting on certain fields. +[**unarchive_experiment**](ExperimentServiceApi.md#unarchive_experiment) | **POST** /apis/v1beta1/experiments/{id}:unarchive | Restores an archived experiment. The experiment's archived runs and jobs will stay archived. + + +# **archive_experiment** +> object archive_experiment(id) + +Archives an experiment and the experiment's runs and jobs. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.ExperimentServiceApi(api_client) + id = 'id_example' # str | The ID of the experiment to be archived. + + try: + # Archives an experiment and the experiment's runs and jobs. + api_response = api_instance.archive_experiment(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExperimentServiceApi->archive_experiment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the experiment to be archived. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_experiment** +> ApiExperiment create_experiment(body) + +Creates a new experiment. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.ExperimentServiceApi(api_client) + body = kfp_server_api.ApiExperiment() # ApiExperiment | The experiment to be created. + + try: + # Creates a new experiment. + api_response = api_instance.create_experiment(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExperimentServiceApi->create_experiment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ApiExperiment**](ApiExperiment.md)| The experiment to be created. | + +### Return type + +[**ApiExperiment**](ApiExperiment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_experiment** +> object delete_experiment(id) + +Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.ExperimentServiceApi(api_client) + id = 'id_example' # str | The ID of the experiment to be deleted. + + try: + # Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment. + api_response = api_instance.delete_experiment(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExperimentServiceApi->delete_experiment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the experiment to be deleted. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_experiment** +> ApiExperiment get_experiment(id) + +Finds a specific experiment by ID. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.ExperimentServiceApi(api_client) + id = 'id_example' # str | The ID of the experiment to be retrieved. + + try: + # Finds a specific experiment by ID. + api_response = api_instance.get_experiment(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExperimentServiceApi->get_experiment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the experiment to be retrieved. | + +### Return type + +[**ApiExperiment**](ApiExperiment.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_experiment** +> ApiListExperimentsResponse list_experiment(page_token=page_token, page_size=page_size, sort_by=sort_by, filter=filter, resource_reference_key_type=resource_reference_key_type, resource_reference_key_id=resource_reference_key_id) + +Finds all experiments. Supports pagination, and sorting on certain fields. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.ExperimentServiceApi(api_client) + page_token = 'page_token_example' # str | A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page. (optional) +page_size = 56 # int | The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. (optional) +sort_by = 'sort_by_example' # str | Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. (optional) +filter = 'filter_example' # str | A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). (optional) +resource_reference_key_type = 'UNKNOWN_RESOURCE_TYPE' # str | The type of the resource that referred to. (optional) (default to 'UNKNOWN_RESOURCE_TYPE') +resource_reference_key_id = 'resource_reference_key_id_example' # str | The ID of the resource that referred to. (optional) + + try: + # Finds all experiments. Supports pagination, and sorting on certain fields. + api_response = api_instance.list_experiment(page_token=page_token, page_size=page_size, sort_by=sort_by, filter=filter, resource_reference_key_type=resource_reference_key_type, resource_reference_key_id=resource_reference_key_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExperimentServiceApi->list_experiment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_token** | **str**| A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page. | [optional] + **page_size** | **int**| The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. | [optional] + **sort_by** | **str**| Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. | [optional] + **filter** | **str**| A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). | [optional] + **resource_reference_key_type** | **str**| The type of the resource that referred to. | [optional] [default to 'UNKNOWN_RESOURCE_TYPE'] + **resource_reference_key_id** | **str**| The ID of the resource that referred to. | [optional] + +### Return type + +[**ApiListExperimentsResponse**](ApiListExperimentsResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unarchive_experiment** +> object unarchive_experiment(id) + +Restores an archived experiment. The experiment's archived runs and jobs will stay archived. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.ExperimentServiceApi(api_client) + id = 'id_example' # str | The ID of the experiment to be restored. + + try: + # Restores an archived experiment. The experiment's archived runs and jobs will stay archived. + api_response = api_instance.unarchive_experiment(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExperimentServiceApi->unarchive_experiment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the experiment to be restored. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/backend/api/python_http_client/docs/ExperimentStorageState.md b/backend/api/python_http_client/docs/ExperimentStorageState.md new file mode 100644 index 00000000000..ffb7e705bca --- /dev/null +++ b/backend/api/python_http_client/docs/ExperimentStorageState.md @@ -0,0 +1,9 @@ +# ExperimentStorageState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/JobMode.md b/backend/api/python_http_client/docs/JobMode.md new file mode 100644 index 00000000000..b2e238c19a0 --- /dev/null +++ b/backend/api/python_http_client/docs/JobMode.md @@ -0,0 +1,10 @@ +# JobMode + +Required input. - DISABLED: The job won't schedule any run if disabled. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/JobServiceApi.md b/backend/api/python_http_client/docs/JobServiceApi.md new file mode 100644 index 00000000000..7342143b4e1 --- /dev/null +++ b/backend/api/python_http_client/docs/JobServiceApi.md @@ -0,0 +1,480 @@ +# kfp_server_api.JobServiceApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_job**](JobServiceApi.md#create_job) | **POST** /apis/v1beta1/jobs | Creates a new job. +[**delete_job**](JobServiceApi.md#delete_job) | **DELETE** /apis/v1beta1/jobs/{id} | Deletes a job. +[**disable_job**](JobServiceApi.md#disable_job) | **POST** /apis/v1beta1/jobs/{id}/disable | Stops a job and all its associated runs. The job is not deleted. +[**enable_job**](JobServiceApi.md#enable_job) | **POST** /apis/v1beta1/jobs/{id}/enable | Restarts a job that was previously stopped. All runs associated with the job will continue. +[**get_job**](JobServiceApi.md#get_job) | **GET** /apis/v1beta1/jobs/{id} | Finds a specific job by ID. +[**list_jobs**](JobServiceApi.md#list_jobs) | **GET** /apis/v1beta1/jobs | Finds all jobs. + + +# **create_job** +> ApiJob create_job(body) + +Creates a new job. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.JobServiceApi(api_client) + body = kfp_server_api.ApiJob() # ApiJob | The job to be created + + try: + # Creates a new job. + api_response = api_instance.create_job(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling JobServiceApi->create_job: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ApiJob**](ApiJob.md)| The job to be created | + +### Return type + +[**ApiJob**](ApiJob.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_job** +> object delete_job(id) + +Deletes a job. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.JobServiceApi(api_client) + id = 'id_example' # str | The ID of the job to be deleted + + try: + # Deletes a job. + api_response = api_instance.delete_job(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling JobServiceApi->delete_job: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the job to be deleted | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **disable_job** +> object disable_job(id) + +Stops a job and all its associated runs. The job is not deleted. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.JobServiceApi(api_client) + id = 'id_example' # str | The ID of the job to be disabled + + try: + # Stops a job and all its associated runs. The job is not deleted. + api_response = api_instance.disable_job(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling JobServiceApi->disable_job: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the job to be disabled | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **enable_job** +> object enable_job(id) + +Restarts a job that was previously stopped. All runs associated with the job will continue. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.JobServiceApi(api_client) + id = 'id_example' # str | The ID of the job to be enabled + + try: + # Restarts a job that was previously stopped. All runs associated with the job will continue. + api_response = api_instance.enable_job(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling JobServiceApi->enable_job: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the job to be enabled | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_job** +> ApiJob get_job(id) + +Finds a specific job by ID. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.JobServiceApi(api_client) + id = 'id_example' # str | The ID of the job to be retrieved + + try: + # Finds a specific job by ID. + api_response = api_instance.get_job(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling JobServiceApi->get_job: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the job to be retrieved | + +### Return type + +[**ApiJob**](ApiJob.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_jobs** +> ApiListJobsResponse list_jobs(page_token=page_token, page_size=page_size, sort_by=sort_by, resource_reference_key_type=resource_reference_key_type, resource_reference_key_id=resource_reference_key_id, filter=filter) + +Finds all jobs. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.JobServiceApi(api_client) + page_token = 'page_token_example' # str | A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListJobs call or can be omitted when fetching the first page. (optional) +page_size = 56 # int | The number of jobs to be listed per page. If there are more jobs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. (optional) +sort_by = 'sort_by_example' # str | Can be format of \"field_name\", \"field_name asc\" or \"field_name des\". Ascending by default. (optional) +resource_reference_key_type = 'UNKNOWN_RESOURCE_TYPE' # str | The type of the resource that referred to. (optional) (default to 'UNKNOWN_RESOURCE_TYPE') +resource_reference_key_id = 'resource_reference_key_id_example' # str | The ID of the resource that referred to. (optional) +filter = 'filter_example' # str | A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). (optional) + + try: + # Finds all jobs. + api_response = api_instance.list_jobs(page_token=page_token, page_size=page_size, sort_by=sort_by, resource_reference_key_type=resource_reference_key_type, resource_reference_key_id=resource_reference_key_id, filter=filter) + pprint(api_response) + except ApiException as e: + print("Exception when calling JobServiceApi->list_jobs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_token** | **str**| A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListJobs call or can be omitted when fetching the first page. | [optional] + **page_size** | **int**| The number of jobs to be listed per page. If there are more jobs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. | [optional] + **sort_by** | **str**| Can be format of \"field_name\", \"field_name asc\" or \"field_name des\". Ascending by default. | [optional] + **resource_reference_key_type** | **str**| The type of the resource that referred to. | [optional] [default to 'UNKNOWN_RESOURCE_TYPE'] + **resource_reference_key_id** | **str**| The ID of the resource that referred to. | [optional] + **filter** | **str**| A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). | [optional] + +### Return type + +[**ApiListJobsResponse**](ApiListJobsResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/backend/api/python_http_client/docs/PipelineServiceApi.md b/backend/api/python_http_client/docs/PipelineServiceApi.md new file mode 100644 index 00000000000..9c7c875dda6 --- /dev/null +++ b/backend/api/python_http_client/docs/PipelineServiceApi.md @@ -0,0 +1,794 @@ +# kfp_server_api.PipelineServiceApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_pipeline**](PipelineServiceApi.md#create_pipeline) | **POST** /apis/v1beta1/pipelines | Creates a pipeline. +[**create_pipeline_version**](PipelineServiceApi.md#create_pipeline_version) | **POST** /apis/v1beta1/pipeline_versions | Adds a pipeline version to the specified pipeline. +[**delete_pipeline**](PipelineServiceApi.md#delete_pipeline) | **DELETE** /apis/v1beta1/pipelines/{id} | Deletes a pipeline and its pipeline versions. +[**delete_pipeline_version**](PipelineServiceApi.md#delete_pipeline_version) | **DELETE** /apis/v1beta1/pipeline_versions/{version_id} | Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). +[**get_pipeline**](PipelineServiceApi.md#get_pipeline) | **GET** /apis/v1beta1/pipelines/{id} | Finds a specific pipeline by ID. +[**get_pipeline_version**](PipelineServiceApi.md#get_pipeline_version) | **GET** /apis/v1beta1/pipeline_versions/{version_id} | Gets a pipeline version by pipeline version ID. +[**get_pipeline_version_template**](PipelineServiceApi.md#get_pipeline_version_template) | **GET** /apis/v1beta1/pipeline_versions/{version_id}/templates | Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. +[**get_template**](PipelineServiceApi.md#get_template) | **GET** /apis/v1beta1/pipelines/{id}/templates | Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. +[**list_pipeline_versions**](PipelineServiceApi.md#list_pipeline_versions) | **GET** /apis/v1beta1/pipeline_versions | Lists all pipeline versions of a given pipeline. +[**list_pipelines**](PipelineServiceApi.md#list_pipelines) | **GET** /apis/v1beta1/pipelines | Finds all pipelines. + + +# **create_pipeline** +> ApiPipeline create_pipeline(body) + +Creates a pipeline. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + body = kfp_server_api.ApiPipeline() # ApiPipeline | + + try: + # Creates a pipeline. + api_response = api_instance.create_pipeline(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->create_pipeline: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ApiPipeline**](ApiPipeline.md)| | + +### Return type + +[**ApiPipeline**](ApiPipeline.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_pipeline_version** +> ApiPipelineVersion create_pipeline_version(body) + +Adds a pipeline version to the specified pipeline. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + body = kfp_server_api.ApiPipelineVersion() # ApiPipelineVersion | ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. + + try: + # Adds a pipeline version to the specified pipeline. + api_response = api_instance.create_pipeline_version(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->create_pipeline_version: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ApiPipelineVersion**](ApiPipelineVersion.md)| ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. | + +### Return type + +[**ApiPipelineVersion**](ApiPipelineVersion.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_pipeline** +> object delete_pipeline(id) + +Deletes a pipeline and its pipeline versions. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + id = 'id_example' # str | The ID of the pipeline to be deleted. + + try: + # Deletes a pipeline and its pipeline versions. + api_response = api_instance.delete_pipeline(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->delete_pipeline: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the pipeline to be deleted. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_pipeline_version** +> object delete_pipeline_version(version_id) + +Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + version_id = 'version_id_example' # str | The ID of the pipeline version to be deleted. + + try: + # Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). + api_response = api_instance.delete_pipeline_version(version_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->delete_pipeline_version: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **version_id** | **str**| The ID of the pipeline version to be deleted. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_pipeline** +> ApiPipeline get_pipeline(id) + +Finds a specific pipeline by ID. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + id = 'id_example' # str | The ID of the pipeline to be retrieved. + + try: + # Finds a specific pipeline by ID. + api_response = api_instance.get_pipeline(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->get_pipeline: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the pipeline to be retrieved. | + +### Return type + +[**ApiPipeline**](ApiPipeline.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_pipeline_version** +> ApiPipelineVersion get_pipeline_version(version_id) + +Gets a pipeline version by pipeline version ID. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + version_id = 'version_id_example' # str | The ID of the pipeline version to be retrieved. + + try: + # Gets a pipeline version by pipeline version ID. + api_response = api_instance.get_pipeline_version(version_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->get_pipeline_version: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **version_id** | **str**| The ID of the pipeline version to be retrieved. | + +### Return type + +[**ApiPipelineVersion**](ApiPipelineVersion.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_pipeline_version_template** +> ApiGetTemplateResponse get_pipeline_version_template(version_id) + +Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + version_id = 'version_id_example' # str | The ID of the pipeline version whose template is to be retrieved. + + try: + # Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. + api_response = api_instance.get_pipeline_version_template(version_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->get_pipeline_version_template: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **version_id** | **str**| The ID of the pipeline version whose template is to be retrieved. | + +### Return type + +[**ApiGetTemplateResponse**](ApiGetTemplateResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_template** +> ApiGetTemplateResponse get_template(id) + +Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + id = 'id_example' # str | The ID of the pipeline whose template is to be retrieved. + + try: + # Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. + api_response = api_instance.get_template(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->get_template: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the pipeline whose template is to be retrieved. | + +### Return type + +[**ApiGetTemplateResponse**](ApiGetTemplateResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_pipeline_versions** +> ApiListPipelineVersionsResponse list_pipeline_versions(resource_key_type=resource_key_type, resource_key_id=resource_key_id, page_size=page_size, page_token=page_token, sort_by=sort_by, filter=filter) + +Lists all pipeline versions of a given pipeline. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + resource_key_type = 'UNKNOWN_RESOURCE_TYPE' # str | The type of the resource that referred to. (optional) (default to 'UNKNOWN_RESOURCE_TYPE') +resource_key_id = 'resource_key_id_example' # str | The ID of the resource that referred to. (optional) +page_size = 56 # int | The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a nextPageToken field you can use to fetch the next page. (optional) +page_token = 'page_token_example' # str | A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelineVersions call or can be omitted when fetching the first page. (optional) +sort_by = 'sort_by_example' # str | Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. (optional) +filter = 'filter_example' # str | A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto). (optional) + + try: + # Lists all pipeline versions of a given pipeline. + api_response = api_instance.list_pipeline_versions(resource_key_type=resource_key_type, resource_key_id=resource_key_id, page_size=page_size, page_token=page_token, sort_by=sort_by, filter=filter) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->list_pipeline_versions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_key_type** | **str**| The type of the resource that referred to. | [optional] [default to 'UNKNOWN_RESOURCE_TYPE'] + **resource_key_id** | **str**| The ID of the resource that referred to. | [optional] + **page_size** | **int**| The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a nextPageToken field you can use to fetch the next page. | [optional] + **page_token** | **str**| A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelineVersions call or can be omitted when fetching the first page. | [optional] + **sort_by** | **str**| Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. | [optional] + **filter** | **str**| A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto). | [optional] + +### Return type + +[**ApiListPipelineVersionsResponse**](ApiListPipelineVersionsResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_pipelines** +> ApiListPipelinesResponse list_pipelines(page_token=page_token, page_size=page_size, sort_by=sort_by, filter=filter) + +Finds all pipelines. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineServiceApi(api_client) + page_token = 'page_token_example' # str | A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call. (optional) +page_size = 56 # int | The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. (optional) +sort_by = 'sort_by_example' # str | Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. (optional) +filter = 'filter_example' # str | A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). (optional) + + try: + # Finds all pipelines. + api_response = api_instance.list_pipelines(page_token=page_token, page_size=page_size, sort_by=sort_by, filter=filter) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineServiceApi->list_pipelines: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_token** | **str**| A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call. | [optional] + **page_size** | **int**| The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. | [optional] + **sort_by** | **str**| Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. | [optional] + **filter** | **str**| A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). | [optional] + +### Return type + +[**ApiListPipelinesResponse**](ApiListPipelinesResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/backend/api/python_http_client/docs/PipelineUploadServiceApi.md b/backend/api/python_http_client/docs/PipelineUploadServiceApi.md new file mode 100644 index 00000000000..634d39f9114 --- /dev/null +++ b/backend/api/python_http_client/docs/PipelineUploadServiceApi.md @@ -0,0 +1,168 @@ +# kfp_server_api.PipelineUploadServiceApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**upload_pipeline**](PipelineUploadServiceApi.md#upload_pipeline) | **POST** /apis/v1beta1/pipelines/upload | +[**upload_pipeline_version**](PipelineUploadServiceApi.md#upload_pipeline_version) | **POST** /apis/v1beta1/pipelines/upload_version | + + +# **upload_pipeline** +> ApiPipeline upload_pipeline(uploadfile, name=name, description=description) + + + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineUploadServiceApi(api_client) + uploadfile = '/path/to/file' # file | The pipeline to upload. Maximum size of 32MB is supported. +name = 'name_example' # str | (optional) +description = 'description_example' # str | (optional) + + try: + api_response = api_instance.upload_pipeline(uploadfile, name=name, description=description) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineUploadServiceApi->upload_pipeline: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uploadfile** | **file**| The pipeline to upload. Maximum size of 32MB is supported. | + **name** | **str**| | [optional] + **description** | **str**| | [optional] + +### Return type + +[**ApiPipeline**](ApiPipeline.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **upload_pipeline_version** +> ApiPipelineVersion upload_pipeline_version(uploadfile, name=name, pipelineid=pipelineid) + + + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.PipelineUploadServiceApi(api_client) + uploadfile = '/path/to/file' # file | The pipeline to upload. Maximum size of 32MB is supported. +name = 'name_example' # str | (optional) +pipelineid = 'pipelineid_example' # str | (optional) + + try: + api_response = api_instance.upload_pipeline_version(uploadfile, name=name, pipelineid=pipelineid) + pprint(api_response) + except ApiException as e: + print("Exception when calling PipelineUploadServiceApi->upload_pipeline_version: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uploadfile** | **file**| The pipeline to upload. Maximum size of 32MB is supported. | + **name** | **str**| | [optional] + **pipelineid** | **str**| | [optional] + +### Return type + +[**ApiPipelineVersion**](ApiPipelineVersion.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/backend/api/python_http_client/docs/ProtobufAny.md b/backend/api/python_http_client/docs/ProtobufAny.md new file mode 100644 index 00000000000..463a60dcf30 --- /dev/null +++ b/backend/api/python_http_client/docs/ProtobufAny.md @@ -0,0 +1,12 @@ +# ProtobufAny + +`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" } +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type_url** | **str** | A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. | [optional] +**value** | **str** | Must be a valid serialized protocol buffer of the above specified type. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ReportRunMetricsResponseReportRunMetricResult.md b/backend/api/python_http_client/docs/ReportRunMetricsResponseReportRunMetricResult.md new file mode 100644 index 00000000000..cf376f68719 --- /dev/null +++ b/backend/api/python_http_client/docs/ReportRunMetricsResponseReportRunMetricResult.md @@ -0,0 +1,13 @@ +# ReportRunMetricsResponseReportRunMetricResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric_name** | **str** | Output. The name of the metric. | [optional] +**metric_node_id** | **str** | Output. The ID of the node which reports the metric. | [optional] +**status** | [**ReportRunMetricsResponseReportRunMetricResultStatus**](ReportRunMetricsResponseReportRunMetricResultStatus.md) | | [optional] +**message** | **str** | Output. The detailed message of the error of the reporting. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/ReportRunMetricsResponseReportRunMetricResultStatus.md b/backend/api/python_http_client/docs/ReportRunMetricsResponseReportRunMetricResultStatus.md new file mode 100644 index 00000000000..843f3b818e3 --- /dev/null +++ b/backend/api/python_http_client/docs/ReportRunMetricsResponseReportRunMetricResultStatus.md @@ -0,0 +1,10 @@ +# ReportRunMetricsResponseReportRunMetricResultStatus + + - UNSPECIFIED: Default value if not present. - OK: Indicates successful reporting. - INVALID_ARGUMENT: Indicates that the payload of the metric is invalid. - DUPLICATE_REPORTING: Indicates that the metric has been reported before. - INTERNAL_ERROR: Indicates that something went wrong in the server. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/RunMetricFormat.md b/backend/api/python_http_client/docs/RunMetricFormat.md new file mode 100644 index 00000000000..deef5e06cd1 --- /dev/null +++ b/backend/api/python_http_client/docs/RunMetricFormat.md @@ -0,0 +1,10 @@ +# RunMetricFormat + + - UNSPECIFIED: Default value if not present. - RAW: Display value as its raw format. - PERCENTAGE: Display value in percentage format. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/docs/RunServiceApi.md b/backend/api/python_http_client/docs/RunServiceApi.md new file mode 100644 index 00000000000..596d025566c --- /dev/null +++ b/backend/api/python_http_client/docs/RunServiceApi.md @@ -0,0 +1,794 @@ +# kfp_server_api.RunServiceApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**archive_run**](RunServiceApi.md#archive_run) | **POST** /apis/v1beta1/runs/{id}:archive | Archives a run. +[**create_run**](RunServiceApi.md#create_run) | **POST** /apis/v1beta1/runs | Creates a new run. +[**delete_run**](RunServiceApi.md#delete_run) | **DELETE** /apis/v1beta1/runs/{id} | Deletes a run. +[**get_run**](RunServiceApi.md#get_run) | **GET** /apis/v1beta1/runs/{run_id} | Finds a specific run by ID. +[**list_runs**](RunServiceApi.md#list_runs) | **GET** /apis/v1beta1/runs | Finds all runs. +[**read_artifact**](RunServiceApi.md#read_artifact) | **GET** /apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read | Finds a run's artifact data. +[**report_run_metrics**](RunServiceApi.md#report_run_metrics) | **POST** /apis/v1beta1/runs/{run_id}:reportMetrics | ReportRunMetrics reports metrics of a run. Each metric is reported in its own transaction, so this API accepts partial failures. Metric can be uniquely identified by (run_id, node_id, name). Duplicate reporting will be ignored by the API. First reporting wins. +[**retry_run**](RunServiceApi.md#retry_run) | **POST** /apis/v1beta1/runs/{run_id}/retry | Re-initiates a failed or terminated run. +[**terminate_run**](RunServiceApi.md#terminate_run) | **POST** /apis/v1beta1/runs/{run_id}/terminate | Terminates an active run. +[**unarchive_run**](RunServiceApi.md#unarchive_run) | **POST** /apis/v1beta1/runs/{id}:unarchive | Restores an archived run. + + +# **archive_run** +> object archive_run(id) + +Archives a run. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + id = 'id_example' # str | The ID of the run to be archived. + + try: + # Archives a run. + api_response = api_instance.archive_run(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->archive_run: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the run to be archived. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_run** +> ApiRunDetail create_run(body) + +Creates a new run. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + body = kfp_server_api.ApiRun() # ApiRun | + + try: + # Creates a new run. + api_response = api_instance.create_run(body) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->create_run: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ApiRun**](ApiRun.md)| | + +### Return type + +[**ApiRunDetail**](ApiRunDetail.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_run** +> object delete_run(id) + +Deletes a run. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + id = 'id_example' # str | The ID of the run to be deleted. + + try: + # Deletes a run. + api_response = api_instance.delete_run(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->delete_run: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the run to be deleted. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_run** +> ApiRunDetail get_run(run_id) + +Finds a specific run by ID. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + run_id = 'run_id_example' # str | The ID of the run to be retrieved. + + try: + # Finds a specific run by ID. + api_response = api_instance.get_run(run_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->get_run: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **run_id** | **str**| The ID of the run to be retrieved. | + +### Return type + +[**ApiRunDetail**](ApiRunDetail.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_runs** +> ApiListRunsResponse list_runs(page_token=page_token, page_size=page_size, sort_by=sort_by, resource_reference_key_type=resource_reference_key_type, resource_reference_key_id=resource_reference_key_id, filter=filter) + +Finds all runs. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + page_token = 'page_token_example' # str | A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page. (optional) +page_size = 56 # int | The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. (optional) +sort_by = 'sort_by_example' # str | Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" (Example, \"name asc\" or \"id des\"). Ascending by default. (optional) +resource_reference_key_type = 'UNKNOWN_RESOURCE_TYPE' # str | The type of the resource that referred to. (optional) (default to 'UNKNOWN_RESOURCE_TYPE') +resource_reference_key_id = 'resource_reference_key_id_example' # str | The ID of the resource that referred to. (optional) +filter = 'filter_example' # str | A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). (optional) + + try: + # Finds all runs. + api_response = api_instance.list_runs(page_token=page_token, page_size=page_size, sort_by=sort_by, resource_reference_key_type=resource_reference_key_type, resource_reference_key_id=resource_reference_key_id, filter=filter) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->list_runs: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_token** | **str**| A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page. | [optional] + **page_size** | **int**| The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. | [optional] + **sort_by** | **str**| Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" (Example, \"name asc\" or \"id des\"). Ascending by default. | [optional] + **resource_reference_key_type** | **str**| The type of the resource that referred to. | [optional] [default to 'UNKNOWN_RESOURCE_TYPE'] + **resource_reference_key_id** | **str**| The ID of the resource that referred to. | [optional] + **filter** | **str**| A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). | [optional] + +### Return type + +[**ApiListRunsResponse**](ApiListRunsResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **read_artifact** +> ApiReadArtifactResponse read_artifact(run_id, node_id, artifact_name) + +Finds a run's artifact data. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + run_id = 'run_id_example' # str | The ID of the run. +node_id = 'node_id_example' # str | The ID of the running node. +artifact_name = 'artifact_name_example' # str | The name of the artifact. + + try: + # Finds a run's artifact data. + api_response = api_instance.read_artifact(run_id, node_id, artifact_name) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->read_artifact: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **run_id** | **str**| The ID of the run. | + **node_id** | **str**| The ID of the running node. | + **artifact_name** | **str**| The name of the artifact. | + +### Return type + +[**ApiReadArtifactResponse**](ApiReadArtifactResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **report_run_metrics** +> ApiReportRunMetricsResponse report_run_metrics(run_id, body) + +ReportRunMetrics reports metrics of a run. Each metric is reported in its own transaction, so this API accepts partial failures. Metric can be uniquely identified by (run_id, node_id, name). Duplicate reporting will be ignored by the API. First reporting wins. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + run_id = 'run_id_example' # str | Required. The parent run ID of the metric. +body = kfp_server_api.ApiReportRunMetricsRequest() # ApiReportRunMetricsRequest | + + try: + # ReportRunMetrics reports metrics of a run. Each metric is reported in its own transaction, so this API accepts partial failures. Metric can be uniquely identified by (run_id, node_id, name). Duplicate reporting will be ignored by the API. First reporting wins. + api_response = api_instance.report_run_metrics(run_id, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->report_run_metrics: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **run_id** | **str**| Required. The parent run ID of the metric. | + **body** | [**ApiReportRunMetricsRequest**](ApiReportRunMetricsRequest.md)| | + +### Return type + +[**ApiReportRunMetricsResponse**](ApiReportRunMetricsResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **retry_run** +> object retry_run(run_id) + +Re-initiates a failed or terminated run. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + run_id = 'run_id_example' # str | The ID of the run to be retried. + + try: + # Re-initiates a failed or terminated run. + api_response = api_instance.retry_run(run_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->retry_run: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **run_id** | **str**| The ID of the run to be retried. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **terminate_run** +> object terminate_run(run_id) + +Terminates an active run. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + run_id = 'run_id_example' # str | The ID of the run to be terminated. + + try: + # Terminates an active run. + api_response = api_instance.terminate_run(run_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->terminate_run: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **run_id** | **str**| The ID of the run to be terminated. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unarchive_run** +> object unarchive_run(id) + +Restores an archived run. + +### Example + +* Api Key Authentication (Bearer): +```python +from __future__ import print_function +import time +import kfp_server_api +from kfp_server_api.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kfp_server_api.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration = kfp_server_api.Configuration( + host = "http://localhost", + 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' + +# Enter a context with an instance of the API client +with kfp_server_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kfp_server_api.RunServiceApi(api_client) + id = 'id_example' # str | The ID of the run to be restored. + + try: + # Restores an archived run. + api_response = api_instance.unarchive_run(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling RunServiceApi->unarchive_run: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the run to be restored. | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**0** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/backend/api/python_http_client/docs/RunStorageState.md b/backend/api/python_http_client/docs/RunStorageState.md new file mode 100644 index 00000000000..958cd0142f9 --- /dev/null +++ b/backend/api/python_http_client/docs/RunStorageState.md @@ -0,0 +1,9 @@ +# RunStorageState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/backend/api/python_http_client/git_push.sh b/backend/api/python_http_client/git_push.sh new file mode 100644 index 00000000000..ced3be2b0c7 --- /dev/null +++ b/backend/api/python_http_client/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/backend/api/python_http_client/kfp_server_api/__init__.py b/backend/api/python_http_client/kfp_server_api/__init__.py new file mode 100644 index 00000000000..bef79e84114 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/__init__.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +__version__ = "1.0.0-dev.1" + +# import apis into sdk package +from kfp_server_api.api.experiment_service_api import ExperimentServiceApi +from kfp_server_api.api.job_service_api import JobServiceApi +from kfp_server_api.api.pipeline_service_api import PipelineServiceApi +from kfp_server_api.api.pipeline_upload_service_api import PipelineUploadServiceApi +from kfp_server_api.api.run_service_api import RunServiceApi + +# import ApiClient +from kfp_server_api.api_client import ApiClient +from kfp_server_api.configuration import Configuration +from kfp_server_api.exceptions import OpenApiException +from kfp_server_api.exceptions import ApiTypeError +from kfp_server_api.exceptions import ApiValueError +from kfp_server_api.exceptions import ApiKeyError +from kfp_server_api.exceptions import ApiException +# import models into sdk package +from kfp_server_api.models.api_cron_schedule import ApiCronSchedule +from kfp_server_api.models.api_experiment import ApiExperiment +from kfp_server_api.models.api_get_template_response import ApiGetTemplateResponse +from kfp_server_api.models.api_job import ApiJob +from kfp_server_api.models.api_list_experiments_response import ApiListExperimentsResponse +from kfp_server_api.models.api_list_jobs_response import ApiListJobsResponse +from kfp_server_api.models.api_list_pipeline_versions_response import ApiListPipelineVersionsResponse +from kfp_server_api.models.api_list_pipelines_response import ApiListPipelinesResponse +from kfp_server_api.models.api_list_runs_response import ApiListRunsResponse +from kfp_server_api.models.api_parameter import ApiParameter +from kfp_server_api.models.api_periodic_schedule import ApiPeriodicSchedule +from kfp_server_api.models.api_pipeline import ApiPipeline +from kfp_server_api.models.api_pipeline_runtime import ApiPipelineRuntime +from kfp_server_api.models.api_pipeline_spec import ApiPipelineSpec +from kfp_server_api.models.api_pipeline_version import ApiPipelineVersion +from kfp_server_api.models.api_read_artifact_response import ApiReadArtifactResponse +from kfp_server_api.models.api_relationship import ApiRelationship +from kfp_server_api.models.api_report_run_metrics_request import ApiReportRunMetricsRequest +from kfp_server_api.models.api_report_run_metrics_response import ApiReportRunMetricsResponse +from kfp_server_api.models.api_resource_key import ApiResourceKey +from kfp_server_api.models.api_resource_reference import ApiResourceReference +from kfp_server_api.models.api_resource_type import ApiResourceType +from kfp_server_api.models.api_run import ApiRun +from kfp_server_api.models.api_run_detail import ApiRunDetail +from kfp_server_api.models.api_run_metric import ApiRunMetric +from kfp_server_api.models.api_status import ApiStatus +from kfp_server_api.models.api_trigger import ApiTrigger +from kfp_server_api.models.api_url import ApiUrl +from kfp_server_api.models.experiment_storage_state import ExperimentStorageState +from kfp_server_api.models.job_mode import JobMode +from kfp_server_api.models.protobuf_any import ProtobufAny +from kfp_server_api.models.report_run_metrics_response_report_run_metric_result import ReportRunMetricsResponseReportRunMetricResult +from kfp_server_api.models.report_run_metrics_response_report_run_metric_result_status import ReportRunMetricsResponseReportRunMetricResultStatus +from kfp_server_api.models.run_metric_format import RunMetricFormat +from kfp_server_api.models.run_storage_state import RunStorageState + diff --git a/backend/api/python_http_client/kfp_server_api/api/__init__.py b/backend/api/python_http_client/kfp_server_api/api/__init__.py new file mode 100644 index 00000000000..2c1228a2f7d --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/api/__init__.py @@ -0,0 +1,10 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from kfp_server_api.api.experiment_service_api import ExperimentServiceApi +from kfp_server_api.api.job_service_api import JobServiceApi +from kfp_server_api.api.pipeline_service_api import PipelineServiceApi +from kfp_server_api.api.pipeline_upload_service_api import PipelineUploadServiceApi +from kfp_server_api.api.run_service_api import RunServiceApi diff --git a/backend/api/python_http_client/kfp_server_api/api/experiment_service_api.py b/backend/api/python_http_client/kfp_server_api/api/experiment_service_api.py new file mode 100644 index 00000000000..8355f5d0bb8 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/api/experiment_service_api.py @@ -0,0 +1,735 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kfp_server_api.api_client import ApiClient +from kfp_server_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ExperimentServiceApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def archive_experiment(self, id, **kwargs): # noqa: E501 + """Archives an experiment and the experiment's runs and jobs. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.archive_experiment(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the experiment to be archived. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.archive_experiment_with_http_info(id, **kwargs) # noqa: E501 + + def archive_experiment_with_http_info(self, id, **kwargs): # noqa: E501 + """Archives an experiment and the experiment's runs and jobs. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.archive_experiment_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the experiment to be archived. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method archive_experiment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `archive_experiment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/experiments/{id}:archive', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_experiment(self, body, **kwargs): # noqa: E501 + """Creates a new experiment. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_experiment(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiExperiment body: The experiment to be created. (required) + :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: ApiExperiment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_experiment_with_http_info(body, **kwargs) # noqa: E501 + + def create_experiment_with_http_info(self, body, **kwargs): # noqa: E501 + """Creates a new experiment. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_experiment_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiExperiment body: The experiment to be created. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiExperiment, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_experiment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_experiment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/experiments', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiExperiment', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_experiment(self, id, **kwargs): # noqa: E501 + """Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment. # 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_experiment(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the experiment to be deleted. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_experiment_with_http_info(id, **kwargs) # noqa: E501 + + def delete_experiment_with_http_info(self, id, **kwargs): # noqa: E501 + """Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment. # 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_experiment_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the experiment to be deleted. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_experiment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `delete_experiment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/experiments/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_experiment(self, id, **kwargs): # noqa: E501 + """Finds a specific experiment 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.get_experiment(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the experiment to be retrieved. (required) + :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: ApiExperiment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_experiment_with_http_info(id, **kwargs) # noqa: E501 + + def get_experiment_with_http_info(self, id, **kwargs): # noqa: E501 + """Finds a specific experiment 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.get_experiment_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the experiment to be retrieved. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiExperiment, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_experiment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_experiment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/experiments/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiExperiment', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_experiment(self, **kwargs): # noqa: E501 + """Finds all experiments. Supports pagination, and sorting on certain fields. # 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_experiment(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page. + :param int page_size: The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. + :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + :param str resource_reference_key_type: The type of the resource that referred to. + :param str resource_reference_key_id: The ID of the resource that referred to. + :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: ApiListExperimentsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_experiment_with_http_info(**kwargs) # noqa: E501 + + def list_experiment_with_http_info(self, **kwargs): # noqa: E501 + """Finds all experiments. Supports pagination, and sorting on certain fields. # 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_experiment_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page. + :param int page_size: The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. + :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + :param str resource_reference_key_type: The type of the resource that referred to. + :param str resource_reference_key_id: The ID of the resource that referred to. + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiListExperimentsResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page_token', + 'page_size', + 'sort_by', + 'filter', + 'resource_reference_key_type', + 'resource_reference_key_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_experiment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_token' in local_var_params and local_var_params['page_token'] is not None: # noqa: E501 + query_params.append(('page_token', local_var_params['page_token'])) # noqa: E501 + if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 + if 'sort_by' in local_var_params and local_var_params['sort_by'] is not None: # noqa: E501 + query_params.append(('sort_by', local_var_params['sort_by'])) # noqa: E501 + if 'filter' in local_var_params and local_var_params['filter'] is not None: # noqa: E501 + query_params.append(('filter', local_var_params['filter'])) # noqa: E501 + if 'resource_reference_key_type' in local_var_params and local_var_params['resource_reference_key_type'] is not None: # noqa: E501 + query_params.append(('resource_reference_key.type', local_var_params['resource_reference_key_type'])) # noqa: E501 + if 'resource_reference_key_id' in local_var_params and local_var_params['resource_reference_key_id'] is not None: # noqa: E501 + query_params.append(('resource_reference_key.id', local_var_params['resource_reference_key_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/experiments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiListExperimentsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def unarchive_experiment(self, id, **kwargs): # noqa: E501 + """Restores an archived experiment. The experiment's archived runs and jobs will stay archived. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_experiment(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the experiment to be restored. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.unarchive_experiment_with_http_info(id, **kwargs) # noqa: E501 + + def unarchive_experiment_with_http_info(self, id, **kwargs): # noqa: E501 + """Restores an archived experiment. The experiment's archived runs and jobs will stay archived. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_experiment_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the experiment to be restored. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method unarchive_experiment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `unarchive_experiment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/experiments/{id}:unarchive', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/backend/api/python_http_client/kfp_server_api/api/job_service_api.py b/backend/api/python_http_client/kfp_server_api/api/job_service_api.py new file mode 100644 index 00000000000..e42706ad1a0 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/api/job_service_api.py @@ -0,0 +1,735 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kfp_server_api.api_client import ApiClient +from kfp_server_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class JobServiceApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_job(self, body, **kwargs): # noqa: E501 + """Creates a new job. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_job(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiJob body: The job to be created (required) + :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: ApiJob + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_job_with_http_info(body, **kwargs) # noqa: E501 + + def create_job_with_http_info(self, body, **kwargs): # noqa: E501 + """Creates a new job. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_job_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiJob body: The job to be created (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiJob, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_job" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_job`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/jobs', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiJob', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_job(self, id, **kwargs): # noqa: E501 + """Deletes a job. # 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_job(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the job to be deleted (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_job_with_http_info(id, **kwargs) # noqa: E501 + + def delete_job_with_http_info(self, id, **kwargs): # noqa: E501 + """Deletes a job. # 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_job_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the job to be deleted (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_job" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `delete_job`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/jobs/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def disable_job(self, id, **kwargs): # noqa: E501 + """Stops a job and all its associated runs. The job is not deleted. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.disable_job(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the job to be disabled (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.disable_job_with_http_info(id, **kwargs) # noqa: E501 + + def disable_job_with_http_info(self, id, **kwargs): # noqa: E501 + """Stops a job and all its associated runs. The job is not deleted. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.disable_job_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the job to be disabled (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method disable_job" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `disable_job`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/jobs/{id}/disable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def enable_job(self, id, **kwargs): # noqa: E501 + """Restarts a job that was previously stopped. All runs associated with the job will continue. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.enable_job(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the job to be enabled (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.enable_job_with_http_info(id, **kwargs) # noqa: E501 + + def enable_job_with_http_info(self, id, **kwargs): # noqa: E501 + """Restarts a job that was previously stopped. All runs associated with the job will continue. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.enable_job_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the job to be enabled (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method enable_job" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `enable_job`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/jobs/{id}/enable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_job(self, id, **kwargs): # noqa: E501 + """Finds a specific job 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.get_job(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the job to be retrieved (required) + :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: ApiJob + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_job_with_http_info(id, **kwargs) # noqa: E501 + + def get_job_with_http_info(self, id, **kwargs): # noqa: E501 + """Finds a specific job 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.get_job_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the job to be retrieved (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiJob, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_job" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_job`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/jobs/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiJob', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_jobs(self, **kwargs): # noqa: E501 + """Finds all jobs. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_jobs(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListJobs call or can be omitted when fetching the first page. + :param int page_size: The number of jobs to be listed per page. If there are more jobs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\". Ascending by default. + :param str resource_reference_key_type: The type of the resource that referred to. + :param str resource_reference_key_id: The ID of the resource that referred to. + :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + :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: ApiListJobsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_jobs_with_http_info(**kwargs) # noqa: E501 + + def list_jobs_with_http_info(self, **kwargs): # noqa: E501 + """Finds all jobs. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_jobs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListJobs call or can be omitted when fetching the first page. + :param int page_size: The number of jobs to be listed per page. If there are more jobs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\". Ascending by default. + :param str resource_reference_key_type: The type of the resource that referred to. + :param str resource_reference_key_id: The ID of the resource that referred to. + :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiListJobsResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page_token', + 'page_size', + 'sort_by', + 'resource_reference_key_type', + 'resource_reference_key_id', + 'filter' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_jobs" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_token' in local_var_params and local_var_params['page_token'] is not None: # noqa: E501 + query_params.append(('page_token', local_var_params['page_token'])) # noqa: E501 + if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 + if 'sort_by' in local_var_params and local_var_params['sort_by'] is not None: # noqa: E501 + query_params.append(('sort_by', local_var_params['sort_by'])) # noqa: E501 + if 'resource_reference_key_type' in local_var_params and local_var_params['resource_reference_key_type'] is not None: # noqa: E501 + query_params.append(('resource_reference_key.type', local_var_params['resource_reference_key_type'])) # noqa: E501 + if 'resource_reference_key_id' in local_var_params and local_var_params['resource_reference_key_id'] is not None: # noqa: E501 + query_params.append(('resource_reference_key.id', local_var_params['resource_reference_key_id'])) # noqa: E501 + if 'filter' in local_var_params and local_var_params['filter'] is not None: # noqa: E501 + query_params.append(('filter', local_var_params['filter'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/jobs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiListJobsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/backend/api/python_http_client/kfp_server_api/api/pipeline_service_api.py b/backend/api/python_http_client/kfp_server_api/api/pipeline_service_api.py new file mode 100644 index 00000000000..8075d3391ea --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/api/pipeline_service_api.py @@ -0,0 +1,1198 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kfp_server_api.api_client import ApiClient +from kfp_server_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PipelineServiceApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_pipeline(self, body, **kwargs): # noqa: E501 + """Creates a pipeline. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_pipeline(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiPipeline body: (required) + :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: ApiPipeline + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_pipeline_with_http_info(body, **kwargs) # noqa: E501 + + def create_pipeline_with_http_info(self, body, **kwargs): # noqa: E501 + """Creates a pipeline. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_pipeline_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiPipeline body: (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiPipeline, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_pipeline" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_pipeline`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipelines', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiPipeline', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_pipeline_version(self, body, **kwargs): # noqa: E501 + """Adds a pipeline version to the specified pipeline. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_pipeline_version(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiPipelineVersion body: ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. (required) + :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: ApiPipelineVersion + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_pipeline_version_with_http_info(body, **kwargs) # noqa: E501 + + def create_pipeline_version_with_http_info(self, body, **kwargs): # noqa: E501 + """Adds a pipeline version to the specified pipeline. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_pipeline_version_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiPipelineVersion body: ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiPipelineVersion, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_pipeline_version" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_pipeline_version`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipeline_versions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiPipelineVersion', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_pipeline(self, id, **kwargs): # noqa: E501 + """Deletes a pipeline and its pipeline versions. # 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_pipeline(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the pipeline to be deleted. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_pipeline_with_http_info(id, **kwargs) # noqa: E501 + + def delete_pipeline_with_http_info(self, id, **kwargs): # noqa: E501 + """Deletes a pipeline and its pipeline versions. # 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_pipeline_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the pipeline to be deleted. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_pipeline" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `delete_pipeline`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipelines/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_pipeline_version(self, version_id, **kwargs): # noqa: E501 + """Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). # 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_pipeline_version(version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str version_id: The ID of the pipeline version to be deleted. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_pipeline_version_with_http_info(version_id, **kwargs) # noqa: E501 + + def delete_pipeline_version_with_http_info(self, version_id, **kwargs): # noqa: E501 + """Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). # 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_pipeline_version_with_http_info(version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str version_id: The ID of the pipeline version to be deleted. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'version_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_pipeline_version" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'version_id' is set + if self.api_client.client_side_validation and ('version_id' not in local_var_params or # noqa: E501 + local_var_params['version_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `version_id` when calling `delete_pipeline_version`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'version_id' in local_var_params: + path_params['version_id'] = local_var_params['version_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipeline_versions/{version_id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_pipeline(self, id, **kwargs): # noqa: E501 + """Finds a specific pipeline 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.get_pipeline(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the pipeline to be retrieved. (required) + :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: ApiPipeline + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_pipeline_with_http_info(id, **kwargs) # noqa: E501 + + def get_pipeline_with_http_info(self, id, **kwargs): # noqa: E501 + """Finds a specific pipeline 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.get_pipeline_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the pipeline to be retrieved. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiPipeline, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pipeline" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_pipeline`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipelines/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiPipeline', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_pipeline_version(self, version_id, **kwargs): # noqa: E501 + """Gets a pipeline version by pipeline version 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.get_pipeline_version(version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str version_id: The ID of the pipeline version to be retrieved. (required) + :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: ApiPipelineVersion + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_pipeline_version_with_http_info(version_id, **kwargs) # noqa: E501 + + def get_pipeline_version_with_http_info(self, version_id, **kwargs): # noqa: E501 + """Gets a pipeline version by pipeline version 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.get_pipeline_version_with_http_info(version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str version_id: The ID of the pipeline version to be retrieved. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiPipelineVersion, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'version_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pipeline_version" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'version_id' is set + if self.api_client.client_side_validation and ('version_id' not in local_var_params or # noqa: E501 + local_var_params['version_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `version_id` when calling `get_pipeline_version`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'version_id' in local_var_params: + path_params['version_id'] = local_var_params['version_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipeline_versions/{version_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiPipelineVersion', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_pipeline_version_template(self, version_id, **kwargs): # noqa: E501 + """Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. # 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_pipeline_version_template(version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str version_id: The ID of the pipeline version whose template is to be retrieved. (required) + :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: ApiGetTemplateResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_pipeline_version_template_with_http_info(version_id, **kwargs) # noqa: E501 + + def get_pipeline_version_template_with_http_info(self, version_id, **kwargs): # noqa: E501 + """Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. # 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_pipeline_version_template_with_http_info(version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str version_id: The ID of the pipeline version whose template is to be retrieved. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiGetTemplateResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'version_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pipeline_version_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'version_id' is set + if self.api_client.client_side_validation and ('version_id' not in local_var_params or # noqa: E501 + local_var_params['version_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `version_id` when calling `get_pipeline_version_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'version_id' in local_var_params: + path_params['version_id'] = local_var_params['version_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipeline_versions/{version_id}/templates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiGetTemplateResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_template(self, id, **kwargs): # noqa: E501 + """Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. # 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_template(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the pipeline whose template is to be retrieved. (required) + :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: ApiGetTemplateResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_template_with_http_info(id, **kwargs) # noqa: E501 + + def get_template_with_http_info(self, id, **kwargs): # noqa: E501 + """Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. # 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_template_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the pipeline whose template is to be retrieved. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiGetTemplateResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipelines/{id}/templates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiGetTemplateResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_pipeline_versions(self, **kwargs): # noqa: E501 + """Lists all pipeline versions of a given pipeline. # 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_pipeline_versions(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str resource_key_type: The type of the resource that referred to. + :param str resource_key_id: The ID of the resource that referred to. + :param int page_size: The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelineVersions call or can be omitted when fetching the first page. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. + :param str filter: A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto). + :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: ApiListPipelineVersionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_pipeline_versions_with_http_info(**kwargs) # noqa: E501 + + def list_pipeline_versions_with_http_info(self, **kwargs): # noqa: E501 + """Lists all pipeline versions of a given pipeline. # 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_pipeline_versions_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str resource_key_type: The type of the resource that referred to. + :param str resource_key_id: The ID of the resource that referred to. + :param int page_size: The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelineVersions call or can be omitted when fetching the first page. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. + :param str filter: A base-64 encoded, JSON-serialized Filter protocol buffer (see filter.proto). + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiListPipelineVersionsResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'resource_key_type', + 'resource_key_id', + 'page_size', + 'page_token', + 'sort_by', + 'filter' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_pipeline_versions" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'resource_key_type' in local_var_params and local_var_params['resource_key_type'] is not None: # noqa: E501 + query_params.append(('resource_key.type', local_var_params['resource_key_type'])) # noqa: E501 + if 'resource_key_id' in local_var_params and local_var_params['resource_key_id'] is not None: # noqa: E501 + query_params.append(('resource_key.id', local_var_params['resource_key_id'])) # noqa: E501 + if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 + if 'page_token' in local_var_params and local_var_params['page_token'] is not None: # noqa: E501 + query_params.append(('page_token', local_var_params['page_token'])) # noqa: E501 + if 'sort_by' in local_var_params and local_var_params['sort_by'] is not None: # noqa: E501 + query_params.append(('sort_by', local_var_params['sort_by'])) # noqa: E501 + if 'filter' in local_var_params and local_var_params['filter'] is not None: # noqa: E501 + query_params.append(('filter', local_var_params['filter'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipeline_versions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiListPipelineVersionsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_pipelines(self, **kwargs): # noqa: E501 + """Finds all pipelines. # 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_pipelines(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call. + :param int page_size: The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. + :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + :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: ApiListPipelinesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_pipelines_with_http_info(**kwargs) # noqa: E501 + + def list_pipelines_with_http_info(self, **kwargs): # noqa: E501 + """Finds all pipelines. # 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_pipelines_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call. + :param int page_size: The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" Ascending by default. + :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiListPipelinesResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page_token', + 'page_size', + 'sort_by', + 'filter' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_pipelines" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_token' in local_var_params and local_var_params['page_token'] is not None: # noqa: E501 + query_params.append(('page_token', local_var_params['page_token'])) # noqa: E501 + if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 + if 'sort_by' in local_var_params and local_var_params['sort_by'] is not None: # noqa: E501 + query_params.append(('sort_by', local_var_params['sort_by'])) # noqa: E501 + if 'filter' in local_var_params and local_var_params['filter'] is not None: # noqa: E501 + query_params.append(('filter', local_var_params['filter'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipelines', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiListPipelinesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/backend/api/python_http_client/kfp_server_api/api/pipeline_upload_service_api.py b/backend/api/python_http_client/kfp_server_api/api/pipeline_upload_service_api.py new file mode 100644 index 00000000000..6c1a53614e5 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/api/pipeline_upload_service_api.py @@ -0,0 +1,290 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kfp_server_api.api_client import ApiClient +from kfp_server_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PipelineUploadServiceApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def upload_pipeline(self, uploadfile, **kwargs): # noqa: E501 + """upload_pipeline # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_pipeline(uploadfile, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param file uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) + :param str name: + :param str description: + :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: ApiPipeline + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.upload_pipeline_with_http_info(uploadfile, **kwargs) # noqa: E501 + + def upload_pipeline_with_http_info(self, uploadfile, **kwargs): # noqa: E501 + """upload_pipeline # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_pipeline_with_http_info(uploadfile, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param file uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) + :param str name: + :param str description: + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiPipeline, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'uploadfile', + 'name', + 'description' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_pipeline" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'uploadfile' is set + if self.api_client.client_side_validation and ('uploadfile' not in local_var_params or # noqa: E501 + local_var_params['uploadfile'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `uploadfile` when calling `upload_pipeline`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + if 'uploadfile' in local_var_params: + local_var_files['uploadfile'] = local_var_params['uploadfile'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipelines/upload', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiPipeline', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def upload_pipeline_version(self, uploadfile, **kwargs): # noqa: E501 + """upload_pipeline_version # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_pipeline_version(uploadfile, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param file uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) + :param str name: + :param str pipelineid: + :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: ApiPipelineVersion + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.upload_pipeline_version_with_http_info(uploadfile, **kwargs) # noqa: E501 + + def upload_pipeline_version_with_http_info(self, uploadfile, **kwargs): # noqa: E501 + """upload_pipeline_version # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_pipeline_version_with_http_info(uploadfile, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param file uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) + :param str name: + :param str pipelineid: + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiPipelineVersion, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'uploadfile', + 'name', + 'pipelineid' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_pipeline_version" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'uploadfile' is set + if self.api_client.client_side_validation and ('uploadfile' not in local_var_params or # noqa: E501 + local_var_params['uploadfile'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `uploadfile` when calling `upload_pipeline_version`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'pipelineid' in local_var_params and local_var_params['pipelineid'] is not None: # noqa: E501 + query_params.append(('pipelineid', local_var_params['pipelineid'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + if 'uploadfile' in local_var_params: + local_var_files['uploadfile'] = local_var_params['uploadfile'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/pipelines/upload_version', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiPipelineVersion', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/backend/api/python_http_client/kfp_server_api/api/run_service_api.py b/backend/api/python_http_client/kfp_server_api/api/run_service_api.py new file mode 100644 index 00000000000..145913f66d3 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/api/run_service_api.py @@ -0,0 +1,1214 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kfp_server_api.api_client import ApiClient +from kfp_server_api.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class RunServiceApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def archive_run(self, id, **kwargs): # noqa: E501 + """Archives a run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.archive_run(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the run to be archived. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.archive_run_with_http_info(id, **kwargs) # noqa: E501 + + def archive_run_with_http_info(self, id, **kwargs): # noqa: E501 + """Archives a run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.archive_run_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the run to be archived. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method archive_run" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `archive_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs/{id}:archive', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_run(self, body, **kwargs): # noqa: E501 + """Creates a new run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_run(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiRun body: (required) + :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: ApiRunDetail + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_run_with_http_info(body, **kwargs) # noqa: E501 + + def create_run_with_http_info(self, body, **kwargs): # noqa: E501 + """Creates a new run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_run_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ApiRun body: (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiRunDetail, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_run" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiRunDetail', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_run(self, id, **kwargs): # noqa: E501 + """Deletes a run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_run(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the run to be deleted. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_run_with_http_info(id, **kwargs) # noqa: E501 + + def delete_run_with_http_info(self, id, **kwargs): # noqa: E501 + """Deletes a run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_run_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the run to be deleted. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_run" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `delete_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_run(self, run_id, **kwargs): # noqa: E501 + """Finds a specific run 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.get_run(run_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: The ID of the run to be retrieved. (required) + :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: ApiRunDetail + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_run_with_http_info(run_id, **kwargs) # noqa: E501 + + def get_run_with_http_info(self, run_id, **kwargs): # noqa: E501 + """Finds a specific run 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.get_run_with_http_info(run_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: The ID of the run to be retrieved. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiRunDetail, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'run_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_run" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'run_id' is set + if self.api_client.client_side_validation and ('run_id' not in local_var_params or # noqa: E501 + local_var_params['run_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_id` when calling `get_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'run_id' in local_var_params: + path_params['run_id'] = local_var_params['run_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs/{run_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiRunDetail', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_runs(self, **kwargs): # noqa: E501 + """Finds all runs. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_runs(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page. + :param int page_size: The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" (Example, \"name asc\" or \"id des\"). Ascending by default. + :param str resource_reference_key_type: The type of the resource that referred to. + :param str resource_reference_key_id: The ID of the resource that referred to. + :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + :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: ApiListRunsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_runs_with_http_info(**kwargs) # noqa: E501 + + def list_runs_with_http_info(self, **kwargs): # noqa: E501 + """Finds all runs. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_runs_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str page_token: A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page. + :param int page_size: The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + :param str sort_by: Can be format of \"field_name\", \"field_name asc\" or \"field_name des\" (Example, \"name asc\" or \"id des\"). Ascending by default. + :param str resource_reference_key_type: The type of the resource that referred to. + :param str resource_reference_key_id: The ID of the resource that referred to. + :param str filter: A url-encoded, JSON-serialized Filter protocol buffer (see [filter.proto](https://github.com/kubeflow/pipelines/ blob/master/backend/api/filter.proto)). + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiListRunsResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page_token', + 'page_size', + 'sort_by', + 'resource_reference_key_type', + 'resource_reference_key_id', + 'filter' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_runs" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_token' in local_var_params and local_var_params['page_token'] is not None: # noqa: E501 + query_params.append(('page_token', local_var_params['page_token'])) # noqa: E501 + if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 + query_params.append(('page_size', local_var_params['page_size'])) # noqa: E501 + if 'sort_by' in local_var_params and local_var_params['sort_by'] is not None: # noqa: E501 + query_params.append(('sort_by', local_var_params['sort_by'])) # noqa: E501 + if 'resource_reference_key_type' in local_var_params and local_var_params['resource_reference_key_type'] is not None: # noqa: E501 + query_params.append(('resource_reference_key.type', local_var_params['resource_reference_key_type'])) # noqa: E501 + if 'resource_reference_key_id' in local_var_params and local_var_params['resource_reference_key_id'] is not None: # noqa: E501 + query_params.append(('resource_reference_key.id', local_var_params['resource_reference_key_id'])) # noqa: E501 + if 'filter' in local_var_params and local_var_params['filter'] is not None: # noqa: E501 + query_params.append(('filter', local_var_params['filter'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiListRunsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def read_artifact(self, run_id, node_id, artifact_name, **kwargs): # noqa: E501 + """Finds a run's artifact data. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_artifact(run_id, node_id, artifact_name, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: The ID of the run. (required) + :param str node_id: The ID of the running node. (required) + :param str artifact_name: The name of the artifact. (required) + :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: ApiReadArtifactResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.read_artifact_with_http_info(run_id, node_id, artifact_name, **kwargs) # noqa: E501 + + def read_artifact_with_http_info(self, run_id, node_id, artifact_name, **kwargs): # noqa: E501 + """Finds a run's artifact data. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_artifact_with_http_info(run_id, node_id, artifact_name, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: The ID of the run. (required) + :param str node_id: The ID of the running node. (required) + :param str artifact_name: The name of the artifact. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiReadArtifactResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'run_id', + 'node_id', + 'artifact_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_artifact" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'run_id' is set + if self.api_client.client_side_validation and ('run_id' not in local_var_params or # noqa: E501 + local_var_params['run_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_id` when calling `read_artifact`") # noqa: E501 + # verify the required parameter 'node_id' is set + if self.api_client.client_side_validation and ('node_id' not in local_var_params or # noqa: E501 + local_var_params['node_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `node_id` when calling `read_artifact`") # noqa: E501 + # verify the required parameter 'artifact_name' is set + if self.api_client.client_side_validation and ('artifact_name' not in local_var_params or # noqa: E501 + local_var_params['artifact_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `artifact_name` when calling `read_artifact`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'run_id' in local_var_params: + path_params['run_id'] = local_var_params['run_id'] # noqa: E501 + if 'node_id' in local_var_params: + path_params['node_id'] = local_var_params['node_id'] # noqa: E501 + if 'artifact_name' in local_var_params: + path_params['artifact_name'] = local_var_params['artifact_name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiReadArtifactResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def report_run_metrics(self, run_id, body, **kwargs): # noqa: E501 + """ReportRunMetrics reports metrics of a run. Each metric is reported in its own transaction, so this API accepts partial failures. Metric can be uniquely identified by (run_id, node_id, name). Duplicate reporting will be ignored by the API. First reporting wins. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.report_run_metrics(run_id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: Required. The parent run ID of the metric. (required) + :param ApiReportRunMetricsRequest body: (required) + :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: ApiReportRunMetricsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.report_run_metrics_with_http_info(run_id, body, **kwargs) # noqa: E501 + + def report_run_metrics_with_http_info(self, run_id, body, **kwargs): # noqa: E501 + """ReportRunMetrics reports metrics of a run. Each metric is reported in its own transaction, so this API accepts partial failures. Metric can be uniquely identified by (run_id, node_id, name). Duplicate reporting will be ignored by the API. First reporting wins. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.report_run_metrics_with_http_info(run_id, body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: Required. The parent run ID of the metric. (required) + :param ApiReportRunMetricsRequest body: (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(ApiReportRunMetricsResponse, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'run_id', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method report_run_metrics" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'run_id' is set + if self.api_client.client_side_validation and ('run_id' not in local_var_params or # noqa: E501 + local_var_params['run_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_id` when calling `report_run_metrics`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `report_run_metrics`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'run_id' in local_var_params: + path_params['run_id'] = local_var_params['run_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs/{run_id}:reportMetrics', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiReportRunMetricsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def retry_run(self, run_id, **kwargs): # noqa: E501 + """Re-initiates a failed or terminated run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.retry_run(run_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: The ID of the run to be retried. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.retry_run_with_http_info(run_id, **kwargs) # noqa: E501 + + def retry_run_with_http_info(self, run_id, **kwargs): # noqa: E501 + """Re-initiates a failed or terminated run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.retry_run_with_http_info(run_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: The ID of the run to be retried. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'run_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method retry_run" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'run_id' is set + if self.api_client.client_side_validation and ('run_id' not in local_var_params or # noqa: E501 + local_var_params['run_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_id` when calling `retry_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'run_id' in local_var_params: + path_params['run_id'] = local_var_params['run_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs/{run_id}/retry', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def terminate_run(self, run_id, **kwargs): # noqa: E501 + """Terminates an active run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.terminate_run(run_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: The ID of the run to be terminated. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.terminate_run_with_http_info(run_id, **kwargs) # noqa: E501 + + def terminate_run_with_http_info(self, run_id, **kwargs): # noqa: E501 + """Terminates an active run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.terminate_run_with_http_info(run_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str run_id: The ID of the run to be terminated. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'run_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method terminate_run" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'run_id' is set + if self.api_client.client_side_validation and ('run_id' not in local_var_params or # noqa: E501 + local_var_params['run_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_id` when calling `terminate_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'run_id' in local_var_params: + path_params['run_id'] = local_var_params['run_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs/{run_id}/terminate', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def unarchive_run(self, id, **kwargs): # noqa: E501 + """Restores an archived run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_run(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the run to be restored. (required) + :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: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.unarchive_run_with_http_info(id, **kwargs) # noqa: E501 + + def unarchive_run_with_http_info(self, id, **kwargs): # noqa: E501 + """Restores an archived run. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unarchive_run_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: The ID of the run to be restored. (required) + :param _return_http_data_only: response data without head status code + and headers + :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: tuple(object, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method unarchive_run" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `unarchive_run`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['Bearer'] # noqa: E501 + + return self.api_client.call_api( + '/apis/v1beta1/runs/{id}:unarchive', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/backend/api/python_http_client/kfp_server_api/api_client.py b/backend/api/python_http_client/kfp_server_api/api_client.py new file mode 100644 index 00000000000..0dfcb8a940b --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/api_client.py @@ -0,0 +1,667 @@ +# coding: utf-8 +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + +from __future__ import absolute_import + +import atexit +import datetime +from dateutil.parser import parse +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 kfp_server_api.configuration import Configuration +import kfp_server_api.models +from kfp_server_api import rest +from kfp_server_api.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI 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 OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + 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 + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + 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, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + if configuration is None: + configuration = Configuration.get_default_copy() + self.configuration = configuration + self.pool_threads = pool_threads + + 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 = 'OpenAPI-Generator/1.0.0-dev.1/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + 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, _host=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 = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + try: + # 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) + except ApiException as e: + e.body = e.body.decode('utf-8') if six.PY3 else e.body + raise e + + content_type = response_data.getheader('content-type') + + self.last_response = response_data + + return_data = response_data + + if not _preload_content: + return return_data + + if six.PY3 and response_type not in ["file", "bytes"]: + match = None + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # 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 OpenAPI 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 `openapi_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.openapi_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(kfp_server_api.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_datetime(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, _host=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req 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, _host) + + return 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, + _host)) + + 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, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + 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 ApiValueError( + "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 files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + 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 auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + 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 ApiValueError( + '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, "wb") 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 an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + 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_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + 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 __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + has_discriminator = False + if (hasattr(klass, 'get_real_child_model') + and klass.discriminator_value_class_map): + has_discriminator = True + + if not klass.openapi_types and has_discriminator is False: + return data + + kwargs = {} + if (data is not None and + klass.openapi_types is not None and + isinstance(data, (list, dict))): + for attr, attr_type in six.iteritems(klass.openapi_types): + if klass.attribute_map[attr] in data: + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if has_discriminator: + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/backend/api/python_http_client/kfp_server_api/configuration.py b/backend/api/python_http_client/kfp_server_api/configuration.py new file mode 100644 index 00000000000..049aa811eae --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/configuration.py @@ -0,0 +1,404 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +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 OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = kfp_server_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + """ + + _default = None + + def __init__(self, host="http://localhost", + api_key=None, api_key_prefix=None, + username=None, password=None, + discard_unknown_keys=False, + ): + """Constructor + """ + self.host = host + """Default Base url + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("kfp_server_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """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.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Disable client side validation + self.client_side_validation = True + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() + + @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) + + @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 is not None: + 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. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if 'authorization' in self.api_key: + auth['Bearer'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'authorization', + 'value': self.get_api_key_with_prefix('authorization') + } + return auth + + 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.0.0-dev.1\n"\ + "SDK Package Version: 1.0.0-dev.1".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "/", + 'description': "No description provided", + } + ] + + def get_host_from_settings(self, index, variables=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :return: URL based on host settings + """ + variables = {} if variables is None else variables + servers = self.get_host_settings() + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server['variables'].items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url diff --git a/backend/api/python_http_client/kfp_server_api/exceptions.py b/backend/api/python_http_client/kfp_server_api/exceptions.py new file mode 100644 index 00000000000..9e5acc18e88 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/exceptions.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import six + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, six.integer_types): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/backend/api/python_http_client/kfp_server_api/models/__init__.py b/backend/api/python_http_client/kfp_server_api/models/__init__.py new file mode 100644 index 00000000000..519d1f5fd5c --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/__init__.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +# flake8: noqa +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +# import models into model package +from kfp_server_api.models.api_cron_schedule import ApiCronSchedule +from kfp_server_api.models.api_experiment import ApiExperiment +from kfp_server_api.models.api_get_template_response import ApiGetTemplateResponse +from kfp_server_api.models.api_job import ApiJob +from kfp_server_api.models.api_list_experiments_response import ApiListExperimentsResponse +from kfp_server_api.models.api_list_jobs_response import ApiListJobsResponse +from kfp_server_api.models.api_list_pipeline_versions_response import ApiListPipelineVersionsResponse +from kfp_server_api.models.api_list_pipelines_response import ApiListPipelinesResponse +from kfp_server_api.models.api_list_runs_response import ApiListRunsResponse +from kfp_server_api.models.api_parameter import ApiParameter +from kfp_server_api.models.api_periodic_schedule import ApiPeriodicSchedule +from kfp_server_api.models.api_pipeline import ApiPipeline +from kfp_server_api.models.api_pipeline_runtime import ApiPipelineRuntime +from kfp_server_api.models.api_pipeline_spec import ApiPipelineSpec +from kfp_server_api.models.api_pipeline_version import ApiPipelineVersion +from kfp_server_api.models.api_read_artifact_response import ApiReadArtifactResponse +from kfp_server_api.models.api_relationship import ApiRelationship +from kfp_server_api.models.api_report_run_metrics_request import ApiReportRunMetricsRequest +from kfp_server_api.models.api_report_run_metrics_response import ApiReportRunMetricsResponse +from kfp_server_api.models.api_resource_key import ApiResourceKey +from kfp_server_api.models.api_resource_reference import ApiResourceReference +from kfp_server_api.models.api_resource_type import ApiResourceType +from kfp_server_api.models.api_run import ApiRun +from kfp_server_api.models.api_run_detail import ApiRunDetail +from kfp_server_api.models.api_run_metric import ApiRunMetric +from kfp_server_api.models.api_status import ApiStatus +from kfp_server_api.models.api_trigger import ApiTrigger +from kfp_server_api.models.api_url import ApiUrl +from kfp_server_api.models.experiment_storage_state import ExperimentStorageState +from kfp_server_api.models.job_mode import JobMode +from kfp_server_api.models.protobuf_any import ProtobufAny +from kfp_server_api.models.report_run_metrics_response_report_run_metric_result import ReportRunMetricsResponseReportRunMetricResult +from kfp_server_api.models.report_run_metrics_response_report_run_metric_result_status import ReportRunMetricsResponseReportRunMetricResultStatus +from kfp_server_api.models.run_metric_format import RunMetricFormat +from kfp_server_api.models.run_storage_state import RunStorageState diff --git a/backend/api/python_http_client/kfp_server_api/models/api_cron_schedule.py b/backend/api/python_http_client/kfp_server_api/models/api_cron_schedule.py new file mode 100644 index 00000000000..90dab642ed8 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_cron_schedule.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiCronSchedule(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'start_time': 'datetime', + 'end_time': 'datetime', + 'cron': 'str' + } + + attribute_map = { + 'start_time': 'start_time', + 'end_time': 'end_time', + 'cron': 'cron' + } + + def __init__(self, start_time=None, end_time=None, cron=None, local_vars_configuration=None): # noqa: E501 + """ApiCronSchedule - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._start_time = None + self._end_time = None + self._cron = None + self.discriminator = None + + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if cron is not None: + self.cron = cron + + @property + def start_time(self): + """Gets the start_time of this ApiCronSchedule. # noqa: E501 + + + :return: The start_time of this ApiCronSchedule. # noqa: E501 + :rtype: datetime + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this ApiCronSchedule. + + + :param start_time: The start_time of this ApiCronSchedule. # noqa: E501 + :type: datetime + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this ApiCronSchedule. # noqa: E501 + + + :return: The end_time of this ApiCronSchedule. # noqa: E501 + :rtype: datetime + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this ApiCronSchedule. + + + :param end_time: The end_time of this ApiCronSchedule. # noqa: E501 + :type: datetime + """ + + self._end_time = end_time + + @property + def cron(self): + """Gets the cron of this ApiCronSchedule. # noqa: E501 + + + :return: The cron of this ApiCronSchedule. # noqa: E501 + :rtype: str + """ + return self._cron + + @cron.setter + def cron(self, cron): + """Sets the cron of this ApiCronSchedule. + + + :param cron: The cron of this ApiCronSchedule. # noqa: E501 + :type: str + """ + + self._cron = cron + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiCronSchedule): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiCronSchedule): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_experiment.py b/backend/api/python_http_client/kfp_server_api/models/api_experiment.py new file mode 100644 index 00000000000..b37533165ff --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_experiment.py @@ -0,0 +1,259 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiExperiment(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'description': 'str', + 'created_at': 'datetime', + 'resource_references': 'list[ApiResourceReference]', + 'storage_state': 'ExperimentStorageState' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'description': 'description', + 'created_at': 'created_at', + 'resource_references': 'resource_references', + 'storage_state': 'storage_state' + } + + def __init__(self, id=None, name=None, description=None, created_at=None, resource_references=None, storage_state=None, local_vars_configuration=None): # noqa: E501 + """ApiExperiment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._name = None + self._description = None + self._created_at = None + self._resource_references = None + self._storage_state = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if description is not None: + self.description = description + if created_at is not None: + self.created_at = created_at + if resource_references is not None: + self.resource_references = resource_references + if storage_state is not None: + self.storage_state = storage_state + + @property + def id(self): + """Gets the id of this ApiExperiment. # noqa: E501 + + Output. Unique experiment ID. Generated by API server. # noqa: E501 + + :return: The id of this ApiExperiment. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiExperiment. + + Output. Unique experiment ID. Generated by API server. # noqa: E501 + + :param id: The id of this ApiExperiment. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ApiExperiment. # noqa: E501 + + Required input field. Unique experiment name provided by user. # noqa: E501 + + :return: The name of this ApiExperiment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ApiExperiment. + + Required input field. Unique experiment name provided by user. # noqa: E501 + + :param name: The name of this ApiExperiment. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this ApiExperiment. # noqa: E501 + + + :return: The description of this ApiExperiment. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ApiExperiment. + + + :param description: The description of this ApiExperiment. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def created_at(self): + """Gets the created_at of this ApiExperiment. # noqa: E501 + + Output. The time that the experiment created. # noqa: E501 + + :return: The created_at of this ApiExperiment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ApiExperiment. + + Output. The time that the experiment created. # noqa: E501 + + :param created_at: The created_at of this ApiExperiment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def resource_references(self): + """Gets the resource_references of this ApiExperiment. # noqa: E501 + + Optional input field. Specify which resource this run belongs to. For Experiment, the only valid resource reference is a single Namespace. # noqa: E501 + + :return: The resource_references of this ApiExperiment. # noqa: E501 + :rtype: list[ApiResourceReference] + """ + return self._resource_references + + @resource_references.setter + def resource_references(self, resource_references): + """Sets the resource_references of this ApiExperiment. + + Optional input field. Specify which resource this run belongs to. For Experiment, the only valid resource reference is a single Namespace. # noqa: E501 + + :param resource_references: The resource_references of this ApiExperiment. # noqa: E501 + :type: list[ApiResourceReference] + """ + + self._resource_references = resource_references + + @property + def storage_state(self): + """Gets the storage_state of this ApiExperiment. # noqa: E501 + + + :return: The storage_state of this ApiExperiment. # noqa: E501 + :rtype: ExperimentStorageState + """ + return self._storage_state + + @storage_state.setter + def storage_state(self, storage_state): + """Sets the storage_state of this ApiExperiment. + + + :param storage_state: The storage_state of this ApiExperiment. # noqa: E501 + :type: ExperimentStorageState + """ + + self._storage_state = storage_state + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiExperiment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiExperiment): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_get_template_response.py b/backend/api/python_http_client/kfp_server_api/models/api_get_template_response.py new file mode 100644 index 00000000000..28f15c37330 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_get_template_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiGetTemplateResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'template': 'str' + } + + attribute_map = { + 'template': 'template' + } + + def __init__(self, template=None, local_vars_configuration=None): # noqa: E501 + """ApiGetTemplateResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._template = None + self.discriminator = None + + if template is not None: + self.template = template + + @property + def template(self): + """Gets the template of this ApiGetTemplateResponse. # noqa: E501 + + The template of the pipeline specified in a GetTemplate request, or of a pipeline version specified in a GetPipelinesVersionTemplate request. # noqa: E501 + + :return: The template of this ApiGetTemplateResponse. # noqa: E501 + :rtype: str + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this ApiGetTemplateResponse. + + The template of the pipeline specified in a GetTemplate request, or of a pipeline version specified in a GetPipelinesVersionTemplate request. # noqa: E501 + + :param template: The template of this ApiGetTemplateResponse. # noqa: E501 + :type: str + """ + + self._template = template + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiGetTemplateResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiGetTemplateResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_job.py b/backend/api/python_http_client/kfp_server_api/models/api_job.py new file mode 100644 index 00000000000..0b5663c7826 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_job.py @@ -0,0 +1,503 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiJob(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'description': 'str', + 'pipeline_spec': 'ApiPipelineSpec', + 'resource_references': 'list[ApiResourceReference]', + 'service_account': 'str', + 'max_concurrency': 'str', + 'trigger': 'ApiTrigger', + 'mode': 'JobMode', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'str', + 'error': 'str', + 'enabled': 'bool', + 'no_catchup': 'bool' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'description': 'description', + 'pipeline_spec': 'pipeline_spec', + 'resource_references': 'resource_references', + 'service_account': 'service_account', + 'max_concurrency': 'max_concurrency', + 'trigger': 'trigger', + 'mode': 'mode', + 'created_at': 'created_at', + 'updated_at': 'updated_at', + 'status': 'status', + 'error': 'error', + 'enabled': 'enabled', + 'no_catchup': 'no_catchup' + } + + def __init__(self, id=None, name=None, description=None, pipeline_spec=None, resource_references=None, service_account=None, max_concurrency=None, trigger=None, mode=None, created_at=None, updated_at=None, status=None, error=None, enabled=None, no_catchup=None, local_vars_configuration=None): # noqa: E501 + """ApiJob - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._name = None + self._description = None + self._pipeline_spec = None + self._resource_references = None + self._service_account = None + self._max_concurrency = None + self._trigger = None + self._mode = None + self._created_at = None + self._updated_at = None + self._status = None + self._error = None + self._enabled = None + self._no_catchup = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if description is not None: + self.description = description + if pipeline_spec is not None: + self.pipeline_spec = pipeline_spec + if resource_references is not None: + self.resource_references = resource_references + if service_account is not None: + self.service_account = service_account + if max_concurrency is not None: + self.max_concurrency = max_concurrency + if trigger is not None: + self.trigger = trigger + if mode is not None: + self.mode = mode + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at + if status is not None: + self.status = status + if error is not None: + self.error = error + if enabled is not None: + self.enabled = enabled + if no_catchup is not None: + self.no_catchup = no_catchup + + @property + def id(self): + """Gets the id of this ApiJob. # noqa: E501 + + Output. Unique run ID. Generated by API server. # noqa: E501 + + :return: The id of this ApiJob. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiJob. + + Output. Unique run ID. Generated by API server. # noqa: E501 + + :param id: The id of this ApiJob. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ApiJob. # noqa: E501 + + Required input field. Job name provided by user. Not unique. # noqa: E501 + + :return: The name of this ApiJob. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ApiJob. + + Required input field. Job name provided by user. Not unique. # noqa: E501 + + :param name: The name of this ApiJob. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this ApiJob. # noqa: E501 + + + :return: The description of this ApiJob. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ApiJob. + + + :param description: The description of this ApiJob. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def pipeline_spec(self): + """Gets the pipeline_spec of this ApiJob. # noqa: E501 + + + :return: The pipeline_spec of this ApiJob. # noqa: E501 + :rtype: ApiPipelineSpec + """ + return self._pipeline_spec + + @pipeline_spec.setter + def pipeline_spec(self, pipeline_spec): + """Sets the pipeline_spec of this ApiJob. + + + :param pipeline_spec: The pipeline_spec of this ApiJob. # noqa: E501 + :type: ApiPipelineSpec + """ + + self._pipeline_spec = pipeline_spec + + @property + def resource_references(self): + """Gets the resource_references of this ApiJob. # noqa: E501 + + Optional input field. Specify which resource this job belongs to. # noqa: E501 + + :return: The resource_references of this ApiJob. # noqa: E501 + :rtype: list[ApiResourceReference] + """ + return self._resource_references + + @resource_references.setter + def resource_references(self, resource_references): + """Sets the resource_references of this ApiJob. + + Optional input field. Specify which resource this job belongs to. # noqa: E501 + + :param resource_references: The resource_references of this ApiJob. # noqa: E501 + :type: list[ApiResourceReference] + """ + + self._resource_references = resource_references + + @property + def service_account(self): + """Gets the service_account of this ApiJob. # noqa: E501 + + Optional input field. Specify which Kubernetes service account this job uses. # noqa: E501 + + :return: The service_account of this ApiJob. # noqa: E501 + :rtype: str + """ + return self._service_account + + @service_account.setter + def service_account(self, service_account): + """Sets the service_account of this ApiJob. + + Optional input field. Specify which Kubernetes service account this job uses. # noqa: E501 + + :param service_account: The service_account of this ApiJob. # noqa: E501 + :type: str + """ + + self._service_account = service_account + + @property + def max_concurrency(self): + """Gets the max_concurrency of this ApiJob. # noqa: E501 + + + :return: The max_concurrency of this ApiJob. # noqa: E501 + :rtype: str + """ + return self._max_concurrency + + @max_concurrency.setter + def max_concurrency(self, max_concurrency): + """Sets the max_concurrency of this ApiJob. + + + :param max_concurrency: The max_concurrency of this ApiJob. # noqa: E501 + :type: str + """ + + self._max_concurrency = max_concurrency + + @property + def trigger(self): + """Gets the trigger of this ApiJob. # noqa: E501 + + + :return: The trigger of this ApiJob. # noqa: E501 + :rtype: ApiTrigger + """ + return self._trigger + + @trigger.setter + def trigger(self, trigger): + """Sets the trigger of this ApiJob. + + + :param trigger: The trigger of this ApiJob. # noqa: E501 + :type: ApiTrigger + """ + + self._trigger = trigger + + @property + def mode(self): + """Gets the mode of this ApiJob. # noqa: E501 + + + :return: The mode of this ApiJob. # noqa: E501 + :rtype: JobMode + """ + return self._mode + + @mode.setter + def mode(self, mode): + """Sets the mode of this ApiJob. + + + :param mode: The mode of this ApiJob. # noqa: E501 + :type: JobMode + """ + + self._mode = mode + + @property + def created_at(self): + """Gets the created_at of this ApiJob. # noqa: E501 + + Output. The time this job is created. # noqa: E501 + + :return: The created_at of this ApiJob. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ApiJob. + + Output. The time this job is created. # noqa: E501 + + :param created_at: The created_at of this ApiJob. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this ApiJob. # noqa: E501 + + Output. The last time this job is updated. # noqa: E501 + + :return: The updated_at of this ApiJob. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this ApiJob. + + Output. The last time this job is updated. # noqa: E501 + + :param updated_at: The updated_at of this ApiJob. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def status(self): + """Gets the status of this ApiJob. # noqa: E501 + + + :return: The status of this ApiJob. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ApiJob. + + + :param status: The status of this ApiJob. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def error(self): + """Gets the error of this ApiJob. # noqa: E501 + + In case any error happens retrieving a job field, only job ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call. # noqa: E501 + + :return: The error of this ApiJob. # noqa: E501 + :rtype: str + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this ApiJob. + + In case any error happens retrieving a job field, only job ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call. # noqa: E501 + + :param error: The error of this ApiJob. # noqa: E501 + :type: str + """ + + self._error = error + + @property + def enabled(self): + """Gets the enabled of this ApiJob. # noqa: E501 + + Input. Whether the job is enabled or not. # noqa: E501 + + :return: The enabled of this ApiJob. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this ApiJob. + + Input. Whether the job is enabled or not. # noqa: E501 + + :param enabled: The enabled of this ApiJob. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def no_catchup(self): + """Gets the no_catchup of this ApiJob. # noqa: E501 + + Optional input field. Whether the job should catch up if behind schedule. If true, the job will only schedule the latest interval if behind schedule. If false, the job will catch up on each past interval. # noqa: E501 + + :return: The no_catchup of this ApiJob. # noqa: E501 + :rtype: bool + """ + return self._no_catchup + + @no_catchup.setter + def no_catchup(self, no_catchup): + """Sets the no_catchup of this ApiJob. + + Optional input field. Whether the job should catch up if behind schedule. If true, the job will only schedule the latest interval if behind schedule. If false, the job will catch up on each past interval. # noqa: E501 + + :param no_catchup: The no_catchup of this ApiJob. # noqa: E501 + :type: bool + """ + + self._no_catchup = no_catchup + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiJob): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiJob): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_list_experiments_response.py b/backend/api/python_http_client/kfp_server_api/models/api_list_experiments_response.py new file mode 100644 index 00000000000..468bdf75b04 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_list_experiments_response.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiListExperimentsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'experiments': 'list[ApiExperiment]', + 'total_size': 'int', + 'next_page_token': 'str' + } + + attribute_map = { + 'experiments': 'experiments', + 'total_size': 'total_size', + 'next_page_token': 'next_page_token' + } + + def __init__(self, experiments=None, total_size=None, next_page_token=None, local_vars_configuration=None): # noqa: E501 + """ApiListExperimentsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._experiments = None + self._total_size = None + self._next_page_token = None + self.discriminator = None + + if experiments is not None: + self.experiments = experiments + if total_size is not None: + self.total_size = total_size + if next_page_token is not None: + self.next_page_token = next_page_token + + @property + def experiments(self): + """Gets the experiments of this ApiListExperimentsResponse. # noqa: E501 + + A list of experiments returned. # noqa: E501 + + :return: The experiments of this ApiListExperimentsResponse. # noqa: E501 + :rtype: list[ApiExperiment] + """ + return self._experiments + + @experiments.setter + def experiments(self, experiments): + """Sets the experiments of this ApiListExperimentsResponse. + + A list of experiments returned. # noqa: E501 + + :param experiments: The experiments of this ApiListExperimentsResponse. # noqa: E501 + :type: list[ApiExperiment] + """ + + self._experiments = experiments + + @property + def total_size(self): + """Gets the total_size of this ApiListExperimentsResponse. # noqa: E501 + + The total number of experiments for the given query. # noqa: E501 + + :return: The total_size of this ApiListExperimentsResponse. # noqa: E501 + :rtype: int + """ + return self._total_size + + @total_size.setter + def total_size(self, total_size): + """Sets the total_size of this ApiListExperimentsResponse. + + The total number of experiments for the given query. # noqa: E501 + + :param total_size: The total_size of this ApiListExperimentsResponse. # noqa: E501 + :type: int + """ + + self._total_size = total_size + + @property + def next_page_token(self): + """Gets the next_page_token of this ApiListExperimentsResponse. # noqa: E501 + + The token to list the next page of experiments. # noqa: E501 + + :return: The next_page_token of this ApiListExperimentsResponse. # noqa: E501 + :rtype: str + """ + return self._next_page_token + + @next_page_token.setter + def next_page_token(self, next_page_token): + """Sets the next_page_token of this ApiListExperimentsResponse. + + The token to list the next page of experiments. # noqa: E501 + + :param next_page_token: The next_page_token of this ApiListExperimentsResponse. # noqa: E501 + :type: str + """ + + self._next_page_token = next_page_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiListExperimentsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiListExperimentsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_list_jobs_response.py b/backend/api/python_http_client/kfp_server_api/models/api_list_jobs_response.py new file mode 100644 index 00000000000..d198488ffa4 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_list_jobs_response.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiListJobsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'jobs': 'list[ApiJob]', + 'total_size': 'int', + 'next_page_token': 'str' + } + + attribute_map = { + 'jobs': 'jobs', + 'total_size': 'total_size', + 'next_page_token': 'next_page_token' + } + + def __init__(self, jobs=None, total_size=None, next_page_token=None, local_vars_configuration=None): # noqa: E501 + """ApiListJobsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._jobs = None + self._total_size = None + self._next_page_token = None + self.discriminator = None + + if jobs is not None: + self.jobs = jobs + if total_size is not None: + self.total_size = total_size + if next_page_token is not None: + self.next_page_token = next_page_token + + @property + def jobs(self): + """Gets the jobs of this ApiListJobsResponse. # noqa: E501 + + A list of jobs returned. # noqa: E501 + + :return: The jobs of this ApiListJobsResponse. # noqa: E501 + :rtype: list[ApiJob] + """ + return self._jobs + + @jobs.setter + def jobs(self, jobs): + """Sets the jobs of this ApiListJobsResponse. + + A list of jobs returned. # noqa: E501 + + :param jobs: The jobs of this ApiListJobsResponse. # noqa: E501 + :type: list[ApiJob] + """ + + self._jobs = jobs + + @property + def total_size(self): + """Gets the total_size of this ApiListJobsResponse. # noqa: E501 + + The total number of jobs for the given query. # noqa: E501 + + :return: The total_size of this ApiListJobsResponse. # noqa: E501 + :rtype: int + """ + return self._total_size + + @total_size.setter + def total_size(self, total_size): + """Sets the total_size of this ApiListJobsResponse. + + The total number of jobs for the given query. # noqa: E501 + + :param total_size: The total_size of this ApiListJobsResponse. # noqa: E501 + :type: int + """ + + self._total_size = total_size + + @property + def next_page_token(self): + """Gets the next_page_token of this ApiListJobsResponse. # noqa: E501 + + The token to list the next page of jobs. # noqa: E501 + + :return: The next_page_token of this ApiListJobsResponse. # noqa: E501 + :rtype: str + """ + return self._next_page_token + + @next_page_token.setter + def next_page_token(self, next_page_token): + """Sets the next_page_token of this ApiListJobsResponse. + + The token to list the next page of jobs. # noqa: E501 + + :param next_page_token: The next_page_token of this ApiListJobsResponse. # noqa: E501 + :type: str + """ + + self._next_page_token = next_page_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiListJobsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiListJobsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_list_pipeline_versions_response.py b/backend/api/python_http_client/kfp_server_api/models/api_list_pipeline_versions_response.py new file mode 100644 index 00000000000..43de7a5ae56 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_list_pipeline_versions_response.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiListPipelineVersionsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'versions': 'list[ApiPipelineVersion]', + 'next_page_token': 'str', + 'total_size': 'int' + } + + attribute_map = { + 'versions': 'versions', + 'next_page_token': 'next_page_token', + 'total_size': 'total_size' + } + + def __init__(self, versions=None, next_page_token=None, total_size=None, local_vars_configuration=None): # noqa: E501 + """ApiListPipelineVersionsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._versions = None + self._next_page_token = None + self._total_size = None + self.discriminator = None + + if versions is not None: + self.versions = versions + if next_page_token is not None: + self.next_page_token = next_page_token + if total_size is not None: + self.total_size = total_size + + @property + def versions(self): + """Gets the versions of this ApiListPipelineVersionsResponse. # noqa: E501 + + + :return: The versions of this ApiListPipelineVersionsResponse. # noqa: E501 + :rtype: list[ApiPipelineVersion] + """ + return self._versions + + @versions.setter + def versions(self, versions): + """Sets the versions of this ApiListPipelineVersionsResponse. + + + :param versions: The versions of this ApiListPipelineVersionsResponse. # noqa: E501 + :type: list[ApiPipelineVersion] + """ + + self._versions = versions + + @property + def next_page_token(self): + """Gets the next_page_token of this ApiListPipelineVersionsResponse. # noqa: E501 + + The token to list the next page of pipeline versions. # noqa: E501 + + :return: The next_page_token of this ApiListPipelineVersionsResponse. # noqa: E501 + :rtype: str + """ + return self._next_page_token + + @next_page_token.setter + def next_page_token(self, next_page_token): + """Sets the next_page_token of this ApiListPipelineVersionsResponse. + + The token to list the next page of pipeline versions. # noqa: E501 + + :param next_page_token: The next_page_token of this ApiListPipelineVersionsResponse. # noqa: E501 + :type: str + """ + + self._next_page_token = next_page_token + + @property + def total_size(self): + """Gets the total_size of this ApiListPipelineVersionsResponse. # noqa: E501 + + The total number of pipeline versions for the given query. # noqa: E501 + + :return: The total_size of this ApiListPipelineVersionsResponse. # noqa: E501 + :rtype: int + """ + return self._total_size + + @total_size.setter + def total_size(self, total_size): + """Sets the total_size of this ApiListPipelineVersionsResponse. + + The total number of pipeline versions for the given query. # noqa: E501 + + :param total_size: The total_size of this ApiListPipelineVersionsResponse. # noqa: E501 + :type: int + """ + + self._total_size = total_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiListPipelineVersionsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiListPipelineVersionsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_list_pipelines_response.py b/backend/api/python_http_client/kfp_server_api/models/api_list_pipelines_response.py new file mode 100644 index 00000000000..1dfa4b03e2f --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_list_pipelines_response.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiListPipelinesResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pipelines': 'list[ApiPipeline]', + 'total_size': 'int', + 'next_page_token': 'str' + } + + attribute_map = { + 'pipelines': 'pipelines', + 'total_size': 'total_size', + 'next_page_token': 'next_page_token' + } + + def __init__(self, pipelines=None, total_size=None, next_page_token=None, local_vars_configuration=None): # noqa: E501 + """ApiListPipelinesResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._pipelines = None + self._total_size = None + self._next_page_token = None + self.discriminator = None + + if pipelines is not None: + self.pipelines = pipelines + if total_size is not None: + self.total_size = total_size + if next_page_token is not None: + self.next_page_token = next_page_token + + @property + def pipelines(self): + """Gets the pipelines of this ApiListPipelinesResponse. # noqa: E501 + + + :return: The pipelines of this ApiListPipelinesResponse. # noqa: E501 + :rtype: list[ApiPipeline] + """ + return self._pipelines + + @pipelines.setter + def pipelines(self, pipelines): + """Sets the pipelines of this ApiListPipelinesResponse. + + + :param pipelines: The pipelines of this ApiListPipelinesResponse. # noqa: E501 + :type: list[ApiPipeline] + """ + + self._pipelines = pipelines + + @property + def total_size(self): + """Gets the total_size of this ApiListPipelinesResponse. # noqa: E501 + + The total number of pipelines for the given query. # noqa: E501 + + :return: The total_size of this ApiListPipelinesResponse. # noqa: E501 + :rtype: int + """ + return self._total_size + + @total_size.setter + def total_size(self, total_size): + """Sets the total_size of this ApiListPipelinesResponse. + + The total number of pipelines for the given query. # noqa: E501 + + :param total_size: The total_size of this ApiListPipelinesResponse. # noqa: E501 + :type: int + """ + + self._total_size = total_size + + @property + def next_page_token(self): + """Gets the next_page_token of this ApiListPipelinesResponse. # noqa: E501 + + The token to list the next page of pipelines. # noqa: E501 + + :return: The next_page_token of this ApiListPipelinesResponse. # noqa: E501 + :rtype: str + """ + return self._next_page_token + + @next_page_token.setter + def next_page_token(self, next_page_token): + """Sets the next_page_token of this ApiListPipelinesResponse. + + The token to list the next page of pipelines. # noqa: E501 + + :param next_page_token: The next_page_token of this ApiListPipelinesResponse. # noqa: E501 + :type: str + """ + + self._next_page_token = next_page_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiListPipelinesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiListPipelinesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_list_runs_response.py b/backend/api/python_http_client/kfp_server_api/models/api_list_runs_response.py new file mode 100644 index 00000000000..78d66e649b9 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_list_runs_response.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiListRunsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'runs': 'list[ApiRun]', + 'total_size': 'int', + 'next_page_token': 'str' + } + + attribute_map = { + 'runs': 'runs', + 'total_size': 'total_size', + 'next_page_token': 'next_page_token' + } + + def __init__(self, runs=None, total_size=None, next_page_token=None, local_vars_configuration=None): # noqa: E501 + """ApiListRunsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._runs = None + self._total_size = None + self._next_page_token = None + self.discriminator = None + + if runs is not None: + self.runs = runs + if total_size is not None: + self.total_size = total_size + if next_page_token is not None: + self.next_page_token = next_page_token + + @property + def runs(self): + """Gets the runs of this ApiListRunsResponse. # noqa: E501 + + + :return: The runs of this ApiListRunsResponse. # noqa: E501 + :rtype: list[ApiRun] + """ + return self._runs + + @runs.setter + def runs(self, runs): + """Sets the runs of this ApiListRunsResponse. + + + :param runs: The runs of this ApiListRunsResponse. # noqa: E501 + :type: list[ApiRun] + """ + + self._runs = runs + + @property + def total_size(self): + """Gets the total_size of this ApiListRunsResponse. # noqa: E501 + + The total number of runs for the given query. # noqa: E501 + + :return: The total_size of this ApiListRunsResponse. # noqa: E501 + :rtype: int + """ + return self._total_size + + @total_size.setter + def total_size(self, total_size): + """Sets the total_size of this ApiListRunsResponse. + + The total number of runs for the given query. # noqa: E501 + + :param total_size: The total_size of this ApiListRunsResponse. # noqa: E501 + :type: int + """ + + self._total_size = total_size + + @property + def next_page_token(self): + """Gets the next_page_token of this ApiListRunsResponse. # noqa: E501 + + The token to list the next page of runs. # noqa: E501 + + :return: The next_page_token of this ApiListRunsResponse. # noqa: E501 + :rtype: str + """ + return self._next_page_token + + @next_page_token.setter + def next_page_token(self, next_page_token): + """Sets the next_page_token of this ApiListRunsResponse. + + The token to list the next page of runs. # noqa: E501 + + :param next_page_token: The next_page_token of this ApiListRunsResponse. # noqa: E501 + :type: str + """ + + self._next_page_token = next_page_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiListRunsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiListRunsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_parameter.py b/backend/api/python_http_client/kfp_server_api/models/api_parameter.py new file mode 100644 index 00000000000..e9c3adb0f0f --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_parameter.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiParameter(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """ApiParameter - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + if value is not None: + self.value = value + + @property + def name(self): + """Gets the name of this ApiParameter. # noqa: E501 + + + :return: The name of this ApiParameter. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ApiParameter. + + + :param name: The name of this ApiParameter. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this ApiParameter. # noqa: E501 + + + :return: The value of this ApiParameter. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this ApiParameter. + + + :param value: The value of this ApiParameter. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiParameter): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiParameter): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_periodic_schedule.py b/backend/api/python_http_client/kfp_server_api/models/api_periodic_schedule.py new file mode 100644 index 00000000000..c20f1f918df --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_periodic_schedule.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiPeriodicSchedule(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'start_time': 'datetime', + 'end_time': 'datetime', + 'interval_second': 'str' + } + + attribute_map = { + 'start_time': 'start_time', + 'end_time': 'end_time', + 'interval_second': 'interval_second' + } + + def __init__(self, start_time=None, end_time=None, interval_second=None, local_vars_configuration=None): # noqa: E501 + """ApiPeriodicSchedule - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._start_time = None + self._end_time = None + self._interval_second = None + self.discriminator = None + + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if interval_second is not None: + self.interval_second = interval_second + + @property + def start_time(self): + """Gets the start_time of this ApiPeriodicSchedule. # noqa: E501 + + + :return: The start_time of this ApiPeriodicSchedule. # noqa: E501 + :rtype: datetime + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this ApiPeriodicSchedule. + + + :param start_time: The start_time of this ApiPeriodicSchedule. # noqa: E501 + :type: datetime + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this ApiPeriodicSchedule. # noqa: E501 + + + :return: The end_time of this ApiPeriodicSchedule. # noqa: E501 + :rtype: datetime + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this ApiPeriodicSchedule. + + + :param end_time: The end_time of this ApiPeriodicSchedule. # noqa: E501 + :type: datetime + """ + + self._end_time = end_time + + @property + def interval_second(self): + """Gets the interval_second of this ApiPeriodicSchedule. # noqa: E501 + + + :return: The interval_second of this ApiPeriodicSchedule. # noqa: E501 + :rtype: str + """ + return self._interval_second + + @interval_second.setter + def interval_second(self, interval_second): + """Sets the interval_second of this ApiPeriodicSchedule. + + + :param interval_second: The interval_second of this ApiPeriodicSchedule. # noqa: E501 + :type: str + """ + + self._interval_second = interval_second + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiPeriodicSchedule): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiPeriodicSchedule): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_pipeline.py b/backend/api/python_http_client/kfp_server_api/models/api_pipeline.py new file mode 100644 index 00000000000..ec53d0cc2e1 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_pipeline.py @@ -0,0 +1,315 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiPipeline(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'created_at': 'datetime', + 'name': 'str', + 'description': 'str', + 'parameters': 'list[ApiParameter]', + 'url': 'ApiUrl', + 'error': 'str', + 'default_version': 'ApiPipelineVersion' + } + + attribute_map = { + 'id': 'id', + 'created_at': 'created_at', + 'name': 'name', + 'description': 'description', + 'parameters': 'parameters', + 'url': 'url', + 'error': 'error', + 'default_version': 'default_version' + } + + def __init__(self, id=None, created_at=None, name=None, description=None, parameters=None, url=None, error=None, default_version=None, local_vars_configuration=None): # noqa: E501 + """ApiPipeline - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._created_at = None + self._name = None + self._description = None + self._parameters = None + self._url = None + self._error = None + self._default_version = None + self.discriminator = None + + if id is not None: + self.id = id + if created_at is not None: + self.created_at = created_at + if name is not None: + self.name = name + if description is not None: + self.description = description + if parameters is not None: + self.parameters = parameters + if url is not None: + self.url = url + if error is not None: + self.error = error + if default_version is not None: + self.default_version = default_version + + @property + def id(self): + """Gets the id of this ApiPipeline. # noqa: E501 + + Output. Unique pipeline ID. Generated by API server. # noqa: E501 + + :return: The id of this ApiPipeline. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiPipeline. + + Output. Unique pipeline ID. Generated by API server. # noqa: E501 + + :param id: The id of this ApiPipeline. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def created_at(self): + """Gets the created_at of this ApiPipeline. # noqa: E501 + + Output. The time this pipeline is created. # noqa: E501 + + :return: The created_at of this ApiPipeline. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ApiPipeline. + + Output. The time this pipeline is created. # noqa: E501 + + :param created_at: The created_at of this ApiPipeline. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def name(self): + """Gets the name of this ApiPipeline. # noqa: E501 + + Optional input field. Pipeline name provided by user. If not specified, file name is used as pipeline name. # noqa: E501 + + :return: The name of this ApiPipeline. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ApiPipeline. + + Optional input field. Pipeline name provided by user. If not specified, file name is used as pipeline name. # noqa: E501 + + :param name: The name of this ApiPipeline. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this ApiPipeline. # noqa: E501 + + Optional input field. Describing the purpose of the job. # noqa: E501 + + :return: The description of this ApiPipeline. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ApiPipeline. + + Optional input field. Describing the purpose of the job. # noqa: E501 + + :param description: The description of this ApiPipeline. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def parameters(self): + """Gets the parameters of this ApiPipeline. # noqa: E501 + + Output. The input parameters for this pipeline. TODO(jingzhang36): replace this parameters field with the parameters field inside PipelineVersion when all usage of the former has been changed to use the latter. # noqa: E501 + + :return: The parameters of this ApiPipeline. # noqa: E501 + :rtype: list[ApiParameter] + """ + return self._parameters + + @parameters.setter + def parameters(self, parameters): + """Sets the parameters of this ApiPipeline. + + Output. The input parameters for this pipeline. TODO(jingzhang36): replace this parameters field with the parameters field inside PipelineVersion when all usage of the former has been changed to use the latter. # noqa: E501 + + :param parameters: The parameters of this ApiPipeline. # noqa: E501 + :type: list[ApiParameter] + """ + + self._parameters = parameters + + @property + def url(self): + """Gets the url of this ApiPipeline. # noqa: E501 + + + :return: The url of this ApiPipeline. # noqa: E501 + :rtype: ApiUrl + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ApiPipeline. + + + :param url: The url of this ApiPipeline. # noqa: E501 + :type: ApiUrl + """ + + self._url = url + + @property + def error(self): + """Gets the error of this ApiPipeline. # noqa: E501 + + In case any error happens retrieving a pipeline field, only pipeline ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call. # noqa: E501 + + :return: The error of this ApiPipeline. # noqa: E501 + :rtype: str + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this ApiPipeline. + + In case any error happens retrieving a pipeline field, only pipeline ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call. # noqa: E501 + + :param error: The error of this ApiPipeline. # noqa: E501 + :type: str + """ + + self._error = error + + @property + def default_version(self): + """Gets the default_version of this ApiPipeline. # noqa: E501 + + + :return: The default_version of this ApiPipeline. # noqa: E501 + :rtype: ApiPipelineVersion + """ + return self._default_version + + @default_version.setter + def default_version(self, default_version): + """Sets the default_version of this ApiPipeline. + + + :param default_version: The default_version of this ApiPipeline. # noqa: E501 + :type: ApiPipelineVersion + """ + + self._default_version = default_version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiPipeline): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiPipeline): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_pipeline_runtime.py b/backend/api/python_http_client/kfp_server_api/models/api_pipeline_runtime.py new file mode 100644 index 00000000000..ee99b6d4c45 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_pipeline_runtime.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiPipelineRuntime(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pipeline_manifest': 'str', + 'workflow_manifest': 'str' + } + + attribute_map = { + 'pipeline_manifest': 'pipeline_manifest', + 'workflow_manifest': 'workflow_manifest' + } + + def __init__(self, pipeline_manifest=None, workflow_manifest=None, local_vars_configuration=None): # noqa: E501 + """ApiPipelineRuntime - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._pipeline_manifest = None + self._workflow_manifest = None + self.discriminator = None + + if pipeline_manifest is not None: + self.pipeline_manifest = pipeline_manifest + if workflow_manifest is not None: + self.workflow_manifest = workflow_manifest + + @property + def pipeline_manifest(self): + """Gets the pipeline_manifest of this ApiPipelineRuntime. # noqa: E501 + + Output. The runtime JSON manifest of the pipeline, including the status of pipeline steps and fields need for UI visualization etc. # noqa: E501 + + :return: The pipeline_manifest of this ApiPipelineRuntime. # noqa: E501 + :rtype: str + """ + return self._pipeline_manifest + + @pipeline_manifest.setter + def pipeline_manifest(self, pipeline_manifest): + """Sets the pipeline_manifest of this ApiPipelineRuntime. + + Output. The runtime JSON manifest of the pipeline, including the status of pipeline steps and fields need for UI visualization etc. # noqa: E501 + + :param pipeline_manifest: The pipeline_manifest of this ApiPipelineRuntime. # noqa: E501 + :type: str + """ + + self._pipeline_manifest = pipeline_manifest + + @property + def workflow_manifest(self): + """Gets the workflow_manifest of this ApiPipelineRuntime. # noqa: E501 + + Output. The runtime JSON manifest of the argo workflow. This is deprecated after pipeline_runtime_manifest is in use. # noqa: E501 + + :return: The workflow_manifest of this ApiPipelineRuntime. # noqa: E501 + :rtype: str + """ + return self._workflow_manifest + + @workflow_manifest.setter + def workflow_manifest(self, workflow_manifest): + """Sets the workflow_manifest of this ApiPipelineRuntime. + + Output. The runtime JSON manifest of the argo workflow. This is deprecated after pipeline_runtime_manifest is in use. # noqa: E501 + + :param workflow_manifest: The workflow_manifest of this ApiPipelineRuntime. # noqa: E501 + :type: str + """ + + self._workflow_manifest = workflow_manifest + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiPipelineRuntime): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiPipelineRuntime): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_pipeline_spec.py b/backend/api/python_http_client/kfp_server_api/models/api_pipeline_spec.py new file mode 100644 index 00000000000..4583180dff8 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_pipeline_spec.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiPipelineSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pipeline_id': 'str', + 'pipeline_name': 'str', + 'workflow_manifest': 'str', + 'pipeline_manifest': 'str', + 'parameters': 'list[ApiParameter]' + } + + attribute_map = { + 'pipeline_id': 'pipeline_id', + 'pipeline_name': 'pipeline_name', + 'workflow_manifest': 'workflow_manifest', + 'pipeline_manifest': 'pipeline_manifest', + 'parameters': 'parameters' + } + + def __init__(self, pipeline_id=None, pipeline_name=None, workflow_manifest=None, pipeline_manifest=None, parameters=None, local_vars_configuration=None): # noqa: E501 + """ApiPipelineSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._pipeline_id = None + self._pipeline_name = None + self._workflow_manifest = None + self._pipeline_manifest = None + self._parameters = None + self.discriminator = None + + if pipeline_id is not None: + self.pipeline_id = pipeline_id + if pipeline_name is not None: + self.pipeline_name = pipeline_name + if workflow_manifest is not None: + self.workflow_manifest = workflow_manifest + if pipeline_manifest is not None: + self.pipeline_manifest = pipeline_manifest + if parameters is not None: + self.parameters = parameters + + @property + def pipeline_id(self): + """Gets the pipeline_id of this ApiPipelineSpec. # noqa: E501 + + Optional input field. The ID of the pipeline user uploaded before. # noqa: E501 + + :return: The pipeline_id of this ApiPipelineSpec. # noqa: E501 + :rtype: str + """ + return self._pipeline_id + + @pipeline_id.setter + def pipeline_id(self, pipeline_id): + """Sets the pipeline_id of this ApiPipelineSpec. + + Optional input field. The ID of the pipeline user uploaded before. # noqa: E501 + + :param pipeline_id: The pipeline_id of this ApiPipelineSpec. # noqa: E501 + :type: str + """ + + self._pipeline_id = pipeline_id + + @property + def pipeline_name(self): + """Gets the pipeline_name of this ApiPipelineSpec. # noqa: E501 + + Optional output field. The name of the pipeline. Not empty if the pipeline id is not empty. # noqa: E501 + + :return: The pipeline_name of this ApiPipelineSpec. # noqa: E501 + :rtype: str + """ + return self._pipeline_name + + @pipeline_name.setter + def pipeline_name(self, pipeline_name): + """Sets the pipeline_name of this ApiPipelineSpec. + + Optional output field. The name of the pipeline. Not empty if the pipeline id is not empty. # noqa: E501 + + :param pipeline_name: The pipeline_name of this ApiPipelineSpec. # noqa: E501 + :type: str + """ + + self._pipeline_name = pipeline_name + + @property + def workflow_manifest(self): + """Gets the workflow_manifest of this ApiPipelineSpec. # noqa: E501 + + Optional input field. The marshalled raw argo JSON workflow. This will be deprecated when pipeline_manifest is in use. # noqa: E501 + + :return: The workflow_manifest of this ApiPipelineSpec. # noqa: E501 + :rtype: str + """ + return self._workflow_manifest + + @workflow_manifest.setter + def workflow_manifest(self, workflow_manifest): + """Sets the workflow_manifest of this ApiPipelineSpec. + + Optional input field. The marshalled raw argo JSON workflow. This will be deprecated when pipeline_manifest is in use. # noqa: E501 + + :param workflow_manifest: The workflow_manifest of this ApiPipelineSpec. # noqa: E501 + :type: str + """ + + self._workflow_manifest = workflow_manifest + + @property + def pipeline_manifest(self): + """Gets the pipeline_manifest of this ApiPipelineSpec. # noqa: E501 + + Optional input field. The raw pipeline JSON spec. # noqa: E501 + + :return: The pipeline_manifest of this ApiPipelineSpec. # noqa: E501 + :rtype: str + """ + return self._pipeline_manifest + + @pipeline_manifest.setter + def pipeline_manifest(self, pipeline_manifest): + """Sets the pipeline_manifest of this ApiPipelineSpec. + + Optional input field. The raw pipeline JSON spec. # noqa: E501 + + :param pipeline_manifest: The pipeline_manifest of this ApiPipelineSpec. # noqa: E501 + :type: str + """ + + self._pipeline_manifest = pipeline_manifest + + @property + def parameters(self): + """Gets the parameters of this ApiPipelineSpec. # noqa: E501 + + The parameter user provide to inject to the pipeline JSON. If a default value of a parameter exist in the JSON, the value user provided here will replace. # noqa: E501 + + :return: The parameters of this ApiPipelineSpec. # noqa: E501 + :rtype: list[ApiParameter] + """ + return self._parameters + + @parameters.setter + def parameters(self, parameters): + """Sets the parameters of this ApiPipelineSpec. + + The parameter user provide to inject to the pipeline JSON. If a default value of a parameter exist in the JSON, the value user provided here will replace. # noqa: E501 + + :param parameters: The parameters of this ApiPipelineSpec. # noqa: E501 + :type: list[ApiParameter] + """ + + self._parameters = parameters + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiPipelineSpec): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiPipelineSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_pipeline_version.py b/backend/api/python_http_client/kfp_server_api/models/api_pipeline_version.py new file mode 100644 index 00000000000..3dd26e69bf1 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_pipeline_version.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiPipelineVersion(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'created_at': 'datetime', + 'parameters': 'list[ApiParameter]', + 'code_source_url': 'str', + 'package_url': 'ApiUrl', + 'resource_references': 'list[ApiResourceReference]' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'created_at': 'created_at', + 'parameters': 'parameters', + 'code_source_url': 'code_source_url', + 'package_url': 'package_url', + 'resource_references': 'resource_references' + } + + def __init__(self, id=None, name=None, created_at=None, parameters=None, code_source_url=None, package_url=None, resource_references=None, local_vars_configuration=None): # noqa: E501 + """ApiPipelineVersion - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._name = None + self._created_at = None + self._parameters = None + self._code_source_url = None + self._package_url = None + self._resource_references = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if created_at is not None: + self.created_at = created_at + if parameters is not None: + self.parameters = parameters + if code_source_url is not None: + self.code_source_url = code_source_url + if package_url is not None: + self.package_url = package_url + if resource_references is not None: + self.resource_references = resource_references + + @property + def id(self): + """Gets the id of this ApiPipelineVersion. # noqa: E501 + + Output. Unique version ID. Generated by API server. # noqa: E501 + + :return: The id of this ApiPipelineVersion. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiPipelineVersion. + + Output. Unique version ID. Generated by API server. # noqa: E501 + + :param id: The id of this ApiPipelineVersion. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ApiPipelineVersion. # noqa: E501 + + Optional input field. Version name provided by user. # noqa: E501 + + :return: The name of this ApiPipelineVersion. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ApiPipelineVersion. + + Optional input field. Version name provided by user. # noqa: E501 + + :param name: The name of this ApiPipelineVersion. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def created_at(self): + """Gets the created_at of this ApiPipelineVersion. # noqa: E501 + + Output. The time this pipeline version is created. # noqa: E501 + + :return: The created_at of this ApiPipelineVersion. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ApiPipelineVersion. + + Output. The time this pipeline version is created. # noqa: E501 + + :param created_at: The created_at of this ApiPipelineVersion. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def parameters(self): + """Gets the parameters of this ApiPipelineVersion. # noqa: E501 + + Output. The input parameters for this pipeline. # noqa: E501 + + :return: The parameters of this ApiPipelineVersion. # noqa: E501 + :rtype: list[ApiParameter] + """ + return self._parameters + + @parameters.setter + def parameters(self, parameters): + """Sets the parameters of this ApiPipelineVersion. + + Output. The input parameters for this pipeline. # noqa: E501 + + :param parameters: The parameters of this ApiPipelineVersion. # noqa: E501 + :type: list[ApiParameter] + """ + + self._parameters = parameters + + @property + def code_source_url(self): + """Gets the code_source_url of this ApiPipelineVersion. # noqa: E501 + + Input. Optional. Pipeline version code source. # noqa: E501 + + :return: The code_source_url of this ApiPipelineVersion. # noqa: E501 + :rtype: str + """ + return self._code_source_url + + @code_source_url.setter + def code_source_url(self, code_source_url): + """Sets the code_source_url of this ApiPipelineVersion. + + Input. Optional. Pipeline version code source. # noqa: E501 + + :param code_source_url: The code_source_url of this ApiPipelineVersion. # noqa: E501 + :type: str + """ + + self._code_source_url = code_source_url + + @property + def package_url(self): + """Gets the package_url of this ApiPipelineVersion. # noqa: E501 + + + :return: The package_url of this ApiPipelineVersion. # noqa: E501 + :rtype: ApiUrl + """ + return self._package_url + + @package_url.setter + def package_url(self, package_url): + """Sets the package_url of this ApiPipelineVersion. + + + :param package_url: The package_url of this ApiPipelineVersion. # noqa: E501 + :type: ApiUrl + """ + + self._package_url = package_url + + @property + def resource_references(self): + """Gets the resource_references of this ApiPipelineVersion. # noqa: E501 + + Input. Required. E.g., specify which pipeline this pipeline version belongs to. # noqa: E501 + + :return: The resource_references of this ApiPipelineVersion. # noqa: E501 + :rtype: list[ApiResourceReference] + """ + return self._resource_references + + @resource_references.setter + def resource_references(self, resource_references): + """Sets the resource_references of this ApiPipelineVersion. + + Input. Required. E.g., specify which pipeline this pipeline version belongs to. # noqa: E501 + + :param resource_references: The resource_references of this ApiPipelineVersion. # noqa: E501 + :type: list[ApiResourceReference] + """ + + self._resource_references = resource_references + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiPipelineVersion): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiPipelineVersion): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_read_artifact_response.py b/backend/api/python_http_client/kfp_server_api/models/api_read_artifact_response.py new file mode 100644 index 00000000000..86281b3a34a --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_read_artifact_response.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiReadArtifactResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'data': 'str' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """ApiReadArtifactResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this ApiReadArtifactResponse. # noqa: E501 + + The bytes of the artifact content. # noqa: E501 + + :return: The data of this ApiReadArtifactResponse. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiReadArtifactResponse. + + The bytes of the artifact content. # noqa: E501 + + :param data: The data of this ApiReadArtifactResponse. # noqa: E501 + :type: str + """ + if (self.local_vars_configuration.client_side_validation and + data is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', data)): # noqa: E501 + raise ValueError(r"Invalid value for `data`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiReadArtifactResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiReadArtifactResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_relationship.py b/backend/api/python_http_client/kfp_server_api/models/api_relationship.py new file mode 100644 index 00000000000..60d5f1fe59f --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_relationship.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiRelationship(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN_RELATIONSHIP = "UNKNOWN_RELATIONSHIP" + OWNER = "OWNER" + CREATOR = "CREATOR" + + allowable_values = [UNKNOWN_RELATIONSHIP, OWNER, CREATOR] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """ApiRelationship - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiRelationship): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiRelationship): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_report_run_metrics_request.py b/backend/api/python_http_client/kfp_server_api/models/api_report_run_metrics_request.py new file mode 100644 index 00000000000..b93bbbfac4d --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_report_run_metrics_request.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiReportRunMetricsRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'run_id': 'str', + 'metrics': 'list[ApiRunMetric]' + } + + attribute_map = { + 'run_id': 'run_id', + 'metrics': 'metrics' + } + + def __init__(self, run_id=None, metrics=None, local_vars_configuration=None): # noqa: E501 + """ApiReportRunMetricsRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._run_id = None + self._metrics = None + self.discriminator = None + + if run_id is not None: + self.run_id = run_id + if metrics is not None: + self.metrics = metrics + + @property + def run_id(self): + """Gets the run_id of this ApiReportRunMetricsRequest. # noqa: E501 + + Required. The parent run ID of the metric. # noqa: E501 + + :return: The run_id of this ApiReportRunMetricsRequest. # noqa: E501 + :rtype: str + """ + return self._run_id + + @run_id.setter + def run_id(self, run_id): + """Sets the run_id of this ApiReportRunMetricsRequest. + + Required. The parent run ID of the metric. # noqa: E501 + + :param run_id: The run_id of this ApiReportRunMetricsRequest. # noqa: E501 + :type: str + """ + + self._run_id = run_id + + @property + def metrics(self): + """Gets the metrics of this ApiReportRunMetricsRequest. # noqa: E501 + + List of metrics to report. # noqa: E501 + + :return: The metrics of this ApiReportRunMetricsRequest. # noqa: E501 + :rtype: list[ApiRunMetric] + """ + return self._metrics + + @metrics.setter + def metrics(self, metrics): + """Sets the metrics of this ApiReportRunMetricsRequest. + + List of metrics to report. # noqa: E501 + + :param metrics: The metrics of this ApiReportRunMetricsRequest. # noqa: E501 + :type: list[ApiRunMetric] + """ + + self._metrics = metrics + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiReportRunMetricsRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiReportRunMetricsRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_report_run_metrics_response.py b/backend/api/python_http_client/kfp_server_api/models/api_report_run_metrics_response.py new file mode 100644 index 00000000000..789c2279095 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_report_run_metrics_response.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiReportRunMetricsResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'results': 'list[ReportRunMetricsResponseReportRunMetricResult]' + } + + attribute_map = { + 'results': 'results' + } + + def __init__(self, results=None, local_vars_configuration=None): # noqa: E501 + """ApiReportRunMetricsResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._results = None + self.discriminator = None + + if results is not None: + self.results = results + + @property + def results(self): + """Gets the results of this ApiReportRunMetricsResponse. # noqa: E501 + + + :return: The results of this ApiReportRunMetricsResponse. # noqa: E501 + :rtype: list[ReportRunMetricsResponseReportRunMetricResult] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this ApiReportRunMetricsResponse. + + + :param results: The results of this ApiReportRunMetricsResponse. # noqa: E501 + :type: list[ReportRunMetricsResponseReportRunMetricResult] + """ + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiReportRunMetricsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiReportRunMetricsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_resource_key.py b/backend/api/python_http_client/kfp_server_api/models/api_resource_key.py new file mode 100644 index 00000000000..96fa5a6096e --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_resource_key.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiResourceKey(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'type': 'ApiResourceType', + 'id': 'str' + } + + attribute_map = { + 'type': 'type', + 'id': 'id' + } + + def __init__(self, type=None, id=None, local_vars_configuration=None): # noqa: E501 + """ApiResourceKey - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._type = None + self._id = None + self.discriminator = None + + if type is not None: + self.type = type + if id is not None: + self.id = id + + @property + def type(self): + """Gets the type of this ApiResourceKey. # noqa: E501 + + + :return: The type of this ApiResourceKey. # noqa: E501 + :rtype: ApiResourceType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ApiResourceKey. + + + :param type: The type of this ApiResourceKey. # noqa: E501 + :type: ApiResourceType + """ + + self._type = type + + @property + def id(self): + """Gets the id of this ApiResourceKey. # noqa: E501 + + The ID of the resource that referred to. # noqa: E501 + + :return: The id of this ApiResourceKey. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiResourceKey. + + The ID of the resource that referred to. # noqa: E501 + + :param id: The id of this ApiResourceKey. # noqa: E501 + :type: str + """ + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiResourceKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiResourceKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_resource_reference.py b/backend/api/python_http_client/kfp_server_api/models/api_resource_reference.py new file mode 100644 index 00000000000..8668edad87a --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_resource_reference.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiResourceReference(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'key': 'ApiResourceKey', + 'name': 'str', + 'relationship': 'ApiRelationship' + } + + attribute_map = { + 'key': 'key', + 'name': 'name', + 'relationship': 'relationship' + } + + def __init__(self, key=None, name=None, relationship=None, local_vars_configuration=None): # noqa: E501 + """ApiResourceReference - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._key = None + self._name = None + self._relationship = None + self.discriminator = None + + if key is not None: + self.key = key + if name is not None: + self.name = name + if relationship is not None: + self.relationship = relationship + + @property + def key(self): + """Gets the key of this ApiResourceReference. # noqa: E501 + + + :return: The key of this ApiResourceReference. # noqa: E501 + :rtype: ApiResourceKey + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this ApiResourceReference. + + + :param key: The key of this ApiResourceReference. # noqa: E501 + :type: ApiResourceKey + """ + + self._key = key + + @property + def name(self): + """Gets the name of this ApiResourceReference. # noqa: E501 + + The name of the resource that referred to. # noqa: E501 + + :return: The name of this ApiResourceReference. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ApiResourceReference. + + The name of the resource that referred to. # noqa: E501 + + :param name: The name of this ApiResourceReference. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def relationship(self): + """Gets the relationship of this ApiResourceReference. # noqa: E501 + + + :return: The relationship of this ApiResourceReference. # noqa: E501 + :rtype: ApiRelationship + """ + return self._relationship + + @relationship.setter + def relationship(self, relationship): + """Sets the relationship of this ApiResourceReference. + + + :param relationship: The relationship of this ApiResourceReference. # noqa: E501 + :type: ApiRelationship + """ + + self._relationship = relationship + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiResourceReference): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiResourceReference): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_resource_type.py b/backend/api/python_http_client/kfp_server_api/models/api_resource_type.py new file mode 100644 index 00000000000..269b9ca815b --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_resource_type.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiResourceType(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN_RESOURCE_TYPE = "UNKNOWN_RESOURCE_TYPE" + EXPERIMENT = "EXPERIMENT" + JOB = "JOB" + PIPELINE = "PIPELINE" + PIPELINE_VERSION = "PIPELINE_VERSION" + NAMESPACE = "NAMESPACE" + + allowable_values = [UNKNOWN_RESOURCE_TYPE, EXPERIMENT, JOB, PIPELINE, PIPELINE_VERSION, NAMESPACE] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """ApiResourceType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiResourceType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiResourceType): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_run.py b/backend/api/python_http_client/kfp_server_api/models/api_run.py new file mode 100644 index 00000000000..1065ab87e0d --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_run.py @@ -0,0 +1,451 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiRun(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'storage_state': 'RunStorageState', + 'description': 'str', + 'pipeline_spec': 'ApiPipelineSpec', + 'resource_references': 'list[ApiResourceReference]', + 'service_account': 'str', + 'created_at': 'datetime', + 'scheduled_at': 'datetime', + 'finished_at': 'datetime', + 'status': 'str', + 'error': 'str', + 'metrics': 'list[ApiRunMetric]' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'storage_state': 'storage_state', + 'description': 'description', + 'pipeline_spec': 'pipeline_spec', + 'resource_references': 'resource_references', + 'service_account': 'service_account', + 'created_at': 'created_at', + 'scheduled_at': 'scheduled_at', + 'finished_at': 'finished_at', + 'status': 'status', + 'error': 'error', + 'metrics': 'metrics' + } + + def __init__(self, id=None, name=None, storage_state=None, description=None, pipeline_spec=None, resource_references=None, service_account=None, created_at=None, scheduled_at=None, finished_at=None, status=None, error=None, metrics=None, local_vars_configuration=None): # noqa: E501 + """ApiRun - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._name = None + self._storage_state = None + self._description = None + self._pipeline_spec = None + self._resource_references = None + self._service_account = None + self._created_at = None + self._scheduled_at = None + self._finished_at = None + self._status = None + self._error = None + self._metrics = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if storage_state is not None: + self.storage_state = storage_state + if description is not None: + self.description = description + if pipeline_spec is not None: + self.pipeline_spec = pipeline_spec + if resource_references is not None: + self.resource_references = resource_references + if service_account is not None: + self.service_account = service_account + if created_at is not None: + self.created_at = created_at + if scheduled_at is not None: + self.scheduled_at = scheduled_at + if finished_at is not None: + self.finished_at = finished_at + if status is not None: + self.status = status + if error is not None: + self.error = error + if metrics is not None: + self.metrics = metrics + + @property + def id(self): + """Gets the id of this ApiRun. # noqa: E501 + + Output. Unique run ID. Generated by API server. # noqa: E501 + + :return: The id of this ApiRun. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiRun. + + Output. Unique run ID. Generated by API server. # noqa: E501 + + :param id: The id of this ApiRun. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ApiRun. # noqa: E501 + + Required input field. Name provided by user, or auto generated if run is created by scheduled job. Not unique. # noqa: E501 + + :return: The name of this ApiRun. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ApiRun. + + Required input field. Name provided by user, or auto generated if run is created by scheduled job. Not unique. # noqa: E501 + + :param name: The name of this ApiRun. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def storage_state(self): + """Gets the storage_state of this ApiRun. # noqa: E501 + + + :return: The storage_state of this ApiRun. # noqa: E501 + :rtype: RunStorageState + """ + return self._storage_state + + @storage_state.setter + def storage_state(self, storage_state): + """Sets the storage_state of this ApiRun. + + + :param storage_state: The storage_state of this ApiRun. # noqa: E501 + :type: RunStorageState + """ + + self._storage_state = storage_state + + @property + def description(self): + """Gets the description of this ApiRun. # noqa: E501 + + + :return: The description of this ApiRun. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ApiRun. + + + :param description: The description of this ApiRun. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def pipeline_spec(self): + """Gets the pipeline_spec of this ApiRun. # noqa: E501 + + + :return: The pipeline_spec of this ApiRun. # noqa: E501 + :rtype: ApiPipelineSpec + """ + return self._pipeline_spec + + @pipeline_spec.setter + def pipeline_spec(self, pipeline_spec): + """Sets the pipeline_spec of this ApiRun. + + + :param pipeline_spec: The pipeline_spec of this ApiRun. # noqa: E501 + :type: ApiPipelineSpec + """ + + self._pipeline_spec = pipeline_spec + + @property + def resource_references(self): + """Gets the resource_references of this ApiRun. # noqa: E501 + + Optional input field. Specify which resource this run belongs to. When creating a run from a particular pipeline version, the pipeline version can be specified here. # noqa: E501 + + :return: The resource_references of this ApiRun. # noqa: E501 + :rtype: list[ApiResourceReference] + """ + return self._resource_references + + @resource_references.setter + def resource_references(self, resource_references): + """Sets the resource_references of this ApiRun. + + Optional input field. Specify which resource this run belongs to. When creating a run from a particular pipeline version, the pipeline version can be specified here. # noqa: E501 + + :param resource_references: The resource_references of this ApiRun. # noqa: E501 + :type: list[ApiResourceReference] + """ + + self._resource_references = resource_references + + @property + def service_account(self): + """Gets the service_account of this ApiRun. # noqa: E501 + + Optional input field. Specify which Kubernetes service account this run uses. # noqa: E501 + + :return: The service_account of this ApiRun. # noqa: E501 + :rtype: str + """ + return self._service_account + + @service_account.setter + def service_account(self, service_account): + """Sets the service_account of this ApiRun. + + Optional input field. Specify which Kubernetes service account this run uses. # noqa: E501 + + :param service_account: The service_account of this ApiRun. # noqa: E501 + :type: str + """ + + self._service_account = service_account + + @property + def created_at(self): + """Gets the created_at of this ApiRun. # noqa: E501 + + Output. The time that the run created. # noqa: E501 + + :return: The created_at of this ApiRun. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ApiRun. + + Output. The time that the run created. # noqa: E501 + + :param created_at: The created_at of this ApiRun. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def scheduled_at(self): + """Gets the scheduled_at of this ApiRun. # noqa: E501 + + Output. When this run is scheduled to run. This could be different from created_at. For example, if a run is from a backfilling job that was supposed to run 2 month ago, the scheduled_at is 2 month ago, v.s. created_at is the current time. # noqa: E501 + + :return: The scheduled_at of this ApiRun. # noqa: E501 + :rtype: datetime + """ + return self._scheduled_at + + @scheduled_at.setter + def scheduled_at(self, scheduled_at): + """Sets the scheduled_at of this ApiRun. + + Output. When this run is scheduled to run. This could be different from created_at. For example, if a run is from a backfilling job that was supposed to run 2 month ago, the scheduled_at is 2 month ago, v.s. created_at is the current time. # noqa: E501 + + :param scheduled_at: The scheduled_at of this ApiRun. # noqa: E501 + :type: datetime + """ + + self._scheduled_at = scheduled_at + + @property + def finished_at(self): + """Gets the finished_at of this ApiRun. # noqa: E501 + + Output. The time this run is finished. # noqa: E501 + + :return: The finished_at of this ApiRun. # noqa: E501 + :rtype: datetime + """ + return self._finished_at + + @finished_at.setter + def finished_at(self, finished_at): + """Sets the finished_at of this ApiRun. + + Output. The time this run is finished. # noqa: E501 + + :param finished_at: The finished_at of this ApiRun. # noqa: E501 + :type: datetime + """ + + self._finished_at = finished_at + + @property + def status(self): + """Gets the status of this ApiRun. # noqa: E501 + + + :return: The status of this ApiRun. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ApiRun. + + + :param status: The status of this ApiRun. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def error(self): + """Gets the error of this ApiRun. # noqa: E501 + + In case any error happens retrieving a run field, only run ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call. # noqa: E501 + + :return: The error of this ApiRun. # noqa: E501 + :rtype: str + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this ApiRun. + + In case any error happens retrieving a run field, only run ID and the error message is returned. Client has the flexibility of choosing how to handle error. This is especially useful during listing call. # noqa: E501 + + :param error: The error of this ApiRun. # noqa: E501 + :type: str + """ + + self._error = error + + @property + def metrics(self): + """Gets the metrics of this ApiRun. # noqa: E501 + + Output. The metrics of the run. The metrics are reported by ReportMetrics API. # noqa: E501 + + :return: The metrics of this ApiRun. # noqa: E501 + :rtype: list[ApiRunMetric] + """ + return self._metrics + + @metrics.setter + def metrics(self, metrics): + """Sets the metrics of this ApiRun. + + Output. The metrics of the run. The metrics are reported by ReportMetrics API. # noqa: E501 + + :param metrics: The metrics of this ApiRun. # noqa: E501 + :type: list[ApiRunMetric] + """ + + self._metrics = metrics + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiRun): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiRun): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_run_detail.py b/backend/api/python_http_client/kfp_server_api/models/api_run_detail.py new file mode 100644 index 00000000000..448d6113f41 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_run_detail.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiRunDetail(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'run': 'ApiRun', + 'pipeline_runtime': 'ApiPipelineRuntime' + } + + attribute_map = { + 'run': 'run', + 'pipeline_runtime': 'pipeline_runtime' + } + + def __init__(self, run=None, pipeline_runtime=None, local_vars_configuration=None): # noqa: E501 + """ApiRunDetail - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._run = None + self._pipeline_runtime = None + self.discriminator = None + + if run is not None: + self.run = run + if pipeline_runtime is not None: + self.pipeline_runtime = pipeline_runtime + + @property + def run(self): + """Gets the run of this ApiRunDetail. # noqa: E501 + + + :return: The run of this ApiRunDetail. # noqa: E501 + :rtype: ApiRun + """ + return self._run + + @run.setter + def run(self, run): + """Sets the run of this ApiRunDetail. + + + :param run: The run of this ApiRunDetail. # noqa: E501 + :type: ApiRun + """ + + self._run = run + + @property + def pipeline_runtime(self): + """Gets the pipeline_runtime of this ApiRunDetail. # noqa: E501 + + + :return: The pipeline_runtime of this ApiRunDetail. # noqa: E501 + :rtype: ApiPipelineRuntime + """ + return self._pipeline_runtime + + @pipeline_runtime.setter + def pipeline_runtime(self, pipeline_runtime): + """Sets the pipeline_runtime of this ApiRunDetail. + + + :param pipeline_runtime: The pipeline_runtime of this ApiRunDetail. # noqa: E501 + :type: ApiPipelineRuntime + """ + + self._pipeline_runtime = pipeline_runtime + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiRunDetail): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiRunDetail): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_run_metric.py b/backend/api/python_http_client/kfp_server_api/models/api_run_metric.py new file mode 100644 index 00000000000..e9606aee780 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_run_metric.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiRunMetric(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'node_id': 'str', + 'number_value': 'float', + 'format': 'RunMetricFormat' + } + + attribute_map = { + 'name': 'name', + 'node_id': 'node_id', + 'number_value': 'number_value', + 'format': 'format' + } + + def __init__(self, name=None, node_id=None, number_value=None, format=None, local_vars_configuration=None): # noqa: E501 + """ApiRunMetric - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._node_id = None + self._number_value = None + self._format = None + self.discriminator = None + + if name is not None: + self.name = name + if node_id is not None: + self.node_id = node_id + if number_value is not None: + self.number_value = number_value + if format is not None: + self.format = format + + @property + def name(self): + """Gets the name of this ApiRunMetric. # noqa: E501 + + Required. The user defined name of the metric. It must between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. # noqa: E501 + + :return: The name of this ApiRunMetric. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ApiRunMetric. + + Required. The user defined name of the metric. It must between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. # noqa: E501 + + :param name: The name of this ApiRunMetric. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def node_id(self): + """Gets the node_id of this ApiRunMetric. # noqa: E501 + + Required. The runtime node ID which reports the metric. The node ID can be found in the RunDetail.workflow.Status. Metric with same (node_id, name) are considerd as duplicate. Only the first reporting will be recorded. Max length is 128. # noqa: E501 + + :return: The node_id of this ApiRunMetric. # noqa: E501 + :rtype: str + """ + return self._node_id + + @node_id.setter + def node_id(self, node_id): + """Sets the node_id of this ApiRunMetric. + + Required. The runtime node ID which reports the metric. The node ID can be found in the RunDetail.workflow.Status. Metric with same (node_id, name) are considerd as duplicate. Only the first reporting will be recorded. Max length is 128. # noqa: E501 + + :param node_id: The node_id of this ApiRunMetric. # noqa: E501 + :type: str + """ + + self._node_id = node_id + + @property + def number_value(self): + """Gets the number_value of this ApiRunMetric. # noqa: E501 + + The number value of the metric. # noqa: E501 + + :return: The number_value of this ApiRunMetric. # noqa: E501 + :rtype: float + """ + return self._number_value + + @number_value.setter + def number_value(self, number_value): + """Sets the number_value of this ApiRunMetric. + + The number value of the metric. # noqa: E501 + + :param number_value: The number_value of this ApiRunMetric. # noqa: E501 + :type: float + """ + + self._number_value = number_value + + @property + def format(self): + """Gets the format of this ApiRunMetric. # noqa: E501 + + + :return: The format of this ApiRunMetric. # noqa: E501 + :rtype: RunMetricFormat + """ + return self._format + + @format.setter + def format(self, format): + """Sets the format of this ApiRunMetric. + + + :param format: The format of this ApiRunMetric. # noqa: E501 + :type: RunMetricFormat + """ + + self._format = format + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiRunMetric): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiRunMetric): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_status.py b/backend/api/python_http_client/kfp_server_api/models/api_status.py new file mode 100644 index 00000000000..d8f8a422cb4 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_status.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'error': 'str', + 'code': 'int', + 'details': 'list[ProtobufAny]' + } + + attribute_map = { + 'error': 'error', + 'code': 'code', + 'details': 'details' + } + + def __init__(self, error=None, code=None, details=None, local_vars_configuration=None): # noqa: E501 + """ApiStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._error = None + self._code = None + self._details = None + self.discriminator = None + + if error is not None: + self.error = error + if code is not None: + self.code = code + if details is not None: + self.details = details + + @property + def error(self): + """Gets the error of this ApiStatus. # noqa: E501 + + + :return: The error of this ApiStatus. # noqa: E501 + :rtype: str + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this ApiStatus. + + + :param error: The error of this ApiStatus. # noqa: E501 + :type: str + """ + + self._error = error + + @property + def code(self): + """Gets the code of this ApiStatus. # noqa: E501 + + + :return: The code of this ApiStatus. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiStatus. + + + :param code: The code of this ApiStatus. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def details(self): + """Gets the details of this ApiStatus. # noqa: E501 + + + :return: The details of this ApiStatus. # noqa: E501 + :rtype: list[ProtobufAny] + """ + return self._details + + @details.setter + def details(self, details): + """Sets the details of this ApiStatus. + + + :param details: The details of this ApiStatus. # noqa: E501 + :type: list[ProtobufAny] + """ + + self._details = details + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_trigger.py b/backend/api/python_http_client/kfp_server_api/models/api_trigger.py new file mode 100644 index 00000000000..886b6fe32f4 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_trigger.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiTrigger(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'cron_schedule': 'ApiCronSchedule', + 'periodic_schedule': 'ApiPeriodicSchedule' + } + + attribute_map = { + 'cron_schedule': 'cron_schedule', + 'periodic_schedule': 'periodic_schedule' + } + + def __init__(self, cron_schedule=None, periodic_schedule=None, local_vars_configuration=None): # noqa: E501 + """ApiTrigger - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._cron_schedule = None + self._periodic_schedule = None + self.discriminator = None + + if cron_schedule is not None: + self.cron_schedule = cron_schedule + if periodic_schedule is not None: + self.periodic_schedule = periodic_schedule + + @property + def cron_schedule(self): + """Gets the cron_schedule of this ApiTrigger. # noqa: E501 + + + :return: The cron_schedule of this ApiTrigger. # noqa: E501 + :rtype: ApiCronSchedule + """ + return self._cron_schedule + + @cron_schedule.setter + def cron_schedule(self, cron_schedule): + """Sets the cron_schedule of this ApiTrigger. + + + :param cron_schedule: The cron_schedule of this ApiTrigger. # noqa: E501 + :type: ApiCronSchedule + """ + + self._cron_schedule = cron_schedule + + @property + def periodic_schedule(self): + """Gets the periodic_schedule of this ApiTrigger. # noqa: E501 + + + :return: The periodic_schedule of this ApiTrigger. # noqa: E501 + :rtype: ApiPeriodicSchedule + """ + return self._periodic_schedule + + @periodic_schedule.setter + def periodic_schedule(self, periodic_schedule): + """Sets the periodic_schedule of this ApiTrigger. + + + :param periodic_schedule: The periodic_schedule of this ApiTrigger. # noqa: E501 + :type: ApiPeriodicSchedule + """ + + self._periodic_schedule = periodic_schedule + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiTrigger): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiTrigger): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/api_url.py b/backend/api/python_http_client/kfp_server_api/models/api_url.py new file mode 100644 index 00000000000..7e46a43ff24 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/api_url.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ApiUrl(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pipeline_url': 'str' + } + + attribute_map = { + 'pipeline_url': 'pipeline_url' + } + + def __init__(self, pipeline_url=None, local_vars_configuration=None): # noqa: E501 + """ApiUrl - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._pipeline_url = None + self.discriminator = None + + if pipeline_url is not None: + self.pipeline_url = pipeline_url + + @property + def pipeline_url(self): + """Gets the pipeline_url of this ApiUrl. # noqa: E501 + + URL of the pipeline definition or the pipeline version definition. # noqa: E501 + + :return: The pipeline_url of this ApiUrl. # noqa: E501 + :rtype: str + """ + return self._pipeline_url + + @pipeline_url.setter + def pipeline_url(self, pipeline_url): + """Sets the pipeline_url of this ApiUrl. + + URL of the pipeline definition or the pipeline version definition. # noqa: E501 + + :param pipeline_url: The pipeline_url of this ApiUrl. # noqa: E501 + :type: str + """ + + self._pipeline_url = pipeline_url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiUrl): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiUrl): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/experiment_storage_state.py b/backend/api/python_http_client/kfp_server_api/models/experiment_storage_state.py new file mode 100644 index 00000000000..955073a3d4f --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/experiment_storage_state.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ExperimentStorageState(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNSPECIFIED = "STORAGESTATE_UNSPECIFIED" + AVAILABLE = "STORAGESTATE_AVAILABLE" + ARCHIVED = "STORAGESTATE_ARCHIVED" + + allowable_values = [UNSPECIFIED, AVAILABLE, ARCHIVED] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """ExperimentStorageState - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExperimentStorageState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExperimentStorageState): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/job_mode.py b/backend/api/python_http_client/kfp_server_api/models/job_mode.py new file mode 100644 index 00000000000..cc7c747198e --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/job_mode.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class JobMode(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN_MODE = "UNKNOWN_MODE" + ENABLED = "ENABLED" + DISABLED = "DISABLED" + + allowable_values = [UNKNOWN_MODE, ENABLED, DISABLED] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """JobMode - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, JobMode): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, JobMode): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/protobuf_any.py b/backend/api/python_http_client/kfp_server_api/models/protobuf_any.py new file mode 100644 index 00000000000..642a8bfb535 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/protobuf_any.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ProtobufAny(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'type_url': 'str', + 'value': 'str' + } + + attribute_map = { + 'type_url': 'type_url', + 'value': 'value' + } + + def __init__(self, type_url=None, value=None, local_vars_configuration=None): # noqa: E501 + """ProtobufAny - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._type_url = None + self._value = None + self.discriminator = None + + if type_url is not None: + self.type_url = type_url + if value is not None: + self.value = value + + @property + def type_url(self): + """Gets the type_url of this ProtobufAny. # noqa: E501 + + A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. # noqa: E501 + + :return: The type_url of this ProtobufAny. # noqa: E501 + :rtype: str + """ + return self._type_url + + @type_url.setter + def type_url(self, type_url): + """Sets the type_url of this ProtobufAny. + + A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. # noqa: E501 + + :param type_url: The type_url of this ProtobufAny. # noqa: E501 + :type: str + """ + + self._type_url = type_url + + @property + def value(self): + """Gets the value of this ProtobufAny. # noqa: E501 + + Must be a valid serialized protocol buffer of the above specified type. # noqa: E501 + + :return: The value of this ProtobufAny. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this ProtobufAny. + + Must be a valid serialized protocol buffer of the above specified type. # noqa: E501 + + :param value: The value of this ProtobufAny. # noqa: E501 + :type: str + """ + if (self.local_vars_configuration.client_side_validation and + value is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', value)): # noqa: E501 + raise ValueError(r"Invalid value for `value`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ProtobufAny): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ProtobufAny): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/report_run_metrics_response_report_run_metric_result.py b/backend/api/python_http_client/kfp_server_api/models/report_run_metrics_response_report_run_metric_result.py new file mode 100644 index 00000000000..8ed9c38ceee --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/report_run_metrics_response_report_run_metric_result.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ReportRunMetricsResponseReportRunMetricResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'metric_name': 'str', + 'metric_node_id': 'str', + 'status': 'ReportRunMetricsResponseReportRunMetricResultStatus', + 'message': 'str' + } + + attribute_map = { + 'metric_name': 'metric_name', + 'metric_node_id': 'metric_node_id', + 'status': 'status', + 'message': 'message' + } + + def __init__(self, metric_name=None, metric_node_id=None, status=None, message=None, local_vars_configuration=None): # noqa: E501 + """ReportRunMetricsResponseReportRunMetricResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._metric_name = None + self._metric_node_id = None + self._status = None + self._message = None + self.discriminator = None + + if metric_name is not None: + self.metric_name = metric_name + if metric_node_id is not None: + self.metric_node_id = metric_node_id + if status is not None: + self.status = status + if message is not None: + self.message = message + + @property + def metric_name(self): + """Gets the metric_name of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + + Output. The name of the metric. # noqa: E501 + + :return: The metric_name of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name): + """Sets the metric_name of this ReportRunMetricsResponseReportRunMetricResult. + + Output. The name of the metric. # noqa: E501 + + :param metric_name: The metric_name of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + :type: str + """ + + self._metric_name = metric_name + + @property + def metric_node_id(self): + """Gets the metric_node_id of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + + Output. The ID of the node which reports the metric. # noqa: E501 + + :return: The metric_node_id of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + :rtype: str + """ + return self._metric_node_id + + @metric_node_id.setter + def metric_node_id(self, metric_node_id): + """Sets the metric_node_id of this ReportRunMetricsResponseReportRunMetricResult. + + Output. The ID of the node which reports the metric. # noqa: E501 + + :param metric_node_id: The metric_node_id of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + :type: str + """ + + self._metric_node_id = metric_node_id + + @property + def status(self): + """Gets the status of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + + + :return: The status of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + :rtype: ReportRunMetricsResponseReportRunMetricResultStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ReportRunMetricsResponseReportRunMetricResult. + + + :param status: The status of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + :type: ReportRunMetricsResponseReportRunMetricResultStatus + """ + + self._status = status + + @property + def message(self): + """Gets the message of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + + Output. The detailed message of the error of the reporting. # noqa: E501 + + :return: The message of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ReportRunMetricsResponseReportRunMetricResult. + + Output. The detailed message of the error of the reporting. # noqa: E501 + + :param message: The message of this ReportRunMetricsResponseReportRunMetricResult. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReportRunMetricsResponseReportRunMetricResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReportRunMetricsResponseReportRunMetricResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/report_run_metrics_response_report_run_metric_result_status.py b/backend/api/python_http_client/kfp_server_api/models/report_run_metrics_response_report_run_metric_result_status.py new file mode 100644 index 00000000000..bbd4cea9719 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/report_run_metrics_response_report_run_metric_result_status.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class ReportRunMetricsResponseReportRunMetricResultStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNSPECIFIED = "UNSPECIFIED" + OK = "OK" + INVALID_ARGUMENT = "INVALID_ARGUMENT" + DUPLICATE_REPORTING = "DUPLICATE_REPORTING" + INTERNAL_ERROR = "INTERNAL_ERROR" + + allowable_values = [UNSPECIFIED, OK, INVALID_ARGUMENT, DUPLICATE_REPORTING, INTERNAL_ERROR] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """ReportRunMetricsResponseReportRunMetricResultStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReportRunMetricsResponseReportRunMetricResultStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReportRunMetricsResponseReportRunMetricResultStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/run_metric_format.py b/backend/api/python_http_client/kfp_server_api/models/run_metric_format.py new file mode 100644 index 00000000000..a76e137da27 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/run_metric_format.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class RunMetricFormat(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNSPECIFIED = "UNSPECIFIED" + RAW = "RAW" + PERCENTAGE = "PERCENTAGE" + + allowable_values = [UNSPECIFIED, RAW, PERCENTAGE] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """RunMetricFormat - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RunMetricFormat): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RunMetricFormat): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/models/run_storage_state.py b/backend/api/python_http_client/kfp_server_api/models/run_storage_state.py new file mode 100644 index 00000000000..21b613943a0 --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/models/run_storage_state.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from kfp_server_api.configuration import Configuration + + +class RunStorageState(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + AVAILABLE = "STORAGESTATE_AVAILABLE" + ARCHIVED = "STORAGESTATE_ARCHIVED" + + allowable_values = [AVAILABLE, ARCHIVED] # noqa: E501 + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """RunStorageState - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RunStorageState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RunStorageState): + return True + + return self.to_dict() != other.to_dict() diff --git a/backend/api/python_http_client/kfp_server_api/rest.py b/backend/api/python_http_client/kfp_server_api/rest.py new file mode 100644 index 00000000000..8bca648bc5a --- /dev/null +++ b/backend/api/python_http_client/kfp_server_api/rest.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode +import urllib3 + +from kfp_server_api.exceptions import ApiException, ApiValueError + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/backend/api/python_http_client/requirements.txt b/backend/api/python_http_client/requirements.txt new file mode 100644 index 00000000000..eb358efd5bd --- /dev/null +++ b/backend/api/python_http_client/requirements.txt @@ -0,0 +1,6 @@ +certifi >= 14.05.14 +future; python_version<="2.7" +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/backend/api/python_http_client/setup.cfg b/backend/api/python_http_client/setup.cfg new file mode 100644 index 00000000000..11433ee875a --- /dev/null +++ b/backend/api/python_http_client/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/backend/api/python_http_client/setup.py b/backend/api/python_http_client/setup.py new file mode 100644 index 00000000000..8601cf0adb5 --- /dev/null +++ b/backend/api/python_http_client/setup.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "kfp-server-api" +VERSION = "1.0.0-dev.1" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] + +setup( + name=NAME, + version=VERSION, + description="Kubeflow Pipelines API", + author="google", + author_email="kubeflow-pipelines@google.com", + url="https://github.com/kubeflow/pipelines", + keywords=["OpenAPI", "OpenAPI-Generator", "Kubeflow Pipelines API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + license="Apache 2.0", + long_description="""\ + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + """ +) diff --git a/backend/api/python_http_client/test-requirements.txt b/backend/api/python_http_client/test-requirements.txt new file mode 100644 index 00000000000..4ed3991cbec --- /dev/null +++ b/backend/api/python_http_client/test-requirements.txt @@ -0,0 +1,3 @@ +pytest~=4.6.7 # needed for python 2.7+3.4 +pytest-cov>=2.8.1 +pytest-randomly==1.2.3 # needed for python 2.7+3.4 diff --git a/backend/api/python_http_client/test/__init__.py b/backend/api/python_http_client/test/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/backend/api/python_http_client/test/test_api_cron_schedule.py b/backend/api/python_http_client/test/test_api_cron_schedule.py new file mode 100644 index 00000000000..544b4274141 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_cron_schedule.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_cron_schedule import ApiCronSchedule # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiCronSchedule(unittest.TestCase): + """ApiCronSchedule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiCronSchedule + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_cron_schedule.ApiCronSchedule() # noqa: E501 + if include_optional : + return ApiCronSchedule( + start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + cron = '0' + ) + else : + return ApiCronSchedule( + ) + + def testApiCronSchedule(self): + """Test ApiCronSchedule""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_experiment.py b/backend/api/python_http_client/test/test_api_experiment.py new file mode 100644 index 00000000000..4d602dbecb8 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_experiment.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_experiment import ApiExperiment # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiExperiment(unittest.TestCase): + """ApiExperiment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiExperiment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_experiment.ApiExperiment() # noqa: E501 + if include_optional : + return ApiExperiment( + id = '0', + name = '0', + description = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], + storage_state = 'STORAGESTATE_UNSPECIFIED' + ) + else : + return ApiExperiment( + ) + + def testApiExperiment(self): + """Test ApiExperiment""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_get_template_response.py b/backend/api/python_http_client/test/test_api_get_template_response.py new file mode 100644 index 00000000000..eaf353ba319 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_get_template_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_get_template_response import ApiGetTemplateResponse # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiGetTemplateResponse(unittest.TestCase): + """ApiGetTemplateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiGetTemplateResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_get_template_response.ApiGetTemplateResponse() # noqa: E501 + if include_optional : + return ApiGetTemplateResponse( + template = '0' + ) + else : + return ApiGetTemplateResponse( + ) + + def testApiGetTemplateResponse(self): + """Test ApiGetTemplateResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_job.py b/backend/api/python_http_client/test/test_api_job.py new file mode 100644 index 00000000000..602505f9b27 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_job.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_job import ApiJob # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiJob(unittest.TestCase): + """ApiJob unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiJob + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_job.ApiJob() # noqa: E501 + if include_optional : + return ApiJob( + id = '0', + name = '0', + description = '0', + pipeline_spec = kfp_server_api.models.api_pipeline_spec.apiPipelineSpec( + pipeline_id = '0', + pipeline_name = '0', + workflow_manifest = '0', + pipeline_manifest = '0', + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], ), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], + service_account = '0', + max_concurrency = '0', + trigger = kfp_server_api.models.api_trigger.apiTrigger( + cron_schedule = kfp_server_api.models.cron_schedule_allow_scheduling_the_job_with_unix_like_cron.CronSchedule allow scheduling the job with unix-like cron( + start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + cron = '0', ), + periodic_schedule = kfp_server_api.models.periodic_schedule_allow_scheduling_the_job_periodically_with_certain_interval.PeriodicSchedule allow scheduling the job periodically with certain interval( + start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + interval_second = '0', ), ), + mode = 'UNKNOWN_MODE', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = '0', + error = '0', + enabled = True, + no_catchup = True + ) + else : + return ApiJob( + ) + + def testApiJob(self): + """Test ApiJob""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_list_experiments_response.py b/backend/api/python_http_client/test/test_api_list_experiments_response.py new file mode 100644 index 00000000000..56fff05df09 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_list_experiments_response.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_list_experiments_response import ApiListExperimentsResponse # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiListExperimentsResponse(unittest.TestCase): + """ApiListExperimentsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiListExperimentsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_list_experiments_response.ApiListExperimentsResponse() # noqa: E501 + if include_optional : + return ApiListExperimentsResponse( + experiments = [ + kfp_server_api.models.api_experiment.apiExperiment( + id = '0', + name = '0', + description = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], + storage_state = 'STORAGESTATE_UNSPECIFIED', ) + ], + total_size = 56, + next_page_token = '0' + ) + else : + return ApiListExperimentsResponse( + ) + + def testApiListExperimentsResponse(self): + """Test ApiListExperimentsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_list_jobs_response.py b/backend/api/python_http_client/test/test_api_list_jobs_response.py new file mode 100644 index 00000000000..4b0c292e1ae --- /dev/null +++ b/backend/api/python_http_client/test/test_api_list_jobs_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_list_jobs_response import ApiListJobsResponse # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiListJobsResponse(unittest.TestCase): + """ApiListJobsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiListJobsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_list_jobs_response.ApiListJobsResponse() # noqa: E501 + if include_optional : + return ApiListJobsResponse( + jobs = [ + kfp_server_api.models.api_job.apiJob( + id = '0', + name = '0', + description = '0', + pipeline_spec = kfp_server_api.models.api_pipeline_spec.apiPipelineSpec( + pipeline_id = '0', + pipeline_name = '0', + workflow_manifest = '0', + pipeline_manifest = '0', + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], ), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], + service_account = '0', + max_concurrency = '0', + trigger = kfp_server_api.models.api_trigger.apiTrigger( + cron_schedule = kfp_server_api.models.cron_schedule_allow_scheduling_the_job_with_unix_like_cron.CronSchedule allow scheduling the job with unix-like cron( + start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + cron = '0', ), + periodic_schedule = kfp_server_api.models.periodic_schedule_allow_scheduling_the_job_periodically_with_certain_interval.PeriodicSchedule allow scheduling the job periodically with certain interval( + start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + interval_second = '0', ), ), + mode = 'UNKNOWN_MODE', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = '0', + error = '0', + enabled = True, + no_catchup = True, ) + ], + total_size = 56, + next_page_token = '0' + ) + else : + return ApiListJobsResponse( + ) + + def testApiListJobsResponse(self): + """Test ApiListJobsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_list_pipeline_versions_response.py b/backend/api/python_http_client/test/test_api_list_pipeline_versions_response.py new file mode 100644 index 00000000000..4cd16a977bb --- /dev/null +++ b/backend/api/python_http_client/test/test_api_list_pipeline_versions_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_list_pipeline_versions_response import ApiListPipelineVersionsResponse # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiListPipelineVersionsResponse(unittest.TestCase): + """ApiListPipelineVersionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiListPipelineVersionsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_list_pipeline_versions_response.ApiListPipelineVersionsResponse() # noqa: E501 + if include_optional : + return ApiListPipelineVersionsResponse( + versions = [ + kfp_server_api.models.api_pipeline_version.apiPipelineVersion( + id = '0', + name = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], + code_source_url = '0', + package_url = kfp_server_api.models.api_url.apiUrl( + pipeline_url = '0', ), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], ) + ], + next_page_token = '0', + total_size = 56 + ) + else : + return ApiListPipelineVersionsResponse( + ) + + def testApiListPipelineVersionsResponse(self): + """Test ApiListPipelineVersionsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_list_pipelines_response.py b/backend/api/python_http_client/test/test_api_list_pipelines_response.py new file mode 100644 index 00000000000..87561298ca9 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_list_pipelines_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_list_pipelines_response import ApiListPipelinesResponse # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiListPipelinesResponse(unittest.TestCase): + """ApiListPipelinesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiListPipelinesResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_list_pipelines_response.ApiListPipelinesResponse() # noqa: E501 + if include_optional : + return ApiListPipelinesResponse( + pipelines = [ + kfp_server_api.models.api_pipeline.apiPipeline( + id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '0', + description = '0', + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], + url = kfp_server_api.models.api_url.apiUrl( + pipeline_url = '0', ), + error = '0', + default_version = kfp_server_api.models.api_pipeline_version.apiPipelineVersion( + id = '0', + name = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + code_source_url = '0', + package_url = kfp_server_api.models.api_url.apiUrl( + pipeline_url = '0', ), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], ), ) + ], + total_size = 56, + next_page_token = '0' + ) + else : + return ApiListPipelinesResponse( + ) + + def testApiListPipelinesResponse(self): + """Test ApiListPipelinesResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_list_runs_response.py b/backend/api/python_http_client/test/test_api_list_runs_response.py new file mode 100644 index 00000000000..47dfa97aba2 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_list_runs_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_list_runs_response import ApiListRunsResponse # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiListRunsResponse(unittest.TestCase): + """ApiListRunsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiListRunsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_list_runs_response.ApiListRunsResponse() # noqa: E501 + if include_optional : + return ApiListRunsResponse( + runs = [ + kfp_server_api.models.api_run.apiRun( + id = '0', + name = '0', + storage_state = 'STORAGESTATE_AVAILABLE', + description = '0', + pipeline_spec = kfp_server_api.models.api_pipeline_spec.apiPipelineSpec( + pipeline_id = '0', + pipeline_name = '0', + workflow_manifest = '0', + pipeline_manifest = '0', + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], ), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], + service_account = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + finished_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = '0', + error = '0', + metrics = [ + kfp_server_api.models.api_run_metric.apiRunMetric( + name = '0', + node_id = '0', + number_value = 1.337, + format = 'UNSPECIFIED', ) + ], ) + ], + total_size = 56, + next_page_token = '0' + ) + else : + return ApiListRunsResponse( + ) + + def testApiListRunsResponse(self): + """Test ApiListRunsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_parameter.py b/backend/api/python_http_client/test/test_api_parameter.py new file mode 100644 index 00000000000..b1937a5b34d --- /dev/null +++ b/backend/api/python_http_client/test/test_api_parameter.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_parameter import ApiParameter # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiParameter(unittest.TestCase): + """ApiParameter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiParameter + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_parameter.ApiParameter() # noqa: E501 + if include_optional : + return ApiParameter( + name = '0', + value = '0' + ) + else : + return ApiParameter( + ) + + def testApiParameter(self): + """Test ApiParameter""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_periodic_schedule.py b/backend/api/python_http_client/test/test_api_periodic_schedule.py new file mode 100644 index 00000000000..e52541c4e16 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_periodic_schedule.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_periodic_schedule import ApiPeriodicSchedule # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiPeriodicSchedule(unittest.TestCase): + """ApiPeriodicSchedule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiPeriodicSchedule + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_periodic_schedule.ApiPeriodicSchedule() # noqa: E501 + if include_optional : + return ApiPeriodicSchedule( + start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + interval_second = '0' + ) + else : + return ApiPeriodicSchedule( + ) + + def testApiPeriodicSchedule(self): + """Test ApiPeriodicSchedule""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_pipeline.py b/backend/api/python_http_client/test/test_api_pipeline.py new file mode 100644 index 00000000000..659889c04da --- /dev/null +++ b/backend/api/python_http_client/test/test_api_pipeline.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_pipeline import ApiPipeline # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiPipeline(unittest.TestCase): + """ApiPipeline unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiPipeline + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_pipeline.ApiPipeline() # noqa: E501 + if include_optional : + return ApiPipeline( + id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '0', + description = '0', + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], + url = kfp_server_api.models.api_url.apiUrl( + pipeline_url = '0', ), + error = '0', + default_version = kfp_server_api.models.api_pipeline_version.apiPipelineVersion( + id = '0', + name = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], + code_source_url = '0', + package_url = kfp_server_api.models.api_url.apiUrl( + pipeline_url = '0', ), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], ) + ) + else : + return ApiPipeline( + ) + + def testApiPipeline(self): + """Test ApiPipeline""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_pipeline_runtime.py b/backend/api/python_http_client/test/test_api_pipeline_runtime.py new file mode 100644 index 00000000000..e52c74009a5 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_pipeline_runtime.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_pipeline_runtime import ApiPipelineRuntime # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiPipelineRuntime(unittest.TestCase): + """ApiPipelineRuntime unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiPipelineRuntime + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_pipeline_runtime.ApiPipelineRuntime() # noqa: E501 + if include_optional : + return ApiPipelineRuntime( + pipeline_manifest = '0', + workflow_manifest = '0' + ) + else : + return ApiPipelineRuntime( + ) + + def testApiPipelineRuntime(self): + """Test ApiPipelineRuntime""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_pipeline_spec.py b/backend/api/python_http_client/test/test_api_pipeline_spec.py new file mode 100644 index 00000000000..19eb81a3df4 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_pipeline_spec.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_pipeline_spec import ApiPipelineSpec # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiPipelineSpec(unittest.TestCase): + """ApiPipelineSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiPipelineSpec + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_pipeline_spec.ApiPipelineSpec() # noqa: E501 + if include_optional : + return ApiPipelineSpec( + pipeline_id = '0', + pipeline_name = '0', + workflow_manifest = '0', + pipeline_manifest = '0', + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ] + ) + else : + return ApiPipelineSpec( + ) + + def testApiPipelineSpec(self): + """Test ApiPipelineSpec""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_pipeline_version.py b/backend/api/python_http_client/test/test_api_pipeline_version.py new file mode 100644 index 00000000000..5e17646f40e --- /dev/null +++ b/backend/api/python_http_client/test/test_api_pipeline_version.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_pipeline_version import ApiPipelineVersion # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiPipelineVersion(unittest.TestCase): + """ApiPipelineVersion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiPipelineVersion + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_pipeline_version.ApiPipelineVersion() # noqa: E501 + if include_optional : + return ApiPipelineVersion( + id = '0', + name = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], + code_source_url = '0', + package_url = kfp_server_api.models.api_url.apiUrl( + pipeline_url = '0', ), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ] + ) + else : + return ApiPipelineVersion( + ) + + def testApiPipelineVersion(self): + """Test ApiPipelineVersion""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_read_artifact_response.py b/backend/api/python_http_client/test/test_api_read_artifact_response.py new file mode 100644 index 00000000000..8027ccc39be --- /dev/null +++ b/backend/api/python_http_client/test/test_api_read_artifact_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_read_artifact_response import ApiReadArtifactResponse # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiReadArtifactResponse(unittest.TestCase): + """ApiReadArtifactResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiReadArtifactResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_read_artifact_response.ApiReadArtifactResponse() # noqa: E501 + if include_optional : + return ApiReadArtifactResponse( + data = 'YQ==' + ) + else : + return ApiReadArtifactResponse( + ) + + def testApiReadArtifactResponse(self): + """Test ApiReadArtifactResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_relationship.py b/backend/api/python_http_client/test/test_api_relationship.py new file mode 100644 index 00000000000..db5778066c1 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_relationship.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_relationship import ApiRelationship # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiRelationship(unittest.TestCase): + """ApiRelationship unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiRelationship + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_relationship.ApiRelationship() # noqa: E501 + if include_optional : + return ApiRelationship( + ) + else : + return ApiRelationship( + ) + + def testApiRelationship(self): + """Test ApiRelationship""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_report_run_metrics_request.py b/backend/api/python_http_client/test/test_api_report_run_metrics_request.py new file mode 100644 index 00000000000..4f327c508b5 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_report_run_metrics_request.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_report_run_metrics_request import ApiReportRunMetricsRequest # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiReportRunMetricsRequest(unittest.TestCase): + """ApiReportRunMetricsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiReportRunMetricsRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_report_run_metrics_request.ApiReportRunMetricsRequest() # noqa: E501 + if include_optional : + return ApiReportRunMetricsRequest( + run_id = '0', + metrics = [ + kfp_server_api.models.api_run_metric.apiRunMetric( + name = '0', + node_id = '0', + number_value = 1.337, + format = 'UNSPECIFIED', ) + ] + ) + else : + return ApiReportRunMetricsRequest( + ) + + def testApiReportRunMetricsRequest(self): + """Test ApiReportRunMetricsRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_report_run_metrics_response.py b/backend/api/python_http_client/test/test_api_report_run_metrics_response.py new file mode 100644 index 00000000000..df7a80fafe8 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_report_run_metrics_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_report_run_metrics_response import ApiReportRunMetricsResponse # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiReportRunMetricsResponse(unittest.TestCase): + """ApiReportRunMetricsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiReportRunMetricsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_report_run_metrics_response.ApiReportRunMetricsResponse() # noqa: E501 + if include_optional : + return ApiReportRunMetricsResponse( + results = [ + kfp_server_api.models.report_run_metrics_response_report_run_metric_result.ReportRunMetricsResponseReportRunMetricResult( + metric_name = '0', + metric_node_id = '0', + status = 'UNSPECIFIED', + message = '0', ) + ] + ) + else : + return ApiReportRunMetricsResponse( + ) + + def testApiReportRunMetricsResponse(self): + """Test ApiReportRunMetricsResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_resource_key.py b/backend/api/python_http_client/test/test_api_resource_key.py new file mode 100644 index 00000000000..83457a0db12 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_resource_key.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_resource_key import ApiResourceKey # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiResourceKey(unittest.TestCase): + """ApiResourceKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiResourceKey + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_resource_key.ApiResourceKey() # noqa: E501 + if include_optional : + return ApiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0' + ) + else : + return ApiResourceKey( + ) + + def testApiResourceKey(self): + """Test ApiResourceKey""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_resource_reference.py b/backend/api/python_http_client/test/test_api_resource_reference.py new file mode 100644 index 00000000000..5109a0a5655 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_resource_reference.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_resource_reference import ApiResourceReference # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiResourceReference(unittest.TestCase): + """ApiResourceReference unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiResourceReference + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_resource_reference.ApiResourceReference() # noqa: E501 + if include_optional : + return ApiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP' + ) + else : + return ApiResourceReference( + ) + + def testApiResourceReference(self): + """Test ApiResourceReference""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_resource_type.py b/backend/api/python_http_client/test/test_api_resource_type.py new file mode 100644 index 00000000000..a62c298eb8b --- /dev/null +++ b/backend/api/python_http_client/test/test_api_resource_type.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_resource_type import ApiResourceType # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiResourceType(unittest.TestCase): + """ApiResourceType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiResourceType + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_resource_type.ApiResourceType() # noqa: E501 + if include_optional : + return ApiResourceType( + ) + else : + return ApiResourceType( + ) + + def testApiResourceType(self): + """Test ApiResourceType""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_run.py b/backend/api/python_http_client/test/test_api_run.py new file mode 100644 index 00000000000..4b70b99de27 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_run.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_run import ApiRun # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiRun(unittest.TestCase): + """ApiRun unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiRun + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_run.ApiRun() # noqa: E501 + if include_optional : + return ApiRun( + id = '0', + name = '0', + storage_state = 'STORAGESTATE_AVAILABLE', + description = '0', + pipeline_spec = kfp_server_api.models.api_pipeline_spec.apiPipelineSpec( + pipeline_id = '0', + pipeline_name = '0', + workflow_manifest = '0', + pipeline_manifest = '0', + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], ), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], + service_account = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + finished_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = '0', + error = '0', + metrics = [ + kfp_server_api.models.api_run_metric.apiRunMetric( + name = '0', + node_id = '0', + number_value = 1.337, + format = 'UNSPECIFIED', ) + ] + ) + else : + return ApiRun( + ) + + def testApiRun(self): + """Test ApiRun""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_run_detail.py b/backend/api/python_http_client/test/test_api_run_detail.py new file mode 100644 index 00000000000..d8a130d45c1 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_run_detail.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_run_detail import ApiRunDetail # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiRunDetail(unittest.TestCase): + """ApiRunDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiRunDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_run_detail.ApiRunDetail() # noqa: E501 + if include_optional : + return ApiRunDetail( + run = kfp_server_api.models.api_run.apiRun( + id = '0', + name = '0', + storage_state = 'STORAGESTATE_AVAILABLE', + description = '0', + pipeline_spec = kfp_server_api.models.api_pipeline_spec.apiPipelineSpec( + pipeline_id = '0', + pipeline_name = '0', + workflow_manifest = '0', + pipeline_manifest = '0', + parameters = [ + kfp_server_api.models.api_parameter.apiParameter( + name = '0', + value = '0', ) + ], ), + resource_references = [ + kfp_server_api.models.api_resource_reference.apiResourceReference( + key = kfp_server_api.models.api_resource_key.apiResourceKey( + type = 'UNKNOWN_RESOURCE_TYPE', + id = '0', ), + name = '0', + relationship = 'UNKNOWN_RELATIONSHIP', ) + ], + service_account = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + scheduled_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + finished_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + status = '0', + error = '0', + metrics = [ + kfp_server_api.models.api_run_metric.apiRunMetric( + name = '0', + node_id = '0', + number_value = 1.337, + format = 'UNSPECIFIED', ) + ], ), + pipeline_runtime = kfp_server_api.models.api_pipeline_runtime.apiPipelineRuntime( + pipeline_manifest = '0', + workflow_manifest = '0', ) + ) + else : + return ApiRunDetail( + ) + + def testApiRunDetail(self): + """Test ApiRunDetail""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_run_metric.py b/backend/api/python_http_client/test/test_api_run_metric.py new file mode 100644 index 00000000000..63b2ce42e4e --- /dev/null +++ b/backend/api/python_http_client/test/test_api_run_metric.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_run_metric import ApiRunMetric # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiRunMetric(unittest.TestCase): + """ApiRunMetric unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiRunMetric + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_run_metric.ApiRunMetric() # noqa: E501 + if include_optional : + return ApiRunMetric( + name = '0', + node_id = '0', + number_value = 1.337, + format = 'UNSPECIFIED' + ) + else : + return ApiRunMetric( + ) + + def testApiRunMetric(self): + """Test ApiRunMetric""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_status.py b/backend/api/python_http_client/test/test_api_status.py new file mode 100644 index 00000000000..4c9be24d9d4 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_status.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_status import ApiStatus # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiStatus(unittest.TestCase): + """ApiStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiStatus + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_status.ApiStatus() # noqa: E501 + if include_optional : + return ApiStatus( + error = '0', + code = 56, + details = [ + kfp_server_api.models.protobuf_any.protobufAny( + type_url = '0', + value = 'YQ==', ) + ] + ) + else : + return ApiStatus( + ) + + def testApiStatus(self): + """Test ApiStatus""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_trigger.py b/backend/api/python_http_client/test/test_api_trigger.py new file mode 100644 index 00000000000..0a9dbc2a794 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_trigger.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_trigger import ApiTrigger # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiTrigger(unittest.TestCase): + """ApiTrigger unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiTrigger + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_trigger.ApiTrigger() # noqa: E501 + if include_optional : + return ApiTrigger( + cron_schedule = kfp_server_api.models.cron_schedule_allow_scheduling_the_job_with_unix_like_cron.CronSchedule allow scheduling the job with unix-like cron( + start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + cron = '0', ), + periodic_schedule = kfp_server_api.models.periodic_schedule_allow_scheduling_the_job_periodically_with_certain_interval.PeriodicSchedule allow scheduling the job periodically with certain interval( + start_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + interval_second = '0', ) + ) + else : + return ApiTrigger( + ) + + def testApiTrigger(self): + """Test ApiTrigger""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_api_url.py b/backend/api/python_http_client/test/test_api_url.py new file mode 100644 index 00000000000..fafaf5e5a21 --- /dev/null +++ b/backend/api/python_http_client/test/test_api_url.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.api_url import ApiUrl # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestApiUrl(unittest.TestCase): + """ApiUrl unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ApiUrl + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.api_url.ApiUrl() # noqa: E501 + if include_optional : + return ApiUrl( + pipeline_url = '0' + ) + else : + return ApiUrl( + ) + + def testApiUrl(self): + """Test ApiUrl""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_experiment_service_api.py b/backend/api/python_http_client/test/test_experiment_service_api.py new file mode 100644 index 00000000000..9c6ee83ba2a --- /dev/null +++ b/backend/api/python_http_client/test/test_experiment_service_api.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import kfp_server_api +from kfp_server_api.api.experiment_service_api import ExperimentServiceApi # noqa: E501 +from kfp_server_api.rest import ApiException + + +class TestExperimentServiceApi(unittest.TestCase): + """ExperimentServiceApi unit test stubs""" + + def setUp(self): + self.api = kfp_server_api.api.experiment_service_api.ExperimentServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_archive_experiment(self): + """Test case for archive_experiment + + Archives an experiment and the experiment's runs and jobs. # noqa: E501 + """ + pass + + def test_create_experiment(self): + """Test case for create_experiment + + Creates a new experiment. # noqa: E501 + """ + pass + + def test_delete_experiment(self): + """Test case for delete_experiment + + Deletes an experiment without deleting the experiment's runs and jobs. To avoid unexpected behaviors, delete an experiment's runs and jobs before deleting the experiment. # noqa: E501 + """ + pass + + def test_get_experiment(self): + """Test case for get_experiment + + Finds a specific experiment by ID. # noqa: E501 + """ + pass + + def test_list_experiment(self): + """Test case for list_experiment + + Finds all experiments. Supports pagination, and sorting on certain fields. # noqa: E501 + """ + pass + + def test_unarchive_experiment(self): + """Test case for unarchive_experiment + + Restores an archived experiment. The experiment's archived runs and jobs will stay archived. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_experiment_storage_state.py b/backend/api/python_http_client/test/test_experiment_storage_state.py new file mode 100644 index 00000000000..022e4d32bb6 --- /dev/null +++ b/backend/api/python_http_client/test/test_experiment_storage_state.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.experiment_storage_state import ExperimentStorageState # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestExperimentStorageState(unittest.TestCase): + """ExperimentStorageState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ExperimentStorageState + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.experiment_storage_state.ExperimentStorageState() # noqa: E501 + if include_optional : + return ExperimentStorageState( + ) + else : + return ExperimentStorageState( + ) + + def testExperimentStorageState(self): + """Test ExperimentStorageState""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_job_mode.py b/backend/api/python_http_client/test/test_job_mode.py new file mode 100644 index 00000000000..c69505aec3d --- /dev/null +++ b/backend/api/python_http_client/test/test_job_mode.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.job_mode import JobMode # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestJobMode(unittest.TestCase): + """JobMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test JobMode + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.job_mode.JobMode() # noqa: E501 + if include_optional : + return JobMode( + ) + else : + return JobMode( + ) + + def testJobMode(self): + """Test JobMode""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_job_service_api.py b/backend/api/python_http_client/test/test_job_service_api.py new file mode 100644 index 00000000000..a736811e314 --- /dev/null +++ b/backend/api/python_http_client/test/test_job_service_api.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import kfp_server_api +from kfp_server_api.api.job_service_api import JobServiceApi # noqa: E501 +from kfp_server_api.rest import ApiException + + +class TestJobServiceApi(unittest.TestCase): + """JobServiceApi unit test stubs""" + + def setUp(self): + self.api = kfp_server_api.api.job_service_api.JobServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_job(self): + """Test case for create_job + + Creates a new job. # noqa: E501 + """ + pass + + def test_delete_job(self): + """Test case for delete_job + + Deletes a job. # noqa: E501 + """ + pass + + def test_disable_job(self): + """Test case for disable_job + + Stops a job and all its associated runs. The job is not deleted. # noqa: E501 + """ + pass + + def test_enable_job(self): + """Test case for enable_job + + Restarts a job that was previously stopped. All runs associated with the job will continue. # noqa: E501 + """ + pass + + def test_get_job(self): + """Test case for get_job + + Finds a specific job by ID. # noqa: E501 + """ + pass + + def test_list_jobs(self): + """Test case for list_jobs + + Finds all jobs. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_pipeline_service_api.py b/backend/api/python_http_client/test/test_pipeline_service_api.py new file mode 100644 index 00000000000..2f29e28c1fc --- /dev/null +++ b/backend/api/python_http_client/test/test_pipeline_service_api.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import kfp_server_api +from kfp_server_api.api.pipeline_service_api import PipelineServiceApi # noqa: E501 +from kfp_server_api.rest import ApiException + + +class TestPipelineServiceApi(unittest.TestCase): + """PipelineServiceApi unit test stubs""" + + def setUp(self): + self.api = kfp_server_api.api.pipeline_service_api.PipelineServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_pipeline(self): + """Test case for create_pipeline + + Creates a pipeline. # noqa: E501 + """ + pass + + def test_create_pipeline_version(self): + """Test case for create_pipeline_version + + Adds a pipeline version to the specified pipeline. # noqa: E501 + """ + pass + + def test_delete_pipeline(self): + """Test case for delete_pipeline + + Deletes a pipeline and its pipeline versions. # noqa: E501 + """ + pass + + def test_delete_pipeline_version(self): + """Test case for delete_pipeline_version + + Deletes a pipeline version by pipeline version ID. If the deleted pipeline version is the default pipeline version, the pipeline's default version changes to the pipeline's most recent pipeline version. If there are no remaining pipeline versions, the pipeline will have no default version. Examines the run_service_api.ipynb notebook to learn more about creating a run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). # noqa: E501 + """ + pass + + def test_get_pipeline(self): + """Test case for get_pipeline + + Finds a specific pipeline by ID. # noqa: E501 + """ + pass + + def test_get_pipeline_version(self): + """Test case for get_pipeline_version + + Gets a pipeline version by pipeline version ID. # noqa: E501 + """ + pass + + def test_get_pipeline_version_template(self): + """Test case for get_pipeline_version_template + + Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. # noqa: E501 + """ + pass + + def test_get_template(self): + """Test case for get_template + + Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. # noqa: E501 + """ + pass + + def test_list_pipeline_versions(self): + """Test case for list_pipeline_versions + + Lists all pipeline versions of a given pipeline. # noqa: E501 + """ + pass + + def test_list_pipelines(self): + """Test case for list_pipelines + + Finds all pipelines. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_pipeline_upload_service_api.py b/backend/api/python_http_client/test/test_pipeline_upload_service_api.py new file mode 100644 index 00000000000..3e1d4017698 --- /dev/null +++ b/backend/api/python_http_client/test/test_pipeline_upload_service_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import kfp_server_api +from kfp_server_api.api.pipeline_upload_service_api import PipelineUploadServiceApi # noqa: E501 +from kfp_server_api.rest import ApiException + + +class TestPipelineUploadServiceApi(unittest.TestCase): + """PipelineUploadServiceApi unit test stubs""" + + def setUp(self): + self.api = kfp_server_api.api.pipeline_upload_service_api.PipelineUploadServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_upload_pipeline(self): + """Test case for upload_pipeline + + """ + pass + + def test_upload_pipeline_version(self): + """Test case for upload_pipeline_version + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_protobuf_any.py b/backend/api/python_http_client/test/test_protobuf_any.py new file mode 100644 index 00000000000..dd14f1c4daa --- /dev/null +++ b/backend/api/python_http_client/test/test_protobuf_any.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.protobuf_any import ProtobufAny # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestProtobufAny(unittest.TestCase): + """ProtobufAny unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ProtobufAny + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.protobuf_any.ProtobufAny() # noqa: E501 + if include_optional : + return ProtobufAny( + type_url = '0', + value = 'YQ==' + ) + else : + return ProtobufAny( + ) + + def testProtobufAny(self): + """Test ProtobufAny""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_report_run_metrics_response_report_run_metric_result.py b/backend/api/python_http_client/test/test_report_run_metrics_response_report_run_metric_result.py new file mode 100644 index 00000000000..7af9a4ac001 --- /dev/null +++ b/backend/api/python_http_client/test/test_report_run_metrics_response_report_run_metric_result.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.report_run_metrics_response_report_run_metric_result import ReportRunMetricsResponseReportRunMetricResult # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestReportRunMetricsResponseReportRunMetricResult(unittest.TestCase): + """ReportRunMetricsResponseReportRunMetricResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ReportRunMetricsResponseReportRunMetricResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.report_run_metrics_response_report_run_metric_result.ReportRunMetricsResponseReportRunMetricResult() # noqa: E501 + if include_optional : + return ReportRunMetricsResponseReportRunMetricResult( + metric_name = '0', + metric_node_id = '0', + status = 'UNSPECIFIED', + message = '0' + ) + else : + return ReportRunMetricsResponseReportRunMetricResult( + ) + + def testReportRunMetricsResponseReportRunMetricResult(self): + """Test ReportRunMetricsResponseReportRunMetricResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_report_run_metrics_response_report_run_metric_result_status.py b/backend/api/python_http_client/test/test_report_run_metrics_response_report_run_metric_result_status.py new file mode 100644 index 00000000000..fa4f7937a49 --- /dev/null +++ b/backend/api/python_http_client/test/test_report_run_metrics_response_report_run_metric_result_status.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.report_run_metrics_response_report_run_metric_result_status import ReportRunMetricsResponseReportRunMetricResultStatus # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestReportRunMetricsResponseReportRunMetricResultStatus(unittest.TestCase): + """ReportRunMetricsResponseReportRunMetricResultStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ReportRunMetricsResponseReportRunMetricResultStatus + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.report_run_metrics_response_report_run_metric_result_status.ReportRunMetricsResponseReportRunMetricResultStatus() # noqa: E501 + if include_optional : + return ReportRunMetricsResponseReportRunMetricResultStatus( + ) + else : + return ReportRunMetricsResponseReportRunMetricResultStatus( + ) + + def testReportRunMetricsResponseReportRunMetricResultStatus(self): + """Test ReportRunMetricsResponseReportRunMetricResultStatus""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_run_metric_format.py b/backend/api/python_http_client/test/test_run_metric_format.py new file mode 100644 index 00000000000..5f635827fc2 --- /dev/null +++ b/backend/api/python_http_client/test/test_run_metric_format.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.run_metric_format import RunMetricFormat # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestRunMetricFormat(unittest.TestCase): + """RunMetricFormat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test RunMetricFormat + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.run_metric_format.RunMetricFormat() # noqa: E501 + if include_optional : + return RunMetricFormat( + ) + else : + return RunMetricFormat( + ) + + def testRunMetricFormat(self): + """Test RunMetricFormat""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_run_service_api.py b/backend/api/python_http_client/test/test_run_service_api.py new file mode 100644 index 00000000000..bdde72895ed --- /dev/null +++ b/backend/api/python_http_client/test/test_run_service_api.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import kfp_server_api +from kfp_server_api.api.run_service_api import RunServiceApi # noqa: E501 +from kfp_server_api.rest import ApiException + + +class TestRunServiceApi(unittest.TestCase): + """RunServiceApi unit test stubs""" + + def setUp(self): + self.api = kfp_server_api.api.run_service_api.RunServiceApi() # noqa: E501 + + def tearDown(self): + pass + + def test_archive_run(self): + """Test case for archive_run + + Archives a run. # noqa: E501 + """ + pass + + def test_create_run(self): + """Test case for create_run + + Creates a new run. # noqa: E501 + """ + pass + + def test_delete_run(self): + """Test case for delete_run + + Deletes a run. # noqa: E501 + """ + pass + + def test_get_run(self): + """Test case for get_run + + Finds a specific run by ID. # noqa: E501 + """ + pass + + def test_list_runs(self): + """Test case for list_runs + + Finds all runs. # noqa: E501 + """ + pass + + def test_read_artifact(self): + """Test case for read_artifact + + Finds a run's artifact data. # noqa: E501 + """ + pass + + def test_report_run_metrics(self): + """Test case for report_run_metrics + + ReportRunMetrics reports metrics of a run. Each metric is reported in its own transaction, so this API accepts partial failures. Metric can be uniquely identified by (run_id, node_id, name). Duplicate reporting will be ignored by the API. First reporting wins. # noqa: E501 + """ + pass + + def test_retry_run(self): + """Test case for retry_run + + Re-initiates a failed or terminated run. # noqa: E501 + """ + pass + + def test_terminate_run(self): + """Test case for terminate_run + + Terminates an active run. # noqa: E501 + """ + pass + + def test_unarchive_run(self): + """Test case for unarchive_run + + Restores an archived run. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/test/test_run_storage_state.py b/backend/api/python_http_client/test/test_run_storage_state.py new file mode 100644 index 00000000000..34b2ce0d5be --- /dev/null +++ b/backend/api/python_http_client/test/test_run_storage_state.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Kubeflow Pipelines API + + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. # noqa: E501 + + The version of the OpenAPI document: 1.0.0-dev.1 + Contact: kubeflow-pipelines@google.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import kfp_server_api +from kfp_server_api.models.run_storage_state import RunStorageState # noqa: E501 +from kfp_server_api.rest import ApiException + +class TestRunStorageState(unittest.TestCase): + """RunStorageState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test RunStorageState + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = kfp_server_api.models.run_storage_state.RunStorageState() # noqa: E501 + if include_optional : + return RunStorageState( + ) + else : + return RunStorageState( + ) + + def testRunStorageState(self): + """Test RunStorageState""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/backend/api/python_http_client/tox.ini b/backend/api/python_http_client/tox.ini new file mode 100644 index 00000000000..25937a6872f --- /dev/null +++ b/backend/api/python_http_client/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=kfp_server_api diff --git a/backend/api/swagger/kfp_api_single_file.swagger.json b/backend/api/swagger/kfp_api_single_file.swagger.json index 38c1ed68b7c..b47bc105d57 100644 --- a/backend/api/swagger/kfp_api_single_file.swagger.json +++ b/backend/api/swagger/kfp_api_single_file.swagger.json @@ -2,8 +2,17 @@ "swagger": "2.0", "info": { "title": "Kubeflow Pipelines API", - "version": "0.5.1", - "description": "This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition." + "version": "1.0.0-dev.1", + "description": "This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition.", + "contact": { + "name": "google", + "email": "kubeflow-pipelines@google.com", + "url": "https://www.google.com" + }, + "license": { + "name": "Apache 2.0", + "url": "https://raw.githubusercontent.com/kubeflow/pipelines/master/LICENSE" + } }, "schemes": [ "http",