From 84f2a85023b7899a0fe64f902f8b2b3cab92bbcd Mon Sep 17 00:00:00 2001 From: Tommy Li Date: Fri, 1 Sep 2023 15:22:26 -0700 Subject: [PATCH] feat(api): upgrade grpc-gateway to v2 with protoname (#1337) * upgrade grpc-gateway to v2 * fix common client code for grpc gateway v2 * fix license and test case * regenerate python client * fix python http client code * update healthz class to new python openapi client * update new python client function class name to new openapi standard; * overwrite upstream old client function convention * fix python upload class * fix python upload class * update api class * update upload api swagger codegen manually * revert old fixes * fix new sdk payload parameter mapping * update names to protoname * revert backend changes to use protoname * update proto spec * update tests * update sdk client to handle new json name * fix typo --- backend/api/Dockerfile | 11 +- backend/api/Makefile | 4 +- .../build_kfp_server_api_python_package.sh | 2 + backend/api/hack/generator.sh | 13 +- backend/api/v1/auth.proto | 4 +- backend/api/v1/error.proto | 4 +- backend/api/v1/experiment.proto | 22 +- backend/api/v1/filter.proto | 14 +- backend/api/v1/go_client/auth.pb.go | 74 +- backend/api/v1/go_client/auth.pb.gw.go | 76 +- backend/api/v1/go_client/error.pb.go | 38 +- backend/api/v1/go_client/experiment.pb.go | 251 +++---- backend/api/v1/go_client/experiment.pb.gw.go | 386 +++++++++- backend/api/v1/go_client/filter.pb.go | 116 +-- backend/api/v1/go_client/healthz.pb.go | 54 +- backend/api/v1/go_client/healthz.pb.gw.go | 64 +- backend/api/v1/go_client/job.pb.go | 331 ++++----- backend/api/v1/go_client/job.pb.gw.go | 386 +++++++++- backend/api/v1/go_client/pipeline.pb.go | 497 ++++++------- backend/api/v1/go_client/pipeline.pb.gw.go | 701 ++++++++++++++++-- backend/api/v1/go_client/pipeline_spec.pb.go | 107 +-- backend/api/v1/go_client/report.pb.go | 52 +- backend/api/v1/go_client/report.pb.gw.go | 126 +++- backend/api/v1/go_client/run.pb.go | 490 ++++++------ backend/api/v1/go_client/run.pb.gw.go | 672 +++++++++++++++-- backend/api/v1/go_client/task.pb.go | 112 +-- backend/api/v1/go_client/task.pb.gw.go | 130 +++- backend/api/v1/go_client/visualization.pb.go | 90 +-- .../api/v1/go_client/visualization.pb.gw.go | 90 ++- .../experiment_client/experiment_client.go | 11 +- .../archive_experiment_parameters.go | 136 ---- .../archive_experiment_responses.go | 110 --- .../create_experiment_parameters.go | 139 ---- .../create_experiment_responses.go | 112 --- .../delete_experiment_parameters.go | 136 ---- .../delete_experiment_responses.go | 110 --- ...t_service_archive_experiment_parameters.go | 151 ++++ ...nt_service_archive_experiment_responses.go | 180 +++++ .../experiment_service_client.go | 211 ++++-- ...nt_service_create_experiment_parameters.go | 153 ++++ ...ent_service_create_experiment_responses.go | 182 +++++ ...nt_service_delete_experiment_parameters.go | 151 ++++ ...ent_service_delete_experiment_responses.go | 180 +++++ ...iment_service_get_experiment_parameters.go | 151 ++++ ...riment_service_get_experiment_responses.go | 182 +++++ ...ment_service_list_experiment_parameters.go | 355 +++++++++ ...iment_service_list_experiment_responses.go | 182 +++++ ...service_unarchive_experiment_parameters.go | 151 ++++ ..._service_unarchive_experiment_responses.go | 180 +++++ .../get_experiment_parameters.go | 136 ---- .../get_experiment_responses.go | 112 --- .../list_experiment_parameters.go | 326 -------- .../list_experiment_responses.go | 112 --- .../unarchive_experiment_parameters.go | 136 ---- .../unarchive_experiment_responses.go | 110 --- .../experiment_model/googlerpc_status.go | 122 +++ .../experiment_model/protobuf_any.go | 131 ++-- .../experiment_model/v1_experiment.go | 78 +- .../v1_experiment_storage_state.go | 21 +- .../v1_list_experiments_response.go | 42 +- .../experiment_model/v1_relationship.go | 21 +- .../experiment_model/v1_resource_key.go | 49 +- .../experiment_model/v1_resource_reference.go | 72 +- .../experiment_model/v1_resource_type.go | 21 +- .../experiment_model/v1_status.go | 86 --- .../healthz_client/healthz_client.go | 11 +- .../healthz_service/get_healthz_parameters.go | 113 --- .../healthz_service/get_healthz_responses.go | 112 --- .../healthz_service/healthz_service_client.go | 46 +- .../healthz_service_get_healthz_parameters.go | 128 ++++ .../healthz_service_get_healthz_responses.go | 182 +++++ .../healthz_model/googlerpc_status.go | 122 +++ .../healthz_model/protobuf_any.go | 131 ++-- .../healthz_model/v1_get_healthz_response.go | 9 +- .../go_http_client/healthz_model/v1_status.go | 86 --- .../go_http_client/job_client/job_client.go | 11 +- .../job_service/create_job_parameters.go | 139 ---- .../job_service/create_job_responses.go | 112 --- .../job_service/delete_job_parameters.go | 136 ---- .../job_service/delete_job_responses.go | 110 --- .../job_service/disable_job_parameters.go | 136 ---- .../job_service/disable_job_responses.go | 110 --- .../job_service/enable_job_parameters.go | 136 ---- .../job_service/enable_job_responses.go | 110 --- .../job_service/get_job_parameters.go | 136 ---- .../job_service/get_job_responses.go | 112 --- .../job_service/job_service_client.go | 211 ++++-- .../job_service_create_job_parameters.go | 153 ++++ .../job_service_create_job_responses.go | 182 +++++ .../job_service_delete_job_parameters.go | 151 ++++ .../job_service_delete_job_responses.go | 180 +++++ .../job_service_disable_job_parameters.go | 151 ++++ .../job_service_disable_job_responses.go | 180 +++++ .../job_service_enable_job_parameters.go | 151 ++++ .../job_service_enable_job_responses.go | 180 +++++ .../job_service_get_job_parameters.go | 151 ++++ .../job_service_get_job_responses.go | 182 +++++ .../job_service_list_jobs_parameters.go | 355 +++++++++ .../job_service_list_jobs_responses.go | 182 +++++ .../job_service/list_jobs_parameters.go | 326 -------- .../job_service/list_jobs_responses.go | 112 --- .../job_model/googlerpc_status.go | 122 +++ .../v1/go_http_client/job_model/job_mode.go | 23 +- .../job_model/pipeline_spec_runtime_config.go | 39 +- .../go_http_client/job_model/protobuf_any.go | 131 ++-- .../job_model/v1_cron_schedule.go | 11 +- .../api/v1/go_http_client/job_model/v1_job.go | 125 +++- .../v1/go_http_client/job_model/v1_job.go-- | 331 +++++++++ .../job_model/v1_list_jobs_response.go | 42 +- .../go_http_client/job_model/v1_parameter.go | 9 +- .../job_model/v1_periodic_schedule.go | 11 +- .../job_model/v1_periodic_schedule.go-- | 97 +++ .../job_model/v1_pipeline_spec.go | 65 +- .../job_model/v1_relationship.go | 21 +- .../job_model/v1_resource_key.go | 49 +- .../job_model/v1_resource_reference.go | 72 +- .../job_model/v1_resource_type.go | 21 +- .../v1/go_http_client/job_model/v1_status.go | 86 --- .../v1/go_http_client/job_model/v1_trigger.go | 60 +- .../v1/go_http_client/job_model/v1_value.go | 9 +- .../pipeline_client/pipeline_client.go | 11 +- .../create_pipeline_parameters.go | 136 ---- .../create_pipeline_responses.go | 112 --- .../create_pipeline_version_parameters.go | 140 ---- .../create_pipeline_version_responses.go | 112 --- .../delete_pipeline_parameters.go | 136 ---- .../delete_pipeline_responses.go | 110 --- .../delete_pipeline_version_parameters.go | 136 ---- .../delete_pipeline_version_responses.go | 110 --- .../get_pipeline_parameters.go | 136 ---- .../get_pipeline_responses.go | 112 --- .../get_pipeline_version_parameters.go | 136 ---- .../get_pipeline_version_responses.go | 112 --- ...et_pipeline_version_template_parameters.go | 136 ---- ...get_pipeline_version_template_responses.go | 112 --- .../get_template_parameters.go | 136 ---- .../get_template_responses.go | 112 --- .../list_pipeline_versions_parameters.go | 326 -------- .../list_pipeline_versions_responses.go | 112 --- .../list_pipelines_parameters.go | 326 -------- .../list_pipelines_responses.go | 112 --- .../pipeline_service_client.go | 376 ++++++---- ...line_service_create_pipeline_parameters.go | 150 ++++ ...eline_service_create_pipeline_responses.go | 182 +++++ ...vice_create_pipeline_version_parameters.go | 154 ++++ ...rvice_create_pipeline_version_responses.go | 182 +++++ ...line_service_delete_pipeline_parameters.go | 151 ++++ ...eline_service_delete_pipeline_responses.go | 180 +++++ ...vice_delete_pipeline_version_parameters.go | 151 ++++ ...rvice_delete_pipeline_version_responses.go | 180 +++++ ...ipeline_service_get_pipeline_parameters.go | 151 ++++ ...pipeline_service_get_pipeline_responses.go | 182 +++++ ...service_get_pipeline_version_parameters.go | 151 ++++ ..._service_get_pipeline_version_responses.go | 182 +++++ ...et_pipeline_version_template_parameters.go | 151 ++++ ...get_pipeline_version_template_responses.go | 182 +++++ ...ipeline_service_get_template_parameters.go | 151 ++++ ...pipeline_service_get_template_responses.go | 182 +++++ ...rvice_list_pipeline_versions_parameters.go | 355 +++++++++ ...ervice_list_pipeline_versions_responses.go | 182 +++++ ...eline_service_list_pipelines_parameters.go | 355 +++++++++ ...peline_service_list_pipelines_responses.go | 182 +++++ ...ate_pipeline_default_version_parameters.go | 173 +++++ ...date_pipeline_default_version_responses.go | 180 +++++ ...ate_pipeline_default_version_parameters.go | 157 ---- ...date_pipeline_default_version_responses.go | 110 --- .../pipeline_model/googlerpc_status.go | 122 +++ .../pipeline_model/protobuf_any.go | 131 ++-- .../v1_get_template_response.go | 9 +- .../v1_list_pipeline_versions_response.go | 42 +- .../v1_list_pipelines_response.go | 42 +- .../pipeline_model/v1_parameter.go | 9 +- .../pipeline_model/v1_pipeline.go | 116 ++- .../pipeline_model/v1_pipeline_version.go | 93 ++- .../pipeline_model/v1_relationship.go | 21 +- .../pipeline_model/v1_resource_key.go | 49 +- .../pipeline_model/v1_resource_reference.go | 72 +- .../pipeline_model/v1_resource_type.go | 21 +- .../pipeline_model/v1_status.go | 86 --- .../go_http_client/pipeline_model/v1_url.go | 9 +- .../pipeline_upload_client.go | 11 +- ...line_service_upload_pipeline_parameters.go | 212 ++++++ ...eline_service_upload_pipeline_responses.go | 182 +++++ ...vice_upload_pipeline_version_parameters.go | 243 ++++++ ...rvice_upload_pipeline_version_responses.go | 182 +++++ .../pipeline_upload_service_client.go | 79 +- .../upload_pipeline_parameters.go | 194 ----- .../upload_pipeline_responses.go | 112 --- .../upload_pipeline_version_parameters.go | 223 ------ .../upload_pipeline_version_responses.go | 112 --- .../pipeline_upload_model/googlerpc_status.go | 122 +++ .../pipeline_upload_model/protobuf_any.go | 125 ++-- .../pipeline_upload_model/v1_parameter.go | 9 +- .../pipeline_upload_model/v1_pipeline.go | 43 +- .../v1_pipeline_version.go | 93 ++- .../pipeline_upload_model/v1_relationship.go | 21 +- .../pipeline_upload_model/v1_resource_key.go | 49 +- .../v1_resource_reference.go | 72 +- .../pipeline_upload_model/v1_resource_type.go | 21 +- .../pipeline_upload_model/v1_status.go | 86 --- .../pipeline_upload_model/v1_url.go | 9 +- .../go_http_client/run_client/run_client.go | 11 +- .../run_service/archive_run_parameters.go | 136 ---- .../run_service/archive_run_responses.go | 110 --- .../run_service/create_run_parameters.go | 136 ---- .../run_service/create_run_responses.go | 112 --- .../run_service/delete_run_parameters.go | 136 ---- .../run_service/delete_run_responses.go | 110 --- .../run_service/get_run_parameters.go | 136 ---- .../run_service/get_run_responses.go | 112 --- .../run_service/list_runs_parameters.go | 326 -------- .../run_service/list_runs_responses.go | 112 --- .../run_service/read_artifact_parameters.go | 178 ----- .../run_service/read_artifact_responses.go | 112 --- .../report_run_metrics_parameters.go | 157 ---- .../report_run_metrics_responses.go | 112 --- .../run_service/retry_run_parameters.go | 136 ---- .../run_service/retry_run_responses.go | 110 --- .../run_service_archive_run_parameters.go | 151 ++++ .../run_service_archive_run_responses.go | 180 +++++ .../run_service/run_service_client.go | 343 ++++++--- .../run_service_create_run_parameters.go | 150 ++++ .../run_service_create_run_responses.go | 182 +++++ .../run_service_delete_run_parameters.go | 151 ++++ .../run_service_delete_run_responses.go | 180 +++++ .../run_service_get_run_parameters.go | 151 ++++ .../run_service_get_run_responses.go | 182 +++++ .../run_service_list_runs_parameters.go | 355 +++++++++ .../run_service_list_runs_responses.go | 182 +++++ .../run_service_read_artifact_parameters.go | 195 +++++ .../run_service_read_artifact_responses.go | 182 +++++ ...n_service_report_run_metrics_parameters.go | 168 +++++ ...un_service_report_run_metrics_responses.go | 288 +++++++ .../run_service_retry_run_parameters.go | 151 ++++ .../run_service_retry_run_responses.go | 180 +++++ .../run_service_terminate_run_parameters.go | 151 ++++ .../run_service_terminate_run_responses.go | 180 +++++ .../run_service_unarchive_run_parameters.go | 151 ++++ .../run_service_unarchive_run_responses.go | 180 +++++ .../run_service/terminate_run_parameters.go | 136 ---- .../run_service/terminate_run_responses.go | 110 --- .../run_service/unarchive_run_parameters.go | 136 ---- .../run_service/unarchive_run_responses.go | 110 --- .../run_model/googlerpc_status.go | 122 +++ .../run_model/pipeline_spec_runtime_config.go | 39 +- .../go_http_client/run_model/protobuf_any.go | 131 ++-- ...trics_response_report_run_metric_result.go | 49 +- ...esponse_report_run_metric_result_status.go | 29 +- .../run_model/run_metric_format.go | 25 +- .../run_model/v1_list_runs_response.go | 42 +- .../go_http_client/run_model/v1_parameter.go | 9 +- .../run_model/v1_pipeline_runtime.go | 9 +- .../run_model/v1_pipeline_spec.go | 65 +- .../run_model/v1_read_artifact_response.go | 24 +- .../run_model/v1_relationship.go | 21 +- .../v1_report_run_metrics_request.go | 83 --- .../v1_report_run_metrics_response.go | 42 +- .../run_model/v1_resource_key.go | 49 +- .../run_model/v1_resource_reference.go | 72 +- .../run_model/v1_resource_type.go | 21 +- .../api/v1/go_http_client/run_model/v1_run.go | 130 +++- .../go_http_client/run_model/v1_run_detail.go | 60 +- .../go_http_client/run_model/v1_run_metric.go | 49 +- .../run_model/v1_run_storage_state.go | 21 +- .../v1/go_http_client/run_model/v1_status.go | 86 --- .../v1/go_http_client/run_model/v1_value.go | 9 +- .../visualization_client.go | 11 +- .../create_visualization_parameters.go | 154 ---- .../create_visualization_responses.go | 112 --- .../visualization_service_client.go | 46 +- ...service_create_visualization_parameters.go | 169 +++++ ..._service_create_visualization_responses.go | 182 +++++ .../visualization_model/googlerpc_status.go | 122 +++ .../visualization_model/protobuf_any.go | 131 ++-- .../visualization_model/v1_status.go | 86 --- .../visualization_model/v1_visualization.go | 49 +- .../v1_visualization_type.go | 21 +- backend/api/v1/google/api/annotations.proto | 31 + backend/api/v1/google/api/http.proto | 379 ++++++++++ backend/api/v1/healthz.proto | 6 +- backend/api/v1/job.proto | 44 +- backend/api/v1/pipeline.proto | 54 +- backend/api/v1/pipeline_spec.proto | 18 +- backend/api/v1/python_http_client/README.md | 90 +-- .../docs/ExperimentServiceApi.md | 76 +- .../docs/{V1Status.md => GooglerpcStatus.md} | 4 +- .../docs/HealthzServiceApi.md | 12 +- ...rtRunMetricsRequest.md => InlineObject.md} | 3 +- .../python_http_client/docs/JobServiceApi.md | 76 +- .../docs/PipelineServiceApi.md | 144 ++-- .../docs/PipelineUploadServiceApi.md | 24 +- .../v1/python_http_client/docs/ProtobufAny.md | 3 +- .../python_http_client/docs/RunServiceApi.md | 128 ++-- .../kfp_tekton_server_api/__init__.py | 12 +- .../api/experiment_service_api.py | 108 +-- .../api/healthz_service_api.py | 18 +- .../api/job_service_api.py | 108 +-- .../api/pipeline_service_api.py | 198 ++--- .../api/pipeline_upload_service_api.py | 42 +- .../api/run_service_api.py | 174 ++--- .../kfp_tekton_server_api/api_client.py | 8 +- .../kfp_tekton_server_api/configuration.py | 10 +- .../kfp_tekton_server_api/exceptions.py | 6 +- .../kfp_tekton_server_api/models/__init__.py | 10 +- .../{v1_status.py => googlerpc_status.py} | 78 +- ...un_metrics_request.py => inline_object.py} | 52 +- .../kfp_tekton_server_api/models/job_mode.py | 6 +- .../models/pipeline_spec_runtime_config.py | 6 +- .../models/protobuf_any.py | 69 +- ...trics_response_report_run_metric_result.py | 6 +- ...esponse_report_run_metric_result_status.py | 6 +- .../models/run_metric_format.py | 6 +- .../models/v1_cron_schedule.py | 6 +- .../models/v1_experiment.py | 6 +- .../models/v1_experiment_storage_state.py | 6 +- .../models/v1_get_healthz_response.py | 6 +- .../models/v1_get_template_response.py | 6 +- .../kfp_tekton_server_api/models/v1_job.py | 6 +- .../models/v1_list_experiments_response.py | 6 +- .../models/v1_list_jobs_response.py | 6 +- .../v1_list_pipeline_versions_response.py | 6 +- .../models/v1_list_pipelines_response.py | 6 +- .../models/v1_list_runs_response.py | 6 +- .../models/v1_parameter.py | 6 +- .../models/v1_periodic_schedule.py | 6 +- .../models/v1_pipeline.py | 6 +- .../models/v1_pipeline_runtime.py | 6 +- .../models/v1_pipeline_spec.py | 6 +- .../models/v1_pipeline_version.py | 6 +- .../models/v1_read_artifact_response.py | 6 +- .../models/v1_relationship.py | 6 +- .../models/v1_report_run_metrics_response.py | 6 +- .../models/v1_resource_key.py | 6 +- .../models/v1_resource_reference.py | 6 +- .../models/v1_resource_type.py | 6 +- .../kfp_tekton_server_api/models/v1_run.py | 6 +- .../models/v1_run_detail.py | 6 +- .../models/v1_run_metric.py | 6 +- .../models/v1_run_storage_state.py | 6 +- .../models/v1_trigger.py | 6 +- .../kfp_tekton_server_api/models/v1_url.py | 6 +- .../kfp_tekton_server_api/models/v1_value.py | 6 +- .../kfp_tekton_server_api/rest.py | 6 +- backend/api/v1/python_http_client/setup.py | 6 +- .../test/test_experiment_service_api.py | 30 +- ..._v1_status.py => test_googlerpc_status.py} | 32 +- .../test/test_healthz_service_api.py | 10 +- ...trics_request.py => test_inline_object.py} | 25 +- .../python_http_client/test/test_job_mode.py | 6 +- .../test/test_job_service_api.py | 30 +- .../test/test_pipeline_service_api.py | 50 +- .../test/test_pipeline_spec_runtime_config.py | 6 +- .../test/test_pipeline_upload_service_api.py | 14 +- .../test/test_protobuf_any.py | 9 +- ...trics_response_report_run_metric_result.py | 6 +- ...esponse_report_run_metric_result_status.py | 6 +- .../test/test_run_metric_format.py | 6 +- .../test/test_run_service_api.py | 46 +- .../test/test_v1_cron_schedule.py | 6 +- .../test/test_v1_experiment.py | 6 +- .../test/test_v1_experiment_storage_state.py | 6 +- .../test/test_v1_get_healthz_response.py | 6 +- .../test/test_v1_get_template_response.py | 6 +- .../v1/python_http_client/test/test_v1_job.py | 6 +- .../test/test_v1_list_experiments_response.py | 6 +- .../test/test_v1_list_jobs_response.py | 6 +- ...test_v1_list_pipeline_versions_response.py | 6 +- .../test/test_v1_list_pipelines_response.py | 6 +- .../test/test_v1_list_runs_response.py | 6 +- .../test/test_v1_parameter.py | 6 +- .../test/test_v1_periodic_schedule.py | 6 +- .../test/test_v1_pipeline.py | 6 +- .../test/test_v1_pipeline_runtime.py | 6 +- .../test/test_v1_pipeline_spec.py | 6 +- .../test/test_v1_pipeline_version.py | 6 +- .../test/test_v1_read_artifact_response.py | 6 +- .../test/test_v1_relationship.py | 6 +- .../test_v1_report_run_metrics_response.py | 6 +- .../test/test_v1_resource_key.py | 6 +- .../test/test_v1_resource_reference.py | 6 +- .../test/test_v1_resource_type.py | 6 +- .../v1/python_http_client/test/test_v1_run.py | 6 +- .../test/test_v1_run_detail.py | 6 +- .../test/test_v1_run_metric.py | 6 +- .../test/test_v1_run_storage_state.py | 6 +- .../test/test_v1_trigger.py | 6 +- .../v1/python_http_client/test/test_v1_url.py | 6 +- .../python_http_client/test/test_v1_value.py | 6 +- backend/api/v1/report.proto | 2 +- backend/api/v1/run.proto | 56 +- backend/api/v1/swagger/auth.swagger.json | 48 +- backend/api/v1/swagger/error.swagger.json | 36 +- .../api/v1/swagger/experiment.swagger.json | 92 +-- backend/api/v1/swagger/filter.swagger.json | 36 +- backend/api/v1/swagger/healthz.swagger.json | 58 +- backend/api/v1/swagger/job.swagger.json | 94 ++- .../swagger/kfp_api_single_file.swagger.json | 335 ++++----- backend/api/v1/swagger/parameter.swagger.json | 36 +- backend/api/v1/swagger/pipeline.swagger.json | 124 ++-- .../v1/swagger/pipeline.upload.swagger.json | 49 +- .../api/v1/swagger/pipeline_spec.swagger.json | 36 +- backend/api/v1/swagger/report.swagger.json | 61 +- .../swagger/resource_reference.swagger.json | 36 +- backend/api/v1/swagger/run.swagger.json | 145 ++-- backend/api/v1/swagger/task.swagger.json | 54 +- .../api/v1/swagger/visualization.swagger.json | 49 +- backend/api/v1/task.proto | 16 +- backend/api/v1/visualization.proto | 4 +- backend/src/apiserver/filter/filter.go | 2 +- backend/src/apiserver/filter/filter_test.go | 9 +- backend/src/apiserver/main.go | 2 +- .../server/list_request_util_test.go | 2 +- .../client/api_server/experiment_client.go | 68 +- .../api_server/experiment_client_fake.go | 16 +- .../common/client/api_server/job_client.go | 70 +- .../client/api_server/job_client_fake.go | 18 +- .../client/api_server/pipeline_client.go | 102 +-- .../client/api_server/pipeline_client_fake.go | 20 +- .../api_server/pipeline_upload_client.go | 20 +- .../api_server/pipeline_upload_client_fake.go | 4 +- .../common/client/api_server/run_client.go | 70 +- .../client/api_server/run_client_fake.go | 12 +- .../client/api_server/visualization_client.go | 14 +- .../api_server/visualization_client_fake.go | 6 +- backend/third_party_licenses/apiserver.csv | 1 - backend/third_party_licenses/cache_server.csv | 1 - .../persistence_agent.csv | 1 - backend/third_party_licenses/swf.csv | 1 - go.mod | 2 +- sdk/python/kfp_tekton/_client.py | 275 ++++++- sdk/python/requirements.in | 2 +- sdk/python/requirements.txt | 2 +- sdk/python/setup.py | 2 +- 433 files changed, 24742 insertions(+), 15686 deletions(-) delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/archive_experiment_parameters.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/archive_experiment_responses.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/create_experiment_parameters.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/create_experiment_responses.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/delete_experiment_parameters.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/delete_experiment_responses.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_parameters.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_responses.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_parameters.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_responses.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_parameters.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_responses.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_parameters.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_responses.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiment_parameters.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiment_responses.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_parameters.go create mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_responses.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/get_experiment_parameters.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/get_experiment_responses.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/list_experiment_parameters.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/list_experiment_responses.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/unarchive_experiment_parameters.go delete mode 100644 backend/api/v1/go_http_client/experiment_client/experiment_service/unarchive_experiment_responses.go create mode 100644 backend/api/v1/go_http_client/experiment_model/googlerpc_status.go delete mode 100644 backend/api/v1/go_http_client/experiment_model/v1_status.go delete mode 100644 backend/api/v1/go_http_client/healthz_client/healthz_service/get_healthz_parameters.go delete mode 100644 backend/api/v1/go_http_client/healthz_client/healthz_service/get_healthz_responses.go create mode 100644 backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go create mode 100644 backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go create mode 100644 backend/api/v1/go_http_client/healthz_model/googlerpc_status.go delete mode 100644 backend/api/v1/go_http_client/healthz_model/v1_status.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/create_job_parameters.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/create_job_responses.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/delete_job_parameters.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/delete_job_responses.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/disable_job_parameters.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/disable_job_responses.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/enable_job_parameters.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/enable_job_responses.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/get_job_parameters.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/get_job_responses.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_create_job_parameters.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_create_job_responses.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_delete_job_parameters.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_delete_job_responses.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_disable_job_parameters.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_disable_job_responses.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_enable_job_parameters.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_enable_job_responses.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_get_job_parameters.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_get_job_responses.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_list_jobs_parameters.go create mode 100644 backend/api/v1/go_http_client/job_client/job_service/job_service_list_jobs_responses.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/list_jobs_parameters.go delete mode 100644 backend/api/v1/go_http_client/job_client/job_service/list_jobs_responses.go create mode 100644 backend/api/v1/go_http_client/job_model/googlerpc_status.go create mode 100644 backend/api/v1/go_http_client/job_model/v1_job.go-- create mode 100644 backend/api/v1/go_http_client/job_model/v1_periodic_schedule.go-- delete mode 100644 backend/api/v1/go_http_client/job_model/v1_status.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_version_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_version_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_version_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_version_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_template_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_template_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_template_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_template_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipeline_versions_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipeline_versions_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipelines_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipelines_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_model/googlerpc_status.go delete mode 100644 backend/api/v1/go_http_client/pipeline_model/v1_status.go create mode 100644 backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_version_parameters.go create mode 100644 backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_version_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go delete mode 100644 backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go delete mode 100644 backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go create mode 100644 backend/api/v1/go_http_client/pipeline_upload_model/googlerpc_status.go delete mode 100644 backend/api/v1/go_http_client/pipeline_upload_model/v1_status.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/archive_run_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/archive_run_responses.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/create_run_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/create_run_responses.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/delete_run_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/delete_run_responses.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/get_run_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/get_run_responses.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/list_runs_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/list_runs_responses.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/read_artifact_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/read_artifact_responses.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/report_run_metrics_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/report_run_metrics_responses.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/retry_run_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/retry_run_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_archive_run_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_archive_run_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_create_run_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_create_run_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_delete_run_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_delete_run_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_get_run_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_get_run_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_list_runs_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_list_runs_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_read_artifact_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_read_artifact_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_report_run_metrics_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_report_run_metrics_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_retry_run_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_retry_run_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_terminate_run_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_terminate_run_responses.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_unarchive_run_parameters.go create mode 100644 backend/api/v1/go_http_client/run_client/run_service/run_service_unarchive_run_responses.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/terminate_run_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/terminate_run_responses.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/unarchive_run_parameters.go delete mode 100644 backend/api/v1/go_http_client/run_client/run_service/unarchive_run_responses.go create mode 100644 backend/api/v1/go_http_client/run_model/googlerpc_status.go delete mode 100644 backend/api/v1/go_http_client/run_model/v1_report_run_metrics_request.go delete mode 100644 backend/api/v1/go_http_client/run_model/v1_status.go delete mode 100644 backend/api/v1/go_http_client/visualization_client/visualization_service/create_visualization_parameters.go delete mode 100644 backend/api/v1/go_http_client/visualization_client/visualization_service/create_visualization_responses.go create mode 100644 backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_parameters.go create mode 100644 backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_responses.go create mode 100644 backend/api/v1/go_http_client/visualization_model/googlerpc_status.go delete mode 100644 backend/api/v1/go_http_client/visualization_model/v1_status.go create mode 100644 backend/api/v1/google/api/annotations.proto create mode 100644 backend/api/v1/google/api/http.proto rename backend/api/v1/python_http_client/docs/{V1Status.md => GooglerpcStatus.md} (87%) rename backend/api/v1/python_http_client/docs/{V1ReportRunMetricsRequest.md => InlineObject.md} (77%) rename backend/api/v1/python_http_client/kfp_tekton_server_api/models/{v1_status.py => googlerpc_status.py} (67%) rename backend/api/v1/python_http_client/kfp_tekton_server_api/models/{v1_report_run_metrics_request.py => inline_object.py} (64%) rename backend/api/v1/python_http_client/test/{test_v1_status.py => test_googlerpc_status.py} (57%) rename backend/api/v1/python_http_client/test/{test_v1_report_run_metrics_request.py => test_inline_object.py} (61%) diff --git a/backend/api/Dockerfile b/backend/api/Dockerfile index e7092c293d..b72d04f735 100644 --- a/backend/api/Dockerfile +++ b/backend/api/Dockerfile @@ -14,10 +14,10 @@ # Generate client code (go & json) from API protocol buffers FROM golang:1.15.10 as generator -ENV GRPC_GATEWAY_VERSION v1.9.0 -ENV GO_SWAGGER_VERSION v0.18.0 -ENV GOLANG_PROTOBUF_VERSION v1.5.1 -ENV GRPC_VERSION v1.23.0 +ENV GRPC_GATEWAY_VERSION v2.11.3 +ENV GO_SWAGGER_VERSION v0.30.4 +ENV GOLANG_PROTOBUF_VERSION v1.5.2 +ENV GRPC_VERSION v1.48.0 ENV PROTOC_VERSION 3.17.3 ENV GOBIN=/go/bin @@ -38,9 +38,10 @@ RUN mkdir grpc && git clone --depth 1 --branch $GRPC_VERSION https://github.com/ # Install protoc-gen-rpc-gateway && protoc-gen-swagger. RUN cd grpc-ecosystem/grpc-gateway && GO111MODULE=on go mod vendor RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway -RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger +RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2 # Download go-swagger binary. +# swagger doesn't exist for openapiv2 yet RUN curl -LO "https://github.com/go-swagger/go-swagger/releases/download/${GO_SWAGGER_VERSION}/swagger_linux_amd64" RUN chmod +x swagger_linux_amd64 && mv swagger_linux_amd64 /usr/bin/swagger diff --git a/backend/api/Makefile b/backend/api/Makefile index 3b6b9bd517..c18e035c68 100644 --- a/backend/api/Makefile +++ b/backend/api/Makefile @@ -17,7 +17,9 @@ IMAGE_TAG=kfp-api-generator # Contact one of Bobgy, or zijianjoy if this remote image needs an update. REMOTE_IMAGE=gcr.io/ml-pipeline-test/api-generator -PREBUILT_REMOTE_IMAGE=gcr.io/ml-pipeline-test/api-generator@sha256:10a09669794180b91c8b0fffb803db81eb458372e6ab669051f40d4979cdf43c +PREBUILT_REMOTE_IMAGE=aipipeline/api-generator:openapiv2.11.3 +# PREBUILT_REMOTE_IMAGE=aipipeline/api-generator:test +API_VERSION=v1 # Generate clients using a pre-built api-generator image. .PHONY: generate diff --git a/backend/api/build_kfp_server_api_python_package.sh b/backend/api/build_kfp_server_api_python_package.sh index fe434c8dd1..6d054cd576 100755 --- a/backend/api/build_kfp_server_api_python_package.sh +++ b/backend/api/build_kfp_server_api_python_package.sh @@ -34,6 +34,8 @@ if [ -z "$VERSION" ]; then echo "ERROR: $REPO_ROOT/VERSION is empty" exit 1 fi +API_VERSION=v1 + codegen_file=/tmp/openapi-generator-cli.jar # Browse all versions in: https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/ diff --git a/backend/api/hack/generator.sh b/backend/api/hack/generator.sh index e8be365b7f..72066474b1 100755 --- a/backend/api/hack/generator.sh +++ b/backend/api/hack/generator.sh @@ -35,18 +35,16 @@ mkdir -p backend/api/${API_VERSION}/go_client # Generate *.pb.go (grpc api client) from *.proto. ${PROTOCCOMPILER} -I. -Ibackend/api/${API_VERSION} \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ -I/go/src/github.com/grpc-ecosystem/grpc-gateway/ \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/ \ + -I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2/options/ \ -I/usr/include/ \ --plugin=protoc-gen-go=/go/bin/protoc-gen-go \ --go_out=plugins=grpc:${TMP_OUTPUT} \ backend/api/${API_VERSION}/*.proto # Generate *.pb.gw.go (grpc api rest client) from *.proto. ${PROTOCCOMPILER} -I. -Ibackend/api/${API_VERSION} \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ -I/go/src/github.com/grpc-ecosystem/grpc-gateway/ \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/ \ + -I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2/options/ \ -I/usr/include/ \ --plugin=protoc-gen-grpc-gateway=/go/bin/protoc-gen-grpc-gateway \ --grpc-gateway_out=logtostderr=true:${TMP_OUTPUT} \ @@ -55,12 +53,11 @@ ${PROTOCCOMPILER} -I. -Ibackend/api/${API_VERSION} \ cp ${TMP_OUTPUT}/github.com/kubeflow/pipelines/backend/api/${API_VERSION}/go_client/* ./backend/api/${API_VERSION}/go_client # Generate *.swagger.json from *.proto into swagger folder. ${PROTOCCOMPILER} -I. -Ibackend/api/${API_VERSION} \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ -I/go/src/github.com/grpc-ecosystem/grpc-gateway/ \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/ \ + -I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2/options/ \ -I//usr/include/ \ - --plugin=protoc-gen-swagger=/go/bin/protoc-gen-swagger \ - --swagger_out=logtostderr=true:${TMP_OUTPUT} \ + --plugin=protoc-gen-openapiv2=/go/bin/protoc-gen-openapiv2 \ + --openapiv2_out=logtostderr=true,json_names_for_fields=false:${TMP_OUTPUT} \ backend/api/${API_VERSION}/*.proto # Move *.swagger.json files into swagger folder. cp -a ${TMP_OUTPUT}/backend/api/${API_VERSION}/*.swagger.json ./backend/api/${API_VERSION}/swagger diff --git a/backend/api/v1/auth.proto b/backend/api/v1/auth.proto index 679f0728d0..f22bb788ca 100644 --- a/backend/api/v1/auth.proto +++ b/backend/api/v1/auth.proto @@ -19,9 +19,9 @@ package v1; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { responses: { key: "default"; value: { diff --git a/backend/api/v1/error.proto b/backend/api/v1/error.proto index db103b8aa5..959310bea2 100644 --- a/backend/api/v1/error.proto +++ b/backend/api/v1/error.proto @@ -20,8 +20,8 @@ package v1; import "google/protobuf/any.proto"; message Error { - string error_message = 1; - string error_details = 2; + string error_message = 1 [json_name = "error_message"]; + string error_details = 2 [json_name = "error_details"]; } message Status { diff --git a/backend/api/v1/experiment.proto b/backend/api/v1/experiment.proto index 265e0791b0..6ee2419b65 100644 --- a/backend/api/v1/experiment.proto +++ b/backend/api/v1/experiment.proto @@ -22,9 +22,9 @@ import "backend/api/v1/resource_reference.proto"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { responses: { key: "default"; value: { @@ -120,16 +120,16 @@ message ListExperimentsRequest { // 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. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // 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. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). @@ -138,7 +138,7 @@ message ListExperimentsRequest { // What resource reference to filter on. // For Experiment, the only valid resource type is Namespace. An sample query string could be // resource_reference_key.type=NAMESPACE&resource_reference_key.id=ns1 - ResourceKey resource_reference_key = 5; + ResourceKey resource_reference_key = 5 [json_name = "resource_reference_key"]; } message ListExperimentsResponse { @@ -146,10 +146,10 @@ message ListExperimentsResponse { repeated Experiment experiments = 1; // The total number of experiments for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; // The token to list the next page of experiments. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; } message DeleteExperimentRequest { @@ -168,11 +168,11 @@ message Experiment { string description = 3; // Output. The time that the experiment created. - google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp created_at = 4 [json_name = "created_at"]; // Optional input field. Specify which resource this run belongs to. // For Experiment, the only valid resource reference is a single Namespace. - repeated ResourceReference resource_references = 5; + repeated ResourceReference resource_references = 5 [json_name = "resource_references"]; enum StorageState { STORAGESTATE_UNSPECIFIED = 0; @@ -181,7 +181,7 @@ message Experiment { } // Output. Specifies whether this experiment is in archived or available state. - StorageState storage_state = 6; + StorageState storage_state = 6 [json_name = "storage_state"]; } message ArchiveExperimentRequest { diff --git a/backend/api/v1/filter.proto b/backend/api/v1/filter.proto index e536315b17..60ca7e4d44 100644 --- a/backend/api/v1/filter.proto +++ b/backend/api/v1/filter.proto @@ -48,18 +48,18 @@ message Predicate { string key = 2; oneof value { - int32 int_value = 3; - int64 long_value = 4; - string string_value = 5; + int32 int_value = 3 [json_name = "int_value"]; + int64 long_value = 4 [json_name = "long_value"]; + string string_value = 5 [json_name = "string_value"]; // Timestamp values will be converted to Unix time (seconds since the epoch) // prior to being used in a filtering operation. - google.protobuf.Timestamp timestamp_value = 6; + google.protobuf.Timestamp timestamp_value = 6 [json_name = "timestamp_value"]; // Array values below are only meant to be used by the IN operator. - IntValues int_values = 7; - LongValues long_values = 8; - StringValues string_values = 9; + IntValues int_values = 7 [json_name = "int_values"]; + LongValues long_values = 8 [json_name = "long_values"]; + StringValues string_values = 9 [json_name = "string_values"]; } } diff --git a/backend/api/v1/go_client/auth.pb.go b/backend/api/v1/go_client/auth.pb.go index e59ff44b4b..18d4f0f961 100644 --- a/backend/api/v1/go_client/auth.pb.go +++ b/backend/api/v1/go_client/auth.pb.go @@ -22,7 +22,7 @@ package go_client import ( context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -215,42 +215,42 @@ var file_backend_api_v1_auth_proto_rawDesc = []byte{ 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, - 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x02, 0x0a, 0x10, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x04, 0x76, 0x65, 0x72, - 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x65, - 0x72, 0x62, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x22, 0x32, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x41, 0x53, 0x53, 0x49, 0x47, - 0x4e, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x56, 0x49, 0x45, 0x57, 0x45, 0x52, 0x53, 0x10, 0x01, 0x22, 0x3c, 0x0a, 0x04, - 0x56, 0x65, 0x72, 0x62, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, - 0x45, 0x44, 0x5f, 0x56, 0x45, 0x52, 0x42, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, - 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x02, 0x12, 0x0a, - 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x32, 0x5f, 0x0a, 0x0b, 0x41, 0x75, - 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x09, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x42, 0x87, 0x01, 0x5a, 0x36, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, - 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, - 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, + 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x02, 0x0a, 0x10, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x3c, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x04, 0x76, + 0x65, 0x72, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x56, 0x65, 0x72, 0x62, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x22, 0x32, 0x0a, 0x09, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x41, 0x53, 0x53, + 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x49, 0x45, 0x57, 0x45, 0x52, 0x53, 0x10, 0x01, 0x22, 0x3c, + 0x0a, 0x04, 0x56, 0x65, 0x72, 0x62, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x41, 0x53, 0x53, 0x49, + 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x56, 0x45, 0x52, 0x42, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x32, 0x5f, 0x0a, 0x0b, + 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x09, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x42, 0x87, 0x01, + 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, + 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, + 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, + 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/auth.pb.gw.go b/backend/api/v1/go_client/auth.pb.gw.go index a37306f466..3504c6dd3c 100644 --- a/backend/api/v1/go_client/auth.pb.gw.go +++ b/backend/api/v1/go_client/auth.pb.gw.go @@ -13,20 +13,23 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join var ( filter_AuthService_Authorize_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} @@ -36,7 +39,10 @@ func request_AuthService_Authorize_0(ctx context.Context, marshaler runtime.Mars var protoReq AuthorizeRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthService_Authorize_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_Authorize_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -45,6 +51,56 @@ func request_AuthService_Authorize_0(ctx context.Context, marshaler runtime.Mars } +func local_request_AuthService_Authorize_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AuthorizeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_Authorize_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Authorize(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". +// UnaryRPC :call AuthServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead. +func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error { + + mux.Handle("GET", pattern_AuthService_Authorize_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.AuthService/Authorize", runtime.WithHTTPPathPattern("/apis/v1/auth")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_Authorize_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_Authorize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -87,19 +143,21 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.AuthService/Authorize", runtime.WithHTTPPathPattern("/apis/v1/auth")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthService_Authorize_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_AuthService_Authorize_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AuthService_Authorize_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AuthService_Authorize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/backend/api/v1/go_client/error.pb.go b/backend/api/v1/go_client/error.pb.go index d7d73ce750..7e0fde51b5 100644 --- a/backend/api/v1/go_client/error.pb.go +++ b/backend/api/v1/go_client/error.pb.go @@ -40,8 +40,8 @@ type Error struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ErrorMessage string `protobuf:"bytes,1,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` - ErrorDetails string `protobuf:"bytes,2,opt,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty"` + ErrorMessage string `protobuf:"bytes,1,opt,name=error_message,proto3" json:"error_message,omitempty"` + ErrorDetails string `protobuf:"bytes,2,opt,name=error_details,proto3" json:"error_details,omitempty"` } func (x *Error) Reset() { @@ -159,23 +159,23 @@ var file_backend_api_v1_error_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x05, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x62, - 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x05, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x22, 0x62, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/experiment.pb.go b/backend/api/v1/go_client/experiment.pb.go index ce4106b877..c396d0cad9 100644 --- a/backend/api/v1/go_client/experiment.pb.go +++ b/backend/api/v1/go_client/experiment.pb.go @@ -22,7 +22,7 @@ package go_client import ( context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -195,21 +195,21 @@ type ListExperimentsRequest struct { // 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. - PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,1,opt,name=page_token,proto3" json:"page_token,omitempty"` // 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. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - SortBy string `protobuf:"bytes,3,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,3,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` // What resource reference to filter on. // For Experiment, the only valid resource type is Namespace. An sample query string could be // resource_reference_key.type=NAMESPACE&resource_reference_key.id=ns1 - ResourceReferenceKey *ResourceKey `protobuf:"bytes,5,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` + ResourceReferenceKey *ResourceKey `protobuf:"bytes,5,opt,name=resource_reference_key,proto3" json:"resource_reference_key,omitempty"` } func (x *ListExperimentsRequest) Reset() { @@ -287,9 +287,9 @@ type ListExperimentsResponse struct { // A list of experiments returned. Experiments []*Experiment `protobuf:"bytes,1,rep,name=experiments,proto3" json:"experiments,omitempty"` // The total number of experiments for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,proto3" json:"total_size,omitempty"` // The token to list the next page of experiments. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` } func (x *ListExperimentsResponse) Reset() { @@ -405,12 +405,12 @@ type Experiment struct { // Optional input field. Describing the purpose of the experiment Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // Output. The time that the experiment created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,proto3" json:"created_at,omitempty"` // Optional input field. Specify which resource this run belongs to. // For Experiment, the only valid resource reference is a single Namespace. - ResourceReferences []*ResourceReference `protobuf:"bytes,5,rep,name=resource_references,json=resourceReferences,proto3" json:"resource_references,omitempty"` + ResourceReferences []*ResourceReference `protobuf:"bytes,5,rep,name=resource_references,proto3" json:"resource_references,omitempty"` // Output. Specifies whether this experiment is in archived or available state. - StorageState Experiment_StorageState `protobuf:"varint,6,opt,name=storage_state,json=storageState,proto3,enum=v1.Experiment_StorageState" json:"storage_state,omitempty"` + StorageState Experiment_StorageState `protobuf:"varint,6,opt,name=storage_state,proto3,enum=v1.Experiment_StorageState" json:"storage_state,omitempty"` } func (x *Experiment) Reset() { @@ -598,123 +598,124 @@ var file_backend_api_v1_experiment_proto_rawDesc = []byte{ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, - 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, - 0x26, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, - 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, - 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x45, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, - 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x92, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, - 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, - 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, - 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x29, 0x0a, 0x17, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xfc, 0x02, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x46, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x40, - 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x22, 0x63, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, - 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, - 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, - 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, - 0x56, 0x45, 0x44, 0x10, 0x02, 0x22, 0x2a, 0x0a, 0x18, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, + 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x2c, 0x0a, 0x1a, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, - 0xa3, 0x05, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, - 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x14, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x5c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x21, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x67, - 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x6a, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x2a, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x11, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, - 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x3a, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x7a, 0x0a, 0x13, 0x55, 0x6e, 0x61, - 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x1e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, + 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x22, 0x26, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xd1, 0x01, 0x0a, 0x16, 0x4c, 0x69, + 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x95, 0x01, + 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x65, 0x78, 0x70, + 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, + 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, - 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x75, 0x6e, 0x61, 0x72, - 0x63, 0x68, 0x69, 0x76, 0x65, 0x42, 0x87, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, - 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, - 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0xff, 0x02, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x12, 0x47, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x63, 0x0a, + 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, + 0x18, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, + 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x56, 0x41, 0x49, + 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x4f, 0x52, 0x41, + 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, + 0x10, 0x02, 0x22, 0x2a, 0x0a, 0x18, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, + 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2c, + 0x0a, 0x1a, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, 0xa3, 0x05, 0x0a, + 0x11, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x14, 0x2f, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x3a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, + 0x12, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x67, 0x0a, 0x0e, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x6a, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x21, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x2a, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, + 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0x74, 0x0a, 0x11, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x23, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x61, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x7a, 0x0a, 0x13, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, + 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x23, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x42, 0x87, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, + 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, + 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, + 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, + 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/experiment.pb.gw.go b/backend/api/v1/go_client/experiment.pb.gw.go index 25afe4a373..1933228a69 100644 --- a/backend/api/v1/go_client/experiment.pb.gw.go +++ b/backend/api/v1/go_client/experiment.pb.gw.go @@ -13,20 +13,23 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_ExperimentService_CreateExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateExperimentRequest @@ -45,6 +48,23 @@ func request_ExperimentService_CreateExperiment_0(ctx context.Context, marshaler } +func local_request_ExperimentService_CreateExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateExperimentRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Experiment); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateExperiment(ctx, &protoReq) + return msg, metadata, err + +} + func request_ExperimentService_GetExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetExperimentRequest var metadata runtime.ServerMetadata @@ -62,7 +82,6 @@ func request_ExperimentService_GetExperiment_0(ctx context.Context, marshaler ru } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -72,6 +91,32 @@ func request_ExperimentService_GetExperiment_0(ctx context.Context, marshaler ru } +func local_request_ExperimentService_GetExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetExperimentRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetExperiment(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_ExperimentService_ListExperiment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -80,7 +125,10 @@ func request_ExperimentService_ListExperiment_0(ctx context.Context, marshaler r var protoReq ListExperimentsRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ExperimentService_ListExperiment_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExperimentService_ListExperiment_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -89,6 +137,22 @@ func request_ExperimentService_ListExperiment_0(ctx context.Context, marshaler r } +func local_request_ExperimentService_ListExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListExperimentsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExperimentService_ListExperiment_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListExperiment(ctx, &protoReq) + return msg, metadata, err + +} + func request_ExperimentService_DeleteExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteExperimentRequest var metadata runtime.ServerMetadata @@ -106,7 +170,6 @@ func request_ExperimentService_DeleteExperiment_0(ctx context.Context, marshaler } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -116,6 +179,32 @@ func request_ExperimentService_DeleteExperiment_0(ctx context.Context, marshaler } +func local_request_ExperimentService_DeleteExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteExperimentRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteExperiment(ctx, &protoReq) + return msg, metadata, err + +} + func request_ExperimentService_ArchiveExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ArchiveExperimentRequest var metadata runtime.ServerMetadata @@ -133,7 +222,6 @@ func request_ExperimentService_ArchiveExperiment_0(ctx context.Context, marshale } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -143,6 +231,32 @@ func request_ExperimentService_ArchiveExperiment_0(ctx context.Context, marshale } +func local_request_ExperimentService_ArchiveExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ArchiveExperimentRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.ArchiveExperiment(ctx, &protoReq) + return msg, metadata, err + +} + func request_ExperimentService_UnarchiveExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UnarchiveExperimentRequest var metadata runtime.ServerMetadata @@ -160,7 +274,6 @@ func request_ExperimentService_UnarchiveExperiment_0(ctx context.Context, marsha } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -170,6 +283,191 @@ func request_ExperimentService_UnarchiveExperiment_0(ctx context.Context, marsha } +func local_request_ExperimentService_UnarchiveExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UnarchiveExperimentRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.UnarchiveExperiment(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterExperimentServiceHandlerServer registers the http handlers for service ExperimentService to "mux". +// UnaryRPC :call ExperimentServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterExperimentServiceHandlerFromEndpoint instead. +func RegisterExperimentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExperimentServiceServer) error { + + mux.Handle("POST", pattern_ExperimentService_CreateExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.ExperimentService/CreateExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ExperimentService_CreateExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExperimentService_CreateExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ExperimentService_GetExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.ExperimentService/GetExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ExperimentService_GetExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExperimentService_GetExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ExperimentService_ListExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.ExperimentService/ListExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ExperimentService_ListExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExperimentService_ListExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_ExperimentService_DeleteExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.ExperimentService/DeleteExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ExperimentService_DeleteExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExperimentService_DeleteExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ExperimentService_ArchiveExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.ExperimentService/ArchiveExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments/{id}:archive")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ExperimentService_ArchiveExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExperimentService_ArchiveExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ExperimentService_UnarchiveExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.ExperimentService/UnarchiveExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments/{id}:unarchive")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ExperimentService_UnarchiveExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExperimentService_UnarchiveExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterExperimentServiceHandlerFromEndpoint is same as RegisterExperimentServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterExperimentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -212,19 +510,21 @@ func RegisterExperimentServiceHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.ExperimentService/CreateExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_CreateExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_CreateExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ExperimentService_CreateExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ExperimentService_CreateExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -232,19 +532,21 @@ func RegisterExperimentServiceHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.ExperimentService/GetExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_GetExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_GetExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ExperimentService_GetExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ExperimentService_GetExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -252,19 +554,21 @@ func RegisterExperimentServiceHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.ExperimentService/ListExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_ListExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_ListExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ExperimentService_ListExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ExperimentService_ListExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -272,19 +576,21 @@ func RegisterExperimentServiceHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.ExperimentService/DeleteExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_DeleteExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_DeleteExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ExperimentService_DeleteExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ExperimentService_DeleteExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -292,19 +598,21 @@ func RegisterExperimentServiceHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.ExperimentService/ArchiveExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments/{id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_ArchiveExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_ArchiveExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ExperimentService_ArchiveExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ExperimentService_ArchiveExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -312,19 +620,21 @@ func RegisterExperimentServiceHandlerClient(ctx context.Context, mux *runtime.Se ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.ExperimentService/UnarchiveExperiment", runtime.WithHTTPPathPattern("/apis/v1/experiments/{id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_UnarchiveExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_UnarchiveExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ExperimentService_UnarchiveExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ExperimentService_UnarchiveExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/backend/api/v1/go_client/filter.pb.go b/backend/api/v1/go_client/filter.pb.go index e8fd6eae52..a7aabf22c7 100644 --- a/backend/api/v1/go_client/filter.pb.go +++ b/backend/api/v1/go_client/filter.pb.go @@ -241,34 +241,34 @@ type isPredicate_Value interface { } type Predicate_IntValue struct { - IntValue int32 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"` + IntValue int32 `protobuf:"varint,3,opt,name=int_value,proto3,oneof"` } type Predicate_LongValue struct { - LongValue int64 `protobuf:"varint,4,opt,name=long_value,json=longValue,proto3,oneof"` + LongValue int64 `protobuf:"varint,4,opt,name=long_value,proto3,oneof"` } type Predicate_StringValue struct { - StringValue string `protobuf:"bytes,5,opt,name=string_value,json=stringValue,proto3,oneof"` + StringValue string `protobuf:"bytes,5,opt,name=string_value,proto3,oneof"` } type Predicate_TimestampValue struct { // Timestamp values will be converted to Unix time (seconds since the epoch) // prior to being used in a filtering operation. - TimestampValue *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp_value,json=timestampValue,proto3,oneof"` + TimestampValue *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp_value,proto3,oneof"` } type Predicate_IntValues struct { // Array values below are only meant to be used by the IN operator. - IntValues *IntValues `protobuf:"bytes,7,opt,name=int_values,json=intValues,proto3,oneof"` + IntValues *IntValues `protobuf:"bytes,7,opt,name=int_values,proto3,oneof"` } type Predicate_LongValues struct { - LongValues *LongValues `protobuf:"bytes,8,opt,name=long_values,json=longValues,proto3,oneof"` + LongValues *LongValues `protobuf:"bytes,8,opt,name=long_values,proto3,oneof"` } type Predicate_StringValues struct { - StringValues *StringValues `protobuf:"bytes,9,opt,name=string_values,json=stringValues,proto3,oneof"` + StringValues *StringValues `protobuf:"bytes,9,opt,name=string_values,proto3,oneof"` } func (*Predicate_IntValue) isPredicate_Value() {} @@ -523,60 +523,60 @@ var file_backend_api_v1_filter_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xaa, 0x04, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x20, + 0x22, 0xb1, 0x04, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x70, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, - 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x48, 0x00, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x31, - 0x0a, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x37, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x02, 0x4f, - 0x70, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, - 0x0a, 0x06, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, - 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x52, - 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, - 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, - 0x41, 0x4c, 0x53, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, - 0x41, 0x4e, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, - 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x07, 0x12, 0x06, 0x0a, 0x02, 0x49, 0x4e, - 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x54, 0x52, 0x49, - 0x4e, 0x47, 0x10, 0x09, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, - 0x09, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x22, 0x26, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x24, 0x0a, 0x0a, 0x4c, 0x6f, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x22, 0x37, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x70, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x32, 0x3b, 0x0a, 0x12, 0x44, 0x75, 0x6d, - 0x6d, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x25, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x0a, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x22, 0x00, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x24, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, + 0x00, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x48, 0x00, 0x52, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x22, 0x97, 0x01, 0x0a, 0x02, 0x4f, 0x70, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, + 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, + 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, + 0x4e, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, + 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, + 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4c, + 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, + 0x07, 0x12, 0x06, 0x0a, 0x02, 0x49, 0x4e, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x53, 0x5f, + 0x53, 0x55, 0x42, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x42, 0x07, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x09, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x26, 0x0a, 0x0c, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x22, 0x24, 0x0a, 0x0a, 0x4c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x37, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, + 0x32, 0x3b, 0x0a, 0x12, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, + 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x00, 0x42, 0x38, 0x5a, + 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, + 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, + 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/healthz.pb.go b/backend/api/v1/go_client/healthz.pb.go index 148c837903..54d0ca2f70 100644 --- a/backend/api/v1/go_client/healthz.pb.go +++ b/backend/api/v1/go_client/healthz.pb.go @@ -22,7 +22,7 @@ package go_client import ( context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -47,7 +47,7 @@ type GetHealthzResponse struct { unknownFields protoimpl.UnknownFields // Returns if KFP in multi-user mode - MultiUser bool `protobuf:"varint,3,opt,name=multi_user,json=multiUser,proto3" json:"multi_user,omitempty"` + MultiUser bool `protobuf:"varint,3,opt,name=multi_user,proto3" json:"multi_user,omitempty"` } func (x *GetHealthzResponse) Reset() { @@ -97,31 +97,31 @@ var file_backend_api_v1_healthz_proto_rawDesc = []byte{ 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, - 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x55, 0x73, 0x65, 0x72, 0x32, 0x68, 0x0a, 0x0e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, - 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x12, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x68, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x42, 0x87, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, - 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, - 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x32, + 0x68, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x56, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x42, 0x87, 0x01, 0x5a, 0x36, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, + 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, + 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/healthz.pb.gw.go b/backend/api/v1/go_client/healthz.pb.gw.go index 3086933387..a1307901f5 100644 --- a/backend/api/v1/go_client/healthz.pb.gw.go +++ b/backend/api/v1/go_client/healthz.pb.gw.go @@ -13,21 +13,24 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/emptypb" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_HealthzService_GetHealthz_0(ctx context.Context, marshaler runtime.Marshaler, client HealthzServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq emptypb.Empty @@ -38,6 +41,49 @@ func request_HealthzService_GetHealthz_0(ctx context.Context, marshaler runtime. } +func local_request_HealthzService_GetHealthz_0(ctx context.Context, marshaler runtime.Marshaler, server HealthzServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := server.GetHealthz(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterHealthzServiceHandlerServer registers the http handlers for service HealthzService to "mux". +// UnaryRPC :call HealthzServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHealthzServiceHandlerFromEndpoint instead. +func RegisterHealthzServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthzServiceServer) error { + + mux.Handle("GET", pattern_HealthzService_GetHealthz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.HealthzService/GetHealthz", runtime.WithHTTPPathPattern("/apis/v1/healthz")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HealthzService_GetHealthz_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_HealthzService_GetHealthz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterHealthzServiceHandlerFromEndpoint is same as RegisterHealthzServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterHealthzServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -80,19 +126,21 @@ func RegisterHealthzServiceHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.HealthzService/GetHealthz", runtime.WithHTTPPathPattern("/apis/v1/healthz")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_HealthzService_GetHealthz_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_HealthzService_GetHealthz_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_HealthzService_GetHealthz_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_HealthzService_GetHealthz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/backend/api/v1/go_client/job.pb.go b/backend/api/v1/go_client/job.pb.go index 34e0f74223..a839c410de 100644 --- a/backend/api/v1/go_client/job.pb.go +++ b/backend/api/v1/go_client/job.pb.go @@ -22,7 +22,7 @@ package go_client import ( context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -197,18 +197,18 @@ type ListJobsRequest struct { // 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. - PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,1,opt,name=page_token,proto3" json:"page_token,omitempty"` // 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. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // Can be format of "field_name", "field_name asc" or "field_name desc". // Ascending by default. - SortBy string `protobuf:"bytes,3,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,3,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // What resource reference to filter on. // E.g. If listing job for an experiment, the query string would be // resource_reference_key.type=EXPERIMENT&resource_reference_key.id=123 - ResourceReferenceKey *ResourceKey `protobuf:"bytes,4,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` + ResourceReferenceKey *ResourceKey `protobuf:"bytes,4,opt,name=resource_reference_key,proto3" json:"resource_reference_key,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` @@ -289,9 +289,9 @@ type ListJobsResponse struct { // A list of jobs returned. Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` // The total number of jobs for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,proto3" json:"total_size,omitempty"` // The token to list the next page of jobs. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` } func (x *ListJobsResponse) Reset() { @@ -498,9 +498,9 @@ type CronSchedule struct { unknownFields protoimpl.UnknownFields // The start time of the cron job - StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,proto3" json:"start_time,omitempty"` // The end time of the cron job - EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,proto3" json:"end_time,omitempty"` // The cron string. For details how to compose a cron, visit // ttps://en.wikipedia.org/wiki/Cron Cron string `protobuf:"bytes,3,opt,name=cron,proto3" json:"cron,omitempty"` @@ -566,11 +566,11 @@ type PeriodicSchedule struct { unknownFields protoimpl.UnknownFields // The start time of the periodic job - StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,proto3" json:"start_time,omitempty"` // The end time of the periodic job - EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,proto3" json:"end_time,omitempty"` // The time interval between the starting time of consecutive jobs - IntervalSecond int64 `protobuf:"varint,3,opt,name=interval_second,json=intervalSecond,proto3" json:"interval_second,omitempty"` + IntervalSecond int64 `protobuf:"varint,3,opt,name=interval_second,proto3" json:"interval_second,omitempty"` } func (x *PeriodicSchedule) Reset() { @@ -696,11 +696,11 @@ type isTrigger_Trigger interface { } type Trigger_CronSchedule struct { - CronSchedule *CronSchedule `protobuf:"bytes,1,opt,name=cron_schedule,json=cronSchedule,proto3,oneof"` + CronSchedule *CronSchedule `protobuf:"bytes,1,opt,name=cron_schedule,proto3,oneof"` } type Trigger_PeriodicSchedule struct { - PeriodicSchedule *PeriodicSchedule `protobuf:"bytes,2,opt,name=periodic_schedule,json=periodicSchedule,proto3,oneof"` + PeriodicSchedule *PeriodicSchedule `protobuf:"bytes,2,opt,name=periodic_schedule,proto3,oneof"` } func (*Trigger_CronSchedule) isTrigger_Trigger() {} @@ -721,22 +721,22 @@ type Job struct { // Required input field. // Describing what the pipeline manifest and parameters to use // for the scheduled job. - PipelineSpec *PipelineSpec `protobuf:"bytes,4,opt,name=pipeline_spec,json=pipelineSpec,proto3" json:"pipeline_spec,omitempty"` + PipelineSpec *PipelineSpec `protobuf:"bytes,4,opt,name=pipeline_spec,proto3" json:"pipeline_spec,omitempty"` // Optional input field. Specify which resource this job belongs to. - ResourceReferences []*ResourceReference `protobuf:"bytes,5,rep,name=resource_references,json=resourceReferences,proto3" json:"resource_references,omitempty"` + ResourceReferences []*ResourceReference `protobuf:"bytes,5,rep,name=resource_references,proto3" json:"resource_references,omitempty"` // Optional input field. Specify which Kubernetes service account this job uses. - ServiceAccount string `protobuf:"bytes,18,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` + ServiceAccount string `protobuf:"bytes,18,opt,name=service_account,proto3" json:"service_account,omitempty"` // Required input field. // Specify how many runs can be executed concurrently. Rage [1-10] - MaxConcurrency int64 `protobuf:"varint,6,opt,name=max_concurrency,json=maxConcurrency,proto3" json:"max_concurrency,omitempty"` + MaxConcurrency int64 `protobuf:"varint,6,opt,name=max_concurrency,proto3" json:"max_concurrency,omitempty"` // Required input field. // Specify how a run is triggered. Support cron mode or periodic mode. Trigger *Trigger `protobuf:"bytes,7,opt,name=trigger,proto3" json:"trigger,omitempty"` Mode Job_Mode `protobuf:"varint,8,opt,name=mode,proto3,enum=v1.Job_Mode" json:"mode,omitempty"` // Output. The time this job is created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,proto3" json:"created_at,omitempty"` // Output. The last time this job is updated. - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,proto3" json:"updated_at,omitempty"` // Output. The status of the job. // One of [Enable, Disable, Error] Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` @@ -749,7 +749,7 @@ type Job struct { // 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. - NoCatchup bool `protobuf:"varint,17,opt,name=no_catchup,json=noCatchup,proto3" json:"no_catchup,omitempty"` + NoCatchup bool `protobuf:"varint,17,opt,name=no_catchup,proto3" json:"no_catchup,omitempty"` } func (x *Job) Reset() { @@ -904,154 +904,155 @@ var file_backend_api_v1_job_proto_rawDesc = []byte{ 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, - 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x2d, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, - 0x22, 0x1f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0xc5, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x45, 0x0a, 0x16, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x14, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4b, 0x65, - 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x76, 0x0a, 0x10, 0x4c, 0x69, 0x73, - 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, - 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, - 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x22, 0x22, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x94, - 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, - 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, - 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x22, 0xad, 0x01, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x69, 0x63, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, + 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, + 0x6f, 0x62, 0x22, 0x1f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0xca, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x12, + 0x47, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, + 0x52, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x22, 0x79, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, 0x6f, 0x62, + 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x22, 0x0a, 0x10, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x22, 0x0a, 0x10, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x6f, + 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x92, 0x01, 0x0a, 0x07, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x12, 0x37, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x72, - 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x43, 0x0a, 0x11, 0x70, 0x65, + 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x72, 0x6f, + 0x6e, 0x22, 0xb0, 0x01, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x94, 0x01, 0x0a, 0x07, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x12, 0x38, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x6f, + 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x72, 0x6f, + 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x69, 0x63, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x10, 0x70, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x42, - 0x09, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0xf7, 0x04, 0x0a, 0x03, 0x4a, - 0x6f, 0x62, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, - 0x63, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, - 0x46, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, - 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x25, 0x0a, 0x07, 0x74, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x12, 0x20, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, - 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, - 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x5f, 0x63, 0x61, 0x74, 0x63, 0x68, 0x75, 0x70, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6e, 0x6f, 0x43, 0x61, 0x74, 0x63, 0x68, 0x75, 0x70, 0x22, - 0x33, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, - 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, - 0x45, 0x44, 0x10, 0x02, 0x32, 0xfa, 0x03, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, - 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x22, - 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x3a, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x40, 0x0a, 0x06, 0x47, - 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, - 0x62, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x4c, 0x0a, - 0x08, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x19, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x2f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x5f, 0x0a, 0x0a, 0x44, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x55, 0x0a, 0x09, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x42, 0x87, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, - 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, - 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, - 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, - 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x64, 0x69, 0x63, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x11, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0xfe, 0x04, 0x0a, 0x03, + 0x4a, 0x6f, 0x62, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0d, 0x70, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x12, 0x47, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, + 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x25, + 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4d, 0x6f, 0x64, + 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x12, 0x3a, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x5f, 0x63, 0x61, + 0x74, 0x63, 0x68, 0x75, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6e, 0x6f, 0x5f, + 0x63, 0x61, 0x74, 0x63, 0x68, 0x75, 0x70, 0x22, 0x33, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, + 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, + 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x32, 0xfa, 0x03, 0x0a, + 0x0a, 0x4a, 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, + 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, + 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x3a, 0x03, + 0x6a, 0x6f, 0x62, 0x12, 0x40, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x11, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x4c, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, + 0x73, 0x12, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6a, + 0x6f, 0x62, 0x73, 0x12, 0x5c, 0x0a, 0x09, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, + 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x21, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x5f, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x12, + 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x55, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, + 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, + 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x87, 0x01, 0x5a, 0x36, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, + 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, + 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/job.pb.gw.go b/backend/api/v1/go_client/job.pb.gw.go index 35c02d7a51..5bd3ee6aa5 100644 --- a/backend/api/v1/go_client/job.pb.gw.go +++ b/backend/api/v1/go_client/job.pb.gw.go @@ -13,20 +13,23 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_JobService_CreateJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateJobRequest @@ -45,6 +48,23 @@ func request_JobService_CreateJob_0(ctx context.Context, marshaler runtime.Marsh } +func local_request_JobService_CreateJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateJobRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Job); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateJob(ctx, &protoReq) + return msg, metadata, err + +} + func request_JobService_GetJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetJobRequest var metadata runtime.ServerMetadata @@ -62,7 +82,6 @@ func request_JobService_GetJob_0(ctx context.Context, marshaler runtime.Marshale } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -72,6 +91,32 @@ func request_JobService_GetJob_0(ctx context.Context, marshaler runtime.Marshale } +func local_request_JobService_GetJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetJobRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetJob(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_JobService_ListJobs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -80,7 +125,10 @@ func request_JobService_ListJobs_0(ctx context.Context, marshaler runtime.Marsha var protoReq ListJobsRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_JobService_ListJobs_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_JobService_ListJobs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -89,6 +137,22 @@ func request_JobService_ListJobs_0(ctx context.Context, marshaler runtime.Marsha } +func local_request_JobService_ListJobs_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListJobsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_JobService_ListJobs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListJobs(ctx, &protoReq) + return msg, metadata, err + +} + func request_JobService_EnableJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq EnableJobRequest var metadata runtime.ServerMetadata @@ -106,7 +170,6 @@ func request_JobService_EnableJob_0(ctx context.Context, marshaler runtime.Marsh } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -116,6 +179,32 @@ func request_JobService_EnableJob_0(ctx context.Context, marshaler runtime.Marsh } +func local_request_JobService_EnableJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EnableJobRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.EnableJob(ctx, &protoReq) + return msg, metadata, err + +} + func request_JobService_DisableJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DisableJobRequest var metadata runtime.ServerMetadata @@ -133,7 +222,6 @@ func request_JobService_DisableJob_0(ctx context.Context, marshaler runtime.Mars } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -143,6 +231,32 @@ func request_JobService_DisableJob_0(ctx context.Context, marshaler runtime.Mars } +func local_request_JobService_DisableJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DisableJobRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DisableJob(ctx, &protoReq) + return msg, metadata, err + +} + func request_JobService_DeleteJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteJobRequest var metadata runtime.ServerMetadata @@ -160,7 +274,6 @@ func request_JobService_DeleteJob_0(ctx context.Context, marshaler runtime.Marsh } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -170,6 +283,191 @@ func request_JobService_DeleteJob_0(ctx context.Context, marshaler runtime.Marsh } +func local_request_JobService_DeleteJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteJobRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteJob(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterJobServiceHandlerServer registers the http handlers for service JobService to "mux". +// UnaryRPC :call JobServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterJobServiceHandlerFromEndpoint instead. +func RegisterJobServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server JobServiceServer) error { + + mux.Handle("POST", pattern_JobService_CreateJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.JobService/CreateJob", runtime.WithHTTPPathPattern("/apis/v1/jobs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_JobService_CreateJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_JobService_CreateJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_JobService_GetJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.JobService/GetJob", runtime.WithHTTPPathPattern("/apis/v1/jobs/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_JobService_GetJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_JobService_GetJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_JobService_ListJobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.JobService/ListJobs", runtime.WithHTTPPathPattern("/apis/v1/jobs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_JobService_ListJobs_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_JobService_ListJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_JobService_EnableJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.JobService/EnableJob", runtime.WithHTTPPathPattern("/apis/v1/jobs/{id}/enable")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_JobService_EnableJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_JobService_EnableJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_JobService_DisableJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.JobService/DisableJob", runtime.WithHTTPPathPattern("/apis/v1/jobs/{id}/disable")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_JobService_DisableJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_JobService_DisableJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_JobService_DeleteJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.JobService/DeleteJob", runtime.WithHTTPPathPattern("/apis/v1/jobs/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_JobService_DeleteJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_JobService_DeleteJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterJobServiceHandlerFromEndpoint is same as RegisterJobServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterJobServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -212,19 +510,21 @@ func RegisterJobServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.JobService/CreateJob", runtime.WithHTTPPathPattern("/apis/v1/jobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_CreateJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_CreateJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_JobService_CreateJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_JobService_CreateJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -232,19 +532,21 @@ func RegisterJobServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.JobService/GetJob", runtime.WithHTTPPathPattern("/apis/v1/jobs/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_GetJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_GetJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_JobService_GetJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_JobService_GetJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -252,19 +554,21 @@ func RegisterJobServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.JobService/ListJobs", runtime.WithHTTPPathPattern("/apis/v1/jobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_ListJobs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_ListJobs_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_JobService_ListJobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_JobService_ListJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -272,19 +576,21 @@ func RegisterJobServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.JobService/EnableJob", runtime.WithHTTPPathPattern("/apis/v1/jobs/{id}/enable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_EnableJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_EnableJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_JobService_EnableJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_JobService_EnableJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -292,19 +598,21 @@ func RegisterJobServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.JobService/DisableJob", runtime.WithHTTPPathPattern("/apis/v1/jobs/{id}/disable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_DisableJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_DisableJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_JobService_DisableJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_JobService_DisableJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -312,19 +620,21 @@ func RegisterJobServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.JobService/DeleteJob", runtime.WithHTTPPathPattern("/apis/v1/jobs/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_DeleteJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_DeleteJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_JobService_DeleteJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_JobService_DeleteJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/backend/api/v1/go_client/pipeline.pb.go b/backend/api/v1/go_client/pipeline.pb.go index 8bfa2dcdfc..4e30feefe8 100644 --- a/backend/api/v1/go_client/pipeline.pb.go +++ b/backend/api/v1/go_client/pipeline.pb.go @@ -22,7 +22,7 @@ package go_client import ( context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -48,7 +48,7 @@ type Url struct { unknownFields protoimpl.UnknownFields // URL of the pipeline definition or the pipeline version definition. - PipelineUrl string `protobuf:"bytes,1,opt,name=pipeline_url,json=pipelineUrl,proto3" json:"pipeline_url,omitempty"` + PipelineUrl string `protobuf:"bytes,1,opt,name=pipeline_url,proto3" json:"pipeline_url,omitempty"` } func (x *Url) Reset() { @@ -146,9 +146,9 @@ type UpdatePipelineDefaultVersionRequest struct { unknownFields protoimpl.UnknownFields // The ID of the pipeline to be updated. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` // The ID of the default version. - VersionId string `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + VersionId string `protobuf:"bytes,2,opt,name=version_id,proto3" json:"version_id,omitempty"` } func (x *UpdatePipelineDefaultVersionRequest) Reset() { @@ -253,21 +253,21 @@ type ListPipelinesRequest struct { // 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. - PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,1,opt,name=page_token,proto3" json:"page_token,omitempty"` // 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. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - SortBy string `protobuf:"bytes,3,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,3,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` // What resource reference to filter on. // For Pipeline, the only valid resource type is Namespace. An sample query string could be // resource_reference_key.type=NAMESPACE&resource_reference_key.id=ns1 - ResourceReferenceKey *ResourceKey `protobuf:"bytes,5,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` + ResourceReferenceKey *ResourceKey `protobuf:"bytes,5,opt,name=resource_reference_key,proto3" json:"resource_reference_key,omitempty"` } func (x *ListPipelinesRequest) Reset() { @@ -344,9 +344,9 @@ type ListPipelinesResponse struct { Pipelines []*Pipeline `protobuf:"bytes,1,rep,name=pipelines,proto3" json:"pipelines,omitempty"` // The total number of pipelines for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,proto3" json:"total_size,omitempty"` // The token to list the next page of pipelines. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` } func (x *ListPipelinesResponse) Reset() { @@ -553,7 +553,7 @@ type GetPipelineVersionTemplateRequest struct { unknownFields protoimpl.UnknownFields // The ID of the pipeline version whose template is to be retrieved. - VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + VersionId string `protobuf:"bytes,1,opt,name=version_id,proto3" json:"version_id,omitempty"` } func (x *GetPipelineVersionTemplateRequest) Reset() { @@ -650,7 +650,7 @@ type GetPipelineVersionRequest struct { unknownFields protoimpl.UnknownFields // The ID of the pipeline version to be retrieved. - VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + VersionId string `protobuf:"bytes,1,opt,name=version_id,proto3" json:"version_id,omitempty"` } func (x *GetPipelineVersionRequest) Reset() { @@ -698,18 +698,18 @@ type ListPipelineVersionsRequest struct { unknownFields protoimpl.UnknownFields // ResourceKey specifies the pipeline whose versions are to be listed. - ResourceKey *ResourceKey `protobuf:"bytes,1,opt,name=resource_key,json=resourceKey,proto3" json:"resource_key,omitempty"` + ResourceKey *ResourceKey `protobuf:"bytes,1,opt,name=resource_key,proto3" json:"resource_key,omitempty"` // 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. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // 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. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,proto3" json:"page_token,omitempty"` // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - SortBy string `protobuf:"bytes,4,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,4,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // A base-64 encoded, JSON-serialized Filter protocol buffer (see // filter.proto). Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` @@ -789,9 +789,9 @@ type ListPipelineVersionsResponse struct { Versions []*PipelineVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions,omitempty"` // The token to list the next page of pipeline versions. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` // The total number of pipeline versions for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,proto3" json:"total_size,omitempty"` } func (x *ListPipelineVersionsResponse) Reset() { @@ -853,7 +853,7 @@ type DeletePipelineVersionRequest struct { unknownFields protoimpl.UnknownFields // The ID of the pipeline version to be deleted. - VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + VersionId string `protobuf:"bytes,1,opt,name=version_id,proto3" json:"version_id,omitempty"` } func (x *DeletePipelineVersionRequest) Reset() { @@ -903,7 +903,7 @@ type Pipeline struct { // Output. Unique pipeline ID. Generated by API server. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Output. The time this pipeline is created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,proto3" json:"created_at,omitempty"` // Optional input field. Pipeline name provided by user. If not specified, // file name is used as pipeline name. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` @@ -927,10 +927,10 @@ type Pipeline struct { // Output only. The default version of the pipeline. As of now, the latest // version is used as default. (In the future, if desired by customers, we // can allow them to set default version.) - DefaultVersion *PipelineVersion `protobuf:"bytes,8,opt,name=default_version,json=defaultVersion,proto3" json:"default_version,omitempty"` + DefaultVersion *PipelineVersion `protobuf:"bytes,8,opt,name=default_version,proto3" json:"default_version,omitempty"` // Input field. Specify which resource this pipeline belongs to. // For Pipeline, the only valid resource reference is a single Namespace. - ResourceReferences []*ResourceReference `protobuf:"bytes,9,rep,name=resource_references,json=resourceReferences,proto3" json:"resource_references,omitempty"` + ResourceReferences []*ResourceReference `protobuf:"bytes,9,rep,name=resource_references,proto3" json:"resource_references,omitempty"` } func (x *Pipeline) Reset() { @@ -1038,18 +1038,18 @@ type PipelineVersion struct { // Optional input field. Version name provided by user. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Output. The time this pipeline version is created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,proto3" json:"created_at,omitempty"` // Output. The input parameters for this pipeline. Parameters []*Parameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"` // Input. Optional. Pipeline version code source. - CodeSourceUrl string `protobuf:"bytes,5,opt,name=code_source_url,json=codeSourceUrl,proto3" json:"code_source_url,omitempty"` + CodeSourceUrl string `protobuf:"bytes,5,opt,name=code_source_url,proto3" json:"code_source_url,omitempty"` // Input. Required. Pipeline version package url. // Whe calling CreatePipelineVersion API method, need to provide one package // file location. - PackageUrl *Url `protobuf:"bytes,6,opt,name=package_url,json=packageUrl,proto3" json:"package_url,omitempty"` + PackageUrl *Url `protobuf:"bytes,6,opt,name=package_url,proto3" json:"package_url,omitempty"` // Input field. Specify which resource this pipeline version belongs to. // For Experiment, the only valid resource reference is a single Namespace. - ResourceReferences []*ResourceReference `protobuf:"bytes,7,rep,name=resource_references,json=resourceReferences,proto3" json:"resource_references,omitempty"` + ResourceReferences []*ResourceReference `protobuf:"bytes,7,rep,name=resource_references,proto3" json:"resource_references,omitempty"` // Input. Optional. Description for the pipeline version. Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` } @@ -1159,232 +1159,233 @@ var file_backend_api_v1_pipeline_proto_rawDesc = []byte{ 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, - 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x41, 0x0a, 0x15, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, - 0x65, 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, + 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x70, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x22, + 0x41, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x22, 0x67, 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x47, + 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, + 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, + 0x62, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x16, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x16, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, + 0x6b, 0x65, 0x79, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, + 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x27, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xca, 0x01, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x45, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4b, 0x65, 0x79, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x8a, 0x01, 0x0a, 0x15, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, - 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, - 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x27, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x42, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x4d, 0x0a, 0x1c, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x19, 0x47, - 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xbe, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x0b, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, - 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, - 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x96, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x43, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1c, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, - 0x65, 0x22, 0x3d, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0xf1, 0x02, 0x0a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, - 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, - 0x03, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x72, 0x6c, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3c, - 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x13, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x73, 0x22, 0xdb, 0x02, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x63, 0x6f, 0x64, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x28, - 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x72, 0x6c, 0x52, 0x0a, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x46, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x12, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x32, 0xba, 0x0a, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x3a, 0x08, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x1f, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x60, 0x0a, - 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x18, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, - 0x64, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x61, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x19, 0x47, 0x65, 0x74, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xc2, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x72, + 0x74, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x72, 0x74, + 0x5f, 0x62, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x99, 0x01, 0x0a, 0x1c, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x0a, + 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xf4, 0x02, 0x0a, 0x08, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x72, 0x6c, 0x52, 0x03, 0x75, 0x72, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3d, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xe0, + 0x02, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x64, 0x65, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x12, 0x29, 0x0a, 0x0b, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x72, 0x6c, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x12, 0x47, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0xba, 0x0a, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x3a, 0x08, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x60, 0x0a, 0x0d, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x18, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x64, + 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x69, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x69, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, - 0x12, 0x7b, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, + 0x7b, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x3a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7d, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x1f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, - 0x27, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7d, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x1f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x20, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x29, 0x2a, 0x27, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x97, 0x01, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, - 0x22, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x42, - 0x87, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, - 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, - 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, - 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x2a, 0x27, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x33, 0x12, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x22, + 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0x87, + 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, + 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, + 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, + 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, + 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/pipeline.pb.gw.go b/backend/api/v1/go_client/pipeline.pb.gw.go index 1416f9fbbd..ba53467a29 100644 --- a/backend/api/v1/go_client/pipeline.pb.gw.go +++ b/backend/api/v1/go_client/pipeline.pb.gw.go @@ -13,20 +13,23 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_PipelineService_CreatePipeline_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreatePipelineRequest @@ -45,6 +48,23 @@ func request_PipelineService_CreatePipeline_0(ctx context.Context, marshaler run } +func local_request_PipelineService_CreatePipeline_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreatePipelineRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Pipeline); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreatePipeline(ctx, &protoReq) + return msg, metadata, err + +} + func request_PipelineService_GetPipeline_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetPipelineRequest var metadata runtime.ServerMetadata @@ -62,7 +82,6 @@ func request_PipelineService_GetPipeline_0(ctx context.Context, marshaler runtim } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -72,6 +91,32 @@ func request_PipelineService_GetPipeline_0(ctx context.Context, marshaler runtim } +func local_request_PipelineService_GetPipeline_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPipelineRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetPipeline(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_PipelineService_ListPipelines_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -80,7 +125,10 @@ func request_PipelineService_ListPipelines_0(ctx context.Context, marshaler runt var protoReq ListPipelinesRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PipelineService_ListPipelines_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelines_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -89,6 +137,22 @@ func request_PipelineService_ListPipelines_0(ctx context.Context, marshaler runt } +func local_request_PipelineService_ListPipelines_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPipelinesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelines_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListPipelines(ctx, &protoReq) + return msg, metadata, err + +} + func request_PipelineService_DeletePipeline_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeletePipelineRequest var metadata runtime.ServerMetadata @@ -106,7 +170,6 @@ func request_PipelineService_DeletePipeline_0(ctx context.Context, marshaler run } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -116,6 +179,32 @@ func request_PipelineService_DeletePipeline_0(ctx context.Context, marshaler run } +func local_request_PipelineService_DeletePipeline_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeletePipelineRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeletePipeline(ctx, &protoReq) + return msg, metadata, err + +} + func request_PipelineService_GetTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetTemplateRequest var metadata runtime.ServerMetadata @@ -133,7 +222,6 @@ func request_PipelineService_GetTemplate_0(ctx context.Context, marshaler runtim } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -143,6 +231,32 @@ func request_PipelineService_GetTemplate_0(ctx context.Context, marshaler runtim } +func local_request_PipelineService_GetTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetTemplate(ctx, &protoReq) + return msg, metadata, err + +} + func request_PipelineService_CreatePipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreatePipelineVersionRequest var metadata runtime.ServerMetadata @@ -160,6 +274,23 @@ func request_PipelineService_CreatePipelineVersion_0(ctx context.Context, marsha } +func local_request_PipelineService_CreatePipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreatePipelineVersionRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Version); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreatePipelineVersion(ctx, &protoReq) + return msg, metadata, err + +} + func request_PipelineService_GetPipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetPipelineVersionRequest var metadata runtime.ServerMetadata @@ -177,7 +308,6 @@ func request_PipelineService_GetPipelineVersion_0(ctx context.Context, marshaler } protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } @@ -187,6 +317,32 @@ func request_PipelineService_GetPipelineVersion_0(ctx context.Context, marshaler } +func local_request_PipelineService_GetPipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPipelineVersionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["version_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") + } + + protoReq.VersionId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) + } + + msg, err := server.GetPipelineVersion(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_PipelineService_ListPipelineVersions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -195,7 +351,10 @@ func request_PipelineService_ListPipelineVersions_0(ctx context.Context, marshal var protoReq ListPipelineVersionsRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_PipelineService_ListPipelineVersions_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelineVersions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -204,6 +363,22 @@ func request_PipelineService_ListPipelineVersions_0(ctx context.Context, marshal } +func local_request_PipelineService_ListPipelineVersions_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListPipelineVersionsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelineVersions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListPipelineVersions(ctx, &protoReq) + return msg, metadata, err + +} + func request_PipelineService_DeletePipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeletePipelineVersionRequest var metadata runtime.ServerMetadata @@ -221,7 +396,6 @@ func request_PipelineService_DeletePipelineVersion_0(ctx context.Context, marsha } protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } @@ -231,6 +405,32 @@ func request_PipelineService_DeletePipelineVersion_0(ctx context.Context, marsha } +func local_request_PipelineService_DeletePipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeletePipelineVersionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["version_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") + } + + protoReq.VersionId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) + } + + msg, err := server.DeletePipelineVersion(ctx, &protoReq) + return msg, metadata, err + +} + func request_PipelineService_GetPipelineVersionTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetPipelineVersionTemplateRequest var metadata runtime.ServerMetadata @@ -248,7 +448,6 @@ func request_PipelineService_GetPipelineVersionTemplate_0(ctx context.Context, m } protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } @@ -258,6 +457,32 @@ func request_PipelineService_GetPipelineVersionTemplate_0(ctx context.Context, m } +func local_request_PipelineService_GetPipelineVersionTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPipelineVersionTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["version_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") + } + + protoReq.VersionId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) + } + + msg, err := server.GetPipelineVersionTemplate(ctx, &protoReq) + return msg, metadata, err + +} + func request_PipelineService_UpdatePipelineDefaultVersion_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdatePipelineDefaultVersionRequest var metadata runtime.ServerMetadata @@ -275,7 +500,6 @@ func request_PipelineService_UpdatePipelineDefaultVersion_0(ctx context.Context, } protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } @@ -286,7 +510,6 @@ func request_PipelineService_UpdatePipelineDefaultVersion_0(ctx context.Context, } protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } @@ -296,6 +519,326 @@ func request_PipelineService_UpdatePipelineDefaultVersion_0(ctx context.Context, } +func local_request_PipelineService_UpdatePipelineDefaultVersion_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdatePipelineDefaultVersionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pipeline_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") + } + + protoReq.PipelineId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) + } + + val, ok = pathParams["version_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") + } + + protoReq.VersionId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) + } + + msg, err := server.UpdatePipelineDefaultVersion(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterPipelineServiceHandlerServer registers the http handlers for service PipelineService to "mux". +// UnaryRPC :call PipelineServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPipelineServiceHandlerFromEndpoint instead. +func RegisterPipelineServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PipelineServiceServer) error { + + mux.Handle("POST", pattern_PipelineService_CreatePipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/CreatePipeline", runtime.WithHTTPPathPattern("/apis/v1/pipelines")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_CreatePipeline_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_CreatePipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PipelineService_GetPipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/GetPipeline", runtime.WithHTTPPathPattern("/apis/v1/pipelines/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_GetPipeline_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_GetPipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PipelineService_ListPipelines_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/ListPipelines", runtime.WithHTTPPathPattern("/apis/v1/pipelines")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_ListPipelines_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_ListPipelines_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_PipelineService_DeletePipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/DeletePipeline", runtime.WithHTTPPathPattern("/apis/v1/pipelines/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_DeletePipeline_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_DeletePipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PipelineService_GetTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/GetTemplate", runtime.WithHTTPPathPattern("/apis/v1/pipelines/{id}/templates")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_GetTemplate_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_GetTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_PipelineService_CreatePipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/CreatePipelineVersion", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_CreatePipelineVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_CreatePipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PipelineService_GetPipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/GetPipelineVersion", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions/{version_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_GetPipelineVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_GetPipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PipelineService_ListPipelineVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/ListPipelineVersions", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_ListPipelineVersions_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_ListPipelineVersions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_PipelineService_DeletePipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/DeletePipelineVersion", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions/{version_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_DeletePipelineVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_DeletePipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PipelineService_GetPipelineVersionTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/GetPipelineVersionTemplate", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions/{version_id}/templates")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_GetPipelineVersionTemplate_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_GetPipelineVersionTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_PipelineService_UpdatePipelineDefaultVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.PipelineService/UpdatePipelineDefaultVersion", runtime.WithHTTPPathPattern("/apis/v1/pipelines/{pipeline_id}/default_version/{version_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PipelineService_UpdatePipelineDefaultVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_PipelineService_UpdatePipelineDefaultVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterPipelineServiceHandlerFromEndpoint is same as RegisterPipelineServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPipelineServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -338,19 +881,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/CreatePipeline", runtime.WithHTTPPathPattern("/apis/v1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_CreatePipeline_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_CreatePipeline_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_CreatePipeline_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_CreatePipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -358,19 +903,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/GetPipeline", runtime.WithHTTPPathPattern("/apis/v1/pipelines/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipeline_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipeline_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_GetPipeline_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_GetPipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -378,19 +925,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/ListPipelines", runtime.WithHTTPPathPattern("/apis/v1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_ListPipelines_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_ListPipelines_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_ListPipelines_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_ListPipelines_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -398,19 +947,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/DeletePipeline", runtime.WithHTTPPathPattern("/apis/v1/pipelines/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_DeletePipeline_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_DeletePipeline_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_DeletePipeline_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_DeletePipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -418,19 +969,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/GetTemplate", runtime.WithHTTPPathPattern("/apis/v1/pipelines/{id}/templates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetTemplate_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_GetTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_GetTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -438,19 +991,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/CreatePipelineVersion", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_CreatePipelineVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_CreatePipelineVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_CreatePipelineVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_CreatePipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -458,19 +1013,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/GetPipelineVersion", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions/{version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipelineVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipelineVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_GetPipelineVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_GetPipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -478,19 +1035,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/ListPipelineVersions", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_ListPipelineVersions_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_ListPipelineVersions_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_ListPipelineVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_ListPipelineVersions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -498,19 +1057,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/DeletePipelineVersion", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions/{version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_DeletePipelineVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_DeletePipelineVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_DeletePipelineVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_DeletePipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -518,19 +1079,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/GetPipelineVersionTemplate", runtime.WithHTTPPathPattern("/apis/v1/pipeline_versions/{version_id}/templates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipelineVersionTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipelineVersionTemplate_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_GetPipelineVersionTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_GetPipelineVersionTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -538,19 +1101,21 @@ func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.PipelineService/UpdatePipelineDefaultVersion", runtime.WithHTTPPathPattern("/apis/v1/pipelines/{pipeline_id}/default_version/{version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_UpdatePipelineDefaultVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_UpdatePipelineDefaultVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PipelineService_UpdatePipelineDefaultVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_PipelineService_UpdatePipelineDefaultVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/backend/api/v1/go_client/pipeline_spec.pb.go b/backend/api/v1/go_client/pipeline_spec.pb.go index e101996d2f..0555a8840d 100644 --- a/backend/api/v1/go_client/pipeline_spec.pb.go +++ b/backend/api/v1/go_client/pipeline_spec.pb.go @@ -40,21 +40,21 @@ type PipelineSpec struct { unknownFields protoimpl.UnknownFields // Optional input field. The ID of the pipeline user uploaded before. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` // Optional output field. The name of the pipeline. // Not empty if the pipeline id is not empty. - PipelineName string `protobuf:"bytes,5,opt,name=pipeline_name,json=pipelineName,proto3" json:"pipeline_name,omitempty"` + PipelineName string `protobuf:"bytes,5,opt,name=pipeline_name,proto3" json:"pipeline_name,omitempty"` // Optional input field. The marshalled raw argo JSON workflow. // This will be deprecated when pipeline_manifest is in use. - WorkflowManifest string `protobuf:"bytes,2,opt,name=workflow_manifest,json=workflowManifest,proto3" json:"workflow_manifest,omitempty"` + WorkflowManifest string `protobuf:"bytes,2,opt,name=workflow_manifest,proto3" json:"workflow_manifest,omitempty"` // Optional input field. The raw pipeline JSON spec. - PipelineManifest string `protobuf:"bytes,3,opt,name=pipeline_manifest,json=pipelineManifest,proto3" json:"pipeline_manifest,omitempty"` + PipelineManifest string `protobuf:"bytes,3,opt,name=pipeline_manifest,proto3" json:"pipeline_manifest,omitempty"` // 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. V1 only Parameters []*Parameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"` // Runtime config of the pipeline. V2 only - RuntimeConfig *PipelineSpec_RuntimeConfig `protobuf:"bytes,6,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` + RuntimeConfig *PipelineSpec_RuntimeConfig `protobuf:"bytes,6,opt,name=runtime_config,proto3" json:"runtime_config,omitempty"` } func (x *PipelineSpec) Reset() { @@ -210,17 +210,17 @@ type isValue_Value interface { type Value_IntValue struct { // An integer value - IntValue int64 `protobuf:"varint,1,opt,name=int_value,json=intValue,proto3,oneof"` + IntValue int64 `protobuf:"varint,1,opt,name=int_value,proto3,oneof"` } type Value_DoubleValue struct { // A double value - DoubleValue float64 `protobuf:"fixed64,2,opt,name=double_value,json=doubleValue,proto3,oneof"` + DoubleValue float64 `protobuf:"fixed64,2,opt,name=double_value,proto3,oneof"` } type Value_StringValue struct { // A string value - StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"` + StringValue string `protobuf:"bytes,3,opt,name=string_value,proto3,oneof"` } func (*Value_IntValue) isValue_Value() {} @@ -242,7 +242,7 @@ type PipelineSpec_RuntimeConfig struct { // A path in a object store bucket which will be treated as the root // output directory of the pipeline. It is used by the system to // generate the paths of output artifacts. Ref:(https://www.kubeflow.org/docs/components/pipelines/pipeline-root/) - PipelineRoot string `protobuf:"bytes,2,opt,name=pipeline_root,json=pipelineRoot,proto3" json:"pipeline_root,omitempty"` + PipelineRoot string `protobuf:"bytes,2,opt,name=pipeline_root,proto3" json:"pipeline_root,omitempty"` } func (x *PipelineSpec_RuntimeConfig) Reset() { @@ -298,50 +298,51 @@ var file_backend_api_v1_pipeline_spec_proto_rawDesc = []byte{ 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x1e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x03, 0x0a, 0x0c, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x2b, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x61, 0x6e, 0x69, - 0x66, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, - 0xce, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x1a, 0x48, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x79, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, - 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, - 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, - 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, 0x03, 0x0a, 0x0c, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x70, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, + 0x2c, 0x0a, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, + 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x46, 0x0a, 0x0e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xcf, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x52, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x1a, 0x48, 0x0a, 0x0f, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7c, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x1e, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x24, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x24, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/report.pb.go b/backend/api/v1/go_client/report.pb.go index 2acbf7371c..921905baf1 100644 --- a/backend/api/v1/go_client/report.pb.go +++ b/backend/api/v1/go_client/report.pb.go @@ -94,7 +94,7 @@ type ReportScheduledWorkflowRequest struct { unknownFields protoimpl.UnknownFields // ScheduledWorkflow a ScheduledWorkflow resource marshalled into a json string. - ScheduledWorkflow string `protobuf:"bytes,1,opt,name=scheduled_workflow,json=scheduledWorkflow,proto3" json:"scheduled_workflow,omitempty"` + ScheduledWorkflow string `protobuf:"bytes,1,opt,name=scheduled_workflow,proto3" json:"scheduled_workflow,omitempty"` } func (x *ReportScheduledWorkflowRequest) Reset() { @@ -148,33 +148,33 @@ var file_backend_api_v1_report_proto_rawDesc = []byte{ 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x22, 0x4f, 0x0a, 0x1e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x77, 0x22, 0x50, 0x0a, 0x1e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, + 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x32, 0x8b, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1e, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, - 0x8e, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x22, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, - 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x12, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x32, 0x8b, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1e, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x12, 0x8e, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x22, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, + 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x12, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/report.pb.gw.go b/backend/api/v1/go_client/report.pb.gw.go index 9733e847a1..3479bb0897 100644 --- a/backend/api/v1/go_client/report.pb.gw.go +++ b/backend/api/v1/go_client/report.pb.gw.go @@ -13,20 +13,23 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_ReportService_ReportWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client ReportServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ReportWorkflowRequest @@ -45,6 +48,23 @@ func request_ReportService_ReportWorkflow_0(ctx context.Context, marshaler runti } +func local_request_ReportService_ReportWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server ReportServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReportWorkflowRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Workflow); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ReportWorkflow(ctx, &protoReq) + return msg, metadata, err + +} + func request_ReportService_ReportScheduledWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client ReportServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ReportScheduledWorkflowRequest var metadata runtime.ServerMetadata @@ -62,6 +82,82 @@ func request_ReportService_ReportScheduledWorkflow_0(ctx context.Context, marsha } +func local_request_ReportService_ReportScheduledWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server ReportServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReportScheduledWorkflowRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ScheduledWorkflow); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ReportScheduledWorkflow(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterReportServiceHandlerServer registers the http handlers for service ReportService to "mux". +// UnaryRPC :call ReportServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterReportServiceHandlerFromEndpoint instead. +func RegisterReportServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReportServiceServer) error { + + mux.Handle("POST", pattern_ReportService_ReportWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.ReportService/ReportWorkflow", runtime.WithHTTPPathPattern("/apis/v1/workflows")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ReportService_ReportWorkflow_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ReportService_ReportWorkflow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ReportService_ReportScheduledWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.ReportService/ReportScheduledWorkflow", runtime.WithHTTPPathPattern("/apis/v1/scheduledworkflows")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ReportService_ReportScheduledWorkflow_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ReportService_ReportScheduledWorkflow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterReportServiceHandlerFromEndpoint is same as RegisterReportServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterReportServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -104,19 +200,21 @@ func RegisterReportServiceHandlerClient(ctx context.Context, mux *runtime.ServeM ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.ReportService/ReportWorkflow", runtime.WithHTTPPathPattern("/apis/v1/workflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ReportService_ReportWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ReportService_ReportWorkflow_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ReportService_ReportWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ReportService_ReportWorkflow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -124,19 +222,21 @@ func RegisterReportServiceHandlerClient(ctx context.Context, mux *runtime.ServeM ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.ReportService/ReportScheduledWorkflow", runtime.WithHTTPPathPattern("/apis/v1/scheduledworkflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ReportService_ReportScheduledWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ReportService_ReportScheduledWorkflow_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ReportService_ReportScheduledWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ReportService_ReportScheduledWorkflow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/backend/api/v1/go_client/run.pb.go b/backend/api/v1/go_client/run.pb.go index bd0fa84ddd..0cb0131a01 100644 --- a/backend/api/v1/go_client/run.pb.go +++ b/backend/api/v1/go_client/run.pb.go @@ -22,7 +22,7 @@ package go_client import ( context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -253,7 +253,7 @@ type GetRunRequest struct { unknownFields protoimpl.UnknownFields // The ID of the run to be retrieved. - RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,1,opt,name=run_id,proto3" json:"run_id,omitempty"` } func (x *GetRunRequest) Reset() { @@ -303,18 +303,18 @@ type ListRunsRequest struct { // 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. - PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,1,opt,name=page_token,proto3" json:"page_token,omitempty"` // 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. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // Can be format of "field_name", "field_name asc" or "field_name desc" // (Example, "name asc" or "id desc"). Ascending by default. - SortBy string `protobuf:"bytes,3,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,3,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // What resource reference to filter on. // E.g. If listing run for an experiment, the query string would be // resource_reference_key.type=EXPERIMENT&resource_reference_key.id=123 - ResourceReferenceKey *ResourceKey `protobuf:"bytes,4,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` + ResourceReferenceKey *ResourceKey `protobuf:"bytes,4,opt,name=resource_reference_key,proto3" json:"resource_reference_key,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` @@ -393,7 +393,7 @@ type TerminateRunRequest struct { unknownFields protoimpl.UnknownFields // The ID of the run to be terminated. - RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,1,opt,name=run_id,proto3" json:"run_id,omitempty"` } func (x *TerminateRunRequest) Reset() { @@ -441,7 +441,7 @@ type RetryRunRequest struct { unknownFields protoimpl.UnknownFields // The ID of the run to be retried. - RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,1,opt,name=run_id,proto3" json:"run_id,omitempty"` } func (x *RetryRunRequest) Reset() { @@ -490,9 +490,9 @@ type ListRunsResponse struct { Runs []*Run `protobuf:"bytes,1,rep,name=runs,proto3" json:"runs,omitempty"` // The total number of runs for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,proto3" json:"total_size,omitempty"` // The token to list the next page of runs. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` } func (x *ListRunsResponse) Reset() { @@ -703,27 +703,27 @@ type Run struct { // or auto generated if run is created by scheduled job. Not unique. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Output. Specify whether this run is in archived or available mode. - StorageState Run_StorageState `protobuf:"varint,10,opt,name=storage_state,json=storageState,proto3,enum=v1.Run_StorageState" json:"storage_state,omitempty"` + StorageState Run_StorageState `protobuf:"varint,10,opt,name=storage_state,proto3,enum=v1.Run_StorageState" json:"storage_state,omitempty"` // Optional input field. Describing the purpose of the run Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // Required input field. // Describing what the pipeline manifest and parameters to use for the run. - PipelineSpec *PipelineSpec `protobuf:"bytes,4,opt,name=pipeline_spec,json=pipelineSpec,proto3" json:"pipeline_spec,omitempty"` + PipelineSpec *PipelineSpec `protobuf:"bytes,4,opt,name=pipeline_spec,proto3" json:"pipeline_spec,omitempty"` // 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. - ResourceReferences []*ResourceReference `protobuf:"bytes,5,rep,name=resource_references,json=resourceReferences,proto3" json:"resource_references,omitempty"` + ResourceReferences []*ResourceReference `protobuf:"bytes,5,rep,name=resource_references,proto3" json:"resource_references,omitempty"` // Optional input field. Specify which Kubernetes service account this run uses. - ServiceAccount string `protobuf:"bytes,14,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` + ServiceAccount string `protobuf:"bytes,14,opt,name=service_account,proto3" json:"service_account,omitempty"` // Output. The time that the run created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,proto3" json:"created_at,omitempty"` // 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. - ScheduledAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=scheduled_at,json=scheduledAt,proto3" json:"scheduled_at,omitempty"` + ScheduledAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=scheduled_at,proto3" json:"scheduled_at,omitempty"` // Output. The time this run is finished. - FinishedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=finished_at,proto3" json:"finished_at,omitempty"` // Output. The status of the run. // One of [Pending, Running, Succeeded, Skipped, Failed, Error] Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` @@ -866,10 +866,10 @@ type PipelineRuntime struct { // Output. The runtime JSON manifest of the pipeline, including the status // of pipeline steps and fields need for UI visualization etc. - PipelineManifest string `protobuf:"bytes,10,opt,name=pipeline_manifest,json=pipelineManifest,proto3" json:"pipeline_manifest,omitempty"` + PipelineManifest string `protobuf:"bytes,10,opt,name=pipeline_manifest,proto3" json:"pipeline_manifest,omitempty"` // Output. The runtime JSON manifest of the argo workflow. // This is deprecated after pipeline_runtime_manifest is in use. - WorkflowManifest string `protobuf:"bytes,11,opt,name=workflow_manifest,json=workflowManifest,proto3" json:"workflow_manifest,omitempty"` + WorkflowManifest string `protobuf:"bytes,11,opt,name=workflow_manifest,proto3" json:"workflow_manifest,omitempty"` } func (x *PipelineRuntime) Reset() { @@ -924,7 +924,7 @@ type RunDetail struct { unknownFields protoimpl.UnknownFields Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` - PipelineRuntime *PipelineRuntime `protobuf:"bytes,2,opt,name=pipeline_runtime,json=pipelineRuntime,proto3" json:"pipeline_runtime,omitempty"` + PipelineRuntime *PipelineRuntime `protobuf:"bytes,2,opt,name=pipeline_runtime,proto3" json:"pipeline_runtime,omitempty"` } func (x *RunDetail) Reset() { @@ -986,7 +986,7 @@ type RunMetric struct { // 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. - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + NodeId string `protobuf:"bytes,2,opt,name=node_id,proto3" json:"node_id,omitempty"` // Types that are assignable to Value: // *RunMetric_NumberValue Value isRunMetric_Value `protobuf_oneof:"value"` @@ -1067,7 +1067,7 @@ type isRunMetric_Value interface { type RunMetric_NumberValue struct { // The number value of the metric. - NumberValue float64 `protobuf:"fixed64,3,opt,name=number_value,json=numberValue,proto3,oneof"` + NumberValue float64 `protobuf:"fixed64,3,opt,name=number_value,proto3,oneof"` } func (*RunMetric_NumberValue) isRunMetric_Value() {} @@ -1182,11 +1182,11 @@ type ReadArtifactRequest struct { unknownFields protoimpl.UnknownFields // The ID of the run. - RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,1,opt,name=run_id,proto3" json:"run_id,omitempty"` // The ID of the running node. - NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + NodeId string `protobuf:"bytes,2,opt,name=node_id,proto3" json:"node_id,omitempty"` // The name of the artifact. - ArtifactName string `protobuf:"bytes,3,opt,name=artifact_name,json=artifactName,proto3" json:"artifact_name,omitempty"` + ArtifactName string `protobuf:"bytes,3,opt,name=artifact_name,proto3" json:"artifact_name,omitempty"` } func (x *ReadArtifactRequest) Reset() { @@ -1296,9 +1296,9 @@ type ReportRunMetricsResponse_ReportRunMetricResult struct { unknownFields protoimpl.UnknownFields // Output. The name of the metric. - MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` + MetricName string `protobuf:"bytes,1,opt,name=metric_name,proto3" json:"metric_name,omitempty"` // Output. The ID of the node which reports the metric. - MetricNodeId string `protobuf:"bytes,2,opt,name=metric_node_id,json=metricNodeId,proto3" json:"metric_node_id,omitempty"` + MetricNodeId string `protobuf:"bytes,2,opt,name=metric_node_id,proto3" json:"metric_node_id,omitempty"` // Output. The status of the metric reporting. Status ReportRunMetricsResponse_ReportRunMetricResult_Status `protobuf:"varint,3,opt,name=status,proto3,enum=v1.ReportRunMetricsResponse_ReportRunMetricResult_Status" json:"status,omitempty"` // Output. The detailed message of the error of the reporting. @@ -1382,227 +1382,229 @@ var file_backend_api_v1_run_proto_rawDesc = []byte{ 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, - 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x2d, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, - 0x22, 0x26, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0xc5, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, - 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, - 0x79, 0x12, 0x45, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, - 0x65, 0x79, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x22, 0x2c, 0x0a, 0x13, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x28, - 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x04, - 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x75, 0x6e, 0x52, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0x23, 0x0a, 0x11, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x25, 0x0a, 0x13, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, - 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x10, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x83, 0x05, 0x0a, 0x03, 0x52, 0x75, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0d, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x2e, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0d, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x46, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, + 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, + 0x75, 0x6e, 0x22, 0x27, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xca, 0x01, 0x0a, 0x0f, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x12, 0x47, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, + 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x2d, 0x0a, 0x13, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x29, 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x72, 0x79, + 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x75, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6e, 0x5f, + 0x69, 0x64, 0x22, 0x79, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x72, + 0x75, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x23, 0x0a, + 0x11, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x25, 0x0a, 0x13, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, + 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8a, 0x05, + 0x0a, 0x03, 0x52, 0x75, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x12, + 0x47, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3d, 0x0a, 0x0c, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x66, - 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, - 0x45, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x53, - 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x52, 0x43, 0x48, - 0x49, 0x56, 0x45, 0x44, 0x10, 0x01, 0x22, 0x6b, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x09, 0x52, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x12, 0x19, 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x12, 0x3e, 0x0a, 0x10, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x09, - 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, - 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x32, 0x0a, 0x06, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x41, 0x57, 0x10, 0x01, 0x12, 0x0e, 0x0a, - 0x0a, 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x41, 0x47, 0x45, 0x10, 0x02, 0x42, 0x07, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x59, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x22, 0x9c, 0x03, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, - 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0xb1, 0x02, 0x0a, - 0x15, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x06, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x14, 0x0a, - 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, - 0x54, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, - 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, - 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, - 0x22, 0x6a, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x17, - 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x14, - 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xf0, 0x07, 0x0a, 0x0a, 0x52, 0x75, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x75, 0x6e, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x14, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, - 0x3a, 0x03, 0x72, 0x75, 0x6e, 0x12, 0x4a, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x12, - 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x09, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x3e, + 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x3c, + 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x07, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x22, 0x45, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, + 0x19, 0x0a, 0x15, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x01, 0x22, 0x6d, 0x0a, 0x0f, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, + 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x22, 0x67, 0x0a, 0x09, 0x52, 0x75, 0x6e, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x19, 0x0a, 0x03, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, + 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x52, 0x10, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x22, 0xca, 0x01, 0x0a, 0x09, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x24, + 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x22, 0x32, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x0f, 0x0a, 0x0b, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, + 0x03, 0x52, 0x41, 0x57, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, + 0x54, 0x41, 0x47, 0x45, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x59, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, + 0x64, 0x12, 0x27, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x9f, 0x03, 0x0a, 0x18, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0xb4, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x51, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, + 0x17, 0x0a, 0x13, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x50, + 0x4f, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x22, 0x6d, 0x0a, 0x13, + 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x52, + 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xf0, 0x07, 0x0a, 0x0a, 0x52, 0x75, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x75, 0x6e, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, + 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x3a, + 0x03, 0x72, 0x75, 0x6e, 0x12, 0x4a, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x12, 0x11, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x0d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, + 0x12, 0x4c, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x13, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, + 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x12, 0x5f, + 0x0a, 0x0a, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x12, 0x15, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, + 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, + 0x65, 0x0a, 0x0c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x12, + 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x75, 0x6e, 0x61, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x55, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x75, 0x6e, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x7e, 0x0a, + 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x12, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, + 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x90, 0x01, + 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x45, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, - 0x7d, 0x12, 0x4c, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x13, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, - 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x12, - 0x5f, 0x0a, 0x0a, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x12, 0x15, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, - 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x12, 0x65, 0x0a, 0x0c, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, - 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, + 0x7d, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x72, 0x65, 0x61, 0x64, + 0x12, 0x69, 0x0a, 0x0c, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, + 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x75, 0x6e, - 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x55, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x75, 0x6e, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x7e, - 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x12, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, - 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, - 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x90, - 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, - 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x45, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x72, 0x65, 0x61, - 0x64, 0x12, 0x69, 0x0a, 0x0c, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, - 0x6e, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x08, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x1c, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, - 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x87, 0x01, 0x5a, 0x36, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, - 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, - 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x08, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x13, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x74, + 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x1c, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, + 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x87, 0x01, 0x5a, 0x36, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, + 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, + 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, + 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/run.pb.gw.go b/backend/api/v1/go_client/run.pb.gw.go index af3508ce49..4452236fe9 100644 --- a/backend/api/v1/go_client/run.pb.gw.go +++ b/backend/api/v1/go_client/run.pb.gw.go @@ -13,20 +13,23 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_RunService_CreateRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateRunRequest @@ -45,6 +48,23 @@ func request_RunService_CreateRun_0(ctx context.Context, marshaler runtime.Marsh } +func local_request_RunService_CreateRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateRunRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Run); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateRun(ctx, &protoReq) + return msg, metadata, err + +} + func request_RunService_GetRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetRunRequest var metadata runtime.ServerMetadata @@ -62,7 +82,6 @@ func request_RunService_GetRun_0(ctx context.Context, marshaler runtime.Marshale } protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } @@ -72,6 +91,32 @@ func request_RunService_GetRun_0(ctx context.Context, marshaler runtime.Marshale } +func local_request_RunService_GetRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRunRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["run_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") + } + + protoReq.RunId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) + } + + msg, err := server.GetRun(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_RunService_ListRuns_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -80,7 +125,10 @@ func request_RunService_ListRuns_0(ctx context.Context, marshaler runtime.Marsha var protoReq ListRunsRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RunService_ListRuns_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ListRuns_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -89,6 +137,22 @@ func request_RunService_ListRuns_0(ctx context.Context, marshaler runtime.Marsha } +func local_request_RunService_ListRuns_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListRunsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ListRuns_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListRuns(ctx, &protoReq) + return msg, metadata, err + +} + func request_RunService_ArchiveRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ArchiveRunRequest var metadata runtime.ServerMetadata @@ -106,7 +170,6 @@ func request_RunService_ArchiveRun_0(ctx context.Context, marshaler runtime.Mars } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -116,6 +179,32 @@ func request_RunService_ArchiveRun_0(ctx context.Context, marshaler runtime.Mars } +func local_request_RunService_ArchiveRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ArchiveRunRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.ArchiveRun(ctx, &protoReq) + return msg, metadata, err + +} + func request_RunService_UnarchiveRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UnarchiveRunRequest var metadata runtime.ServerMetadata @@ -133,7 +222,6 @@ func request_RunService_UnarchiveRun_0(ctx context.Context, marshaler runtime.Ma } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -143,6 +231,32 @@ func request_RunService_UnarchiveRun_0(ctx context.Context, marshaler runtime.Ma } +func local_request_RunService_UnarchiveRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UnarchiveRunRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.UnarchiveRun(ctx, &protoReq) + return msg, metadata, err + +} + func request_RunService_DeleteRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteRunRequest var metadata runtime.ServerMetadata @@ -160,7 +274,6 @@ func request_RunService_DeleteRun_0(ctx context.Context, marshaler runtime.Marsh } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -170,6 +283,32 @@ func request_RunService_DeleteRun_0(ctx context.Context, marshaler runtime.Marsh } +func local_request_RunService_DeleteRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteRunRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteRun(ctx, &protoReq) + return msg, metadata, err + +} + func request_RunService_ReportRunMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ReportRunMetricsRequest var metadata runtime.ServerMetadata @@ -195,7 +334,6 @@ func request_RunService_ReportRunMetrics_0(ctx context.Context, marshaler runtim } protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } @@ -205,6 +343,40 @@ func request_RunService_ReportRunMetrics_0(ctx context.Context, marshaler runtim } +func local_request_RunService_ReportRunMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReportRunMetricsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["run_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") + } + + protoReq.RunId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) + } + + msg, err := server.ReportRunMetrics(ctx, &protoReq) + return msg, metadata, err + +} + func request_RunService_ReadArtifact_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ReadArtifactRequest var metadata runtime.ServerMetadata @@ -222,7 +394,6 @@ func request_RunService_ReadArtifact_0(ctx context.Context, marshaler runtime.Ma } protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } @@ -233,7 +404,6 @@ func request_RunService_ReadArtifact_0(ctx context.Context, marshaler runtime.Ma } protoReq.NodeId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) } @@ -244,7 +414,6 @@ func request_RunService_ReadArtifact_0(ctx context.Context, marshaler runtime.Ma } protoReq.ArtifactName, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "artifact_name", err) } @@ -254,6 +423,52 @@ func request_RunService_ReadArtifact_0(ctx context.Context, marshaler runtime.Ma } +func local_request_RunService_ReadArtifact_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReadArtifactRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["run_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") + } + + protoReq.RunId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) + } + + val, ok = pathParams["node_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") + } + + protoReq.NodeId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) + } + + val, ok = pathParams["artifact_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "artifact_name") + } + + protoReq.ArtifactName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "artifact_name", err) + } + + msg, err := server.ReadArtifact(ctx, &protoReq) + return msg, metadata, err + +} + func request_RunService_TerminateRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq TerminateRunRequest var metadata runtime.ServerMetadata @@ -271,7 +486,6 @@ func request_RunService_TerminateRun_0(ctx context.Context, marshaler runtime.Ma } protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } @@ -281,6 +495,32 @@ func request_RunService_TerminateRun_0(ctx context.Context, marshaler runtime.Ma } +func local_request_RunService_TerminateRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TerminateRunRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["run_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") + } + + protoReq.RunId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) + } + + msg, err := server.TerminateRun(ctx, &protoReq) + return msg, metadata, err + +} + func request_RunService_RetryRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RetryRunRequest var metadata runtime.ServerMetadata @@ -298,7 +538,6 @@ func request_RunService_RetryRun_0(ctx context.Context, marshaler runtime.Marsha } protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } @@ -308,6 +547,291 @@ func request_RunService_RetryRun_0(ctx context.Context, marshaler runtime.Marsha } +func local_request_RunService_RetryRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryRunRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["run_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") + } + + protoReq.RunId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) + } + + msg, err := server.RetryRun(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterRunServiceHandlerServer registers the http handlers for service RunService to "mux". +// UnaryRPC :call RunServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRunServiceHandlerFromEndpoint instead. +func RegisterRunServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RunServiceServer) error { + + mux.Handle("POST", pattern_RunService_CreateRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/CreateRun", runtime.WithHTTPPathPattern("/apis/v1/runs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_CreateRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_CreateRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RunService_GetRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/GetRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_GetRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_GetRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RunService_ListRuns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/ListRuns", runtime.WithHTTPPathPattern("/apis/v1/runs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_ListRuns_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_ListRuns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_RunService_ArchiveRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/ArchiveRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{id}:archive")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_ArchiveRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_ArchiveRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_RunService_UnarchiveRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/UnarchiveRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{id}:unarchive")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_UnarchiveRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_UnarchiveRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_RunService_DeleteRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/DeleteRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_DeleteRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_DeleteRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_RunService_ReportRunMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/ReportRunMetrics", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}:reportMetrics")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_ReportRunMetrics_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_ReportRunMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RunService_ReadArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/ReadArtifact", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_ReadArtifact_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_ReadArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_RunService_TerminateRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/TerminateRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}/terminate")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_TerminateRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_TerminateRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_RunService_RetryRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.RunService/RetryRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}/retry")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RunService_RetryRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RunService_RetryRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterRunServiceHandlerFromEndpoint is same as RegisterRunServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRunServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -350,19 +874,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/CreateRun", runtime.WithHTTPPathPattern("/apis/v1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_CreateRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_CreateRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_CreateRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_CreateRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -370,19 +896,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/GetRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_GetRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_GetRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_GetRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_GetRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -390,19 +918,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/ListRuns", runtime.WithHTTPPathPattern("/apis/v1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ListRuns_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ListRuns_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_ListRuns_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_ListRuns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -410,19 +940,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/ArchiveRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ArchiveRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ArchiveRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_ArchiveRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_ArchiveRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -430,19 +962,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/UnarchiveRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_UnarchiveRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_UnarchiveRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_UnarchiveRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_UnarchiveRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -450,19 +984,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/DeleteRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_DeleteRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_DeleteRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_DeleteRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_DeleteRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -470,19 +1006,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/ReportRunMetrics", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}:reportMetrics")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ReportRunMetrics_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ReportRunMetrics_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_ReportRunMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_ReportRunMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -490,19 +1028,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/ReadArtifact", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ReadArtifact_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ReadArtifact_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_ReadArtifact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_ReadArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -510,19 +1050,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/TerminateRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}/terminate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_TerminateRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_TerminateRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_TerminateRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_TerminateRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -530,19 +1072,21 @@ func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.RunService/RetryRun", runtime.WithHTTPPathPattern("/apis/v1/runs/{run_id}/retry")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_RetryRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_RetryRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RunService_RetryRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_RunService_RetryRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/backend/api/v1/go_client/task.pb.go b/backend/api/v1/go_client/task.pb.go index 286b9b7003..c93060c4e5 100644 --- a/backend/api/v1/go_client/task.pb.go +++ b/backend/api/v1/go_client/task.pb.go @@ -59,9 +59,9 @@ type Task struct { // Required input field. The ID of the MLMD execution associated with the PipelineTask. MlmdExecutionID string `protobuf:"bytes,5,opt,name=mlmdExecutionID,proto3" json:"mlmdExecutionID,omitempty"` // Required input field. The time this task is created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,proto3" json:"created_at,omitempty"` // Optional input field. The time this task is finished. - FinishedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=finished_at,proto3" json:"finished_at,omitempty"` // Required input field. Fingerprint string `protobuf:"bytes,8,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` } @@ -209,18 +209,18 @@ type ListTasksRequest struct { // 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. - PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,1,opt,name=page_token,proto3" json:"page_token,omitempty"` // 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. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - SortBy string `protobuf:"bytes,3,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,3,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // What resource reference to filter on. // E.g. If listing tasks for an pipeline run, the query string would be // resource_reference_key.type="PIPELINE"&resource_reference_key.id=123 - ResourceReferenceKey *ResourceKey `protobuf:"bytes,4,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` + ResourceReferenceKey *ResourceKey `protobuf:"bytes,4,opt,name=resource_reference_key,proto3" json:"resource_reference_key,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` @@ -301,9 +301,9 @@ type ListTasksResponse struct { // A list of tasks returned. Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` // The token to list the next page of experiments. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` // The total number of experiments for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,proto3" json:"total_size,omitempty"` } func (x *ListTasksResponse) Reset() { @@ -370,7 +370,7 @@ var file_backend_api_v1_task_proto_rawDesc = []byte{ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x02, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x02, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x22, @@ -380,55 +380,55 @@ var file_backend_api_v1_task_proto_rawDesc = []byte{ 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6c, 0x6d, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x6c, 0x6d, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x49, 0x44, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, - 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, - 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x22, 0x31, 0x0a, 0x11, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, - 0xc6, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x45, 0x0a, 0x16, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, - 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x7a, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, - 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x26, 0x0a, - 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x53, 0x69, 0x7a, 0x65, 0x32, 0xac, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x08, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x0e, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x3a, 0x04, 0x74, 0x61, 0x73, - 0x6b, 0x12, 0x50, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x14, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x3c, + 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x12, 0x20, 0x0a, 0x0b, + 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x22, 0x31, + 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x08, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, + 0x6b, 0x22, 0xcb, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x12, 0x47, + 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, + 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, + 0x7d, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, + 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x32, 0xac, + 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, + 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x15, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x08, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x1c, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x3a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x50, 0x0a, 0x09, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x38, 0x5a, + 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, + 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, + 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/task.pb.gw.go b/backend/api/v1/go_client/task.pb.gw.go index 9fe023ecf0..032b9d75ca 100644 --- a/backend/api/v1/go_client/task.pb.gw.go +++ b/backend/api/v1/go_client/task.pb.gw.go @@ -13,20 +13,23 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_TaskService_CreateTask_0(ctx context.Context, marshaler runtime.Marshaler, client TaskServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateTaskRequest @@ -45,6 +48,23 @@ func request_TaskService_CreateTask_0(ctx context.Context, marshaler runtime.Mar } +func local_request_TaskService_CreateTask_0(ctx context.Context, marshaler runtime.Marshaler, server TaskServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateTaskRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Task); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateTask(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_TaskService_ListTasks_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -53,7 +73,10 @@ func request_TaskService_ListTasks_0(ctx context.Context, marshaler runtime.Mars var protoReq ListTasksRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_TaskService_ListTasks_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TaskService_ListTasks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -62,6 +85,81 @@ func request_TaskService_ListTasks_0(ctx context.Context, marshaler runtime.Mars } +func local_request_TaskService_ListTasks_0(ctx context.Context, marshaler runtime.Marshaler, server TaskServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListTasksRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TaskService_ListTasks_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListTasks(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterTaskServiceHandlerServer registers the http handlers for service TaskService to "mux". +// UnaryRPC :call TaskServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTaskServiceHandlerFromEndpoint instead. +func RegisterTaskServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TaskServiceServer) error { + + mux.Handle("POST", pattern_TaskService_CreateTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.TaskService/CreateTask", runtime.WithHTTPPathPattern("/apis/v1/tasks")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TaskService_CreateTask_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TaskService_CreateTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TaskService_ListTasks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.TaskService/ListTasks", runtime.WithHTTPPathPattern("/apis/v1/tasks")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TaskService_ListTasks_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TaskService_ListTasks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterTaskServiceHandlerFromEndpoint is same as RegisterTaskServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterTaskServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -104,19 +202,21 @@ func RegisterTaskServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.TaskService/CreateTask", runtime.WithHTTPPathPattern("/apis/v1/tasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_TaskService_CreateTask_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_TaskService_CreateTask_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TaskService_CreateTask_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_TaskService_CreateTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -124,19 +224,21 @@ func RegisterTaskServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.TaskService/ListTasks", runtime.WithHTTPPathPattern("/apis/v1/tasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_TaskService_ListTasks_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_TaskService_ListTasks_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TaskService_ListTasks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_TaskService_ListTasks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/backend/api/v1/go_client/visualization.pb.go b/backend/api/v1/go_client/visualization.pb.go index a278e496b3..6e31fc4b16 100644 --- a/backend/api/v1/go_client/visualization.pb.go +++ b/backend/api/v1/go_client/visualization.pb.go @@ -22,7 +22,7 @@ package go_client import ( context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -255,50 +255,50 @@ var file_backend_api_v1_visualization_proto_rawDesc = []byte{ 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, - 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x73, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, - 0x0a, 0x0d, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x75, 0x61, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x0d, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x75, 0x61, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x74, 0x6d, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x74, 0x6d, 0x6c, 0x12, 0x14, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x22, 0x40, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x52, - 0x4f, 0x43, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x46, - 0x44, 0x56, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x46, 0x4d, 0x41, 0x10, 0x02, 0x12, 0x09, - 0x0a, 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, - 0x54, 0x4f, 0x4d, 0x10, 0x04, 0x32, 0x9d, 0x01, 0x0a, 0x14, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, - 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x75, - 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x34, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x69, 0x73, 0x75, - 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x3a, 0x0d, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x87, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, - 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, - 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x73, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x37, 0x0a, 0x0d, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x73, + 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x76, 0x69, 0x73, 0x75, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x0d, 0x56, 0x69, 0x73, 0x75, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x73, + 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x74, 0x6d, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x74, 0x6d, 0x6c, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x40, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, + 0x09, 0x52, 0x4f, 0x43, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x54, 0x46, 0x44, 0x56, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x46, 0x4d, 0x41, 0x10, 0x02, + 0x12, 0x09, 0x0a, 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x43, + 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x04, 0x32, 0x9d, 0x01, 0x0a, 0x14, 0x56, 0x69, 0x73, 0x75, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x84, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, + 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x34, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x69, + 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x3a, 0x0d, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x87, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x92, 0x41, 0x4c, 0x52, 0x1b, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x12, 0x10, 0x12, 0x0e, 0x0a, 0x0c, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, + 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, + 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/backend/api/v1/go_client/visualization.pb.gw.go b/backend/api/v1/go_client/visualization.pb.gw.go index 358304c371..c7ff1b6bb8 100644 --- a/backend/api/v1/go_client/visualization.pb.gw.go +++ b/backend/api/v1/go_client/visualization.pb.gw.go @@ -13,20 +13,23 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_VisualizationService_CreateVisualization_0(ctx context.Context, marshaler runtime.Marshaler, client VisualizationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateVisualizationRequest @@ -53,7 +56,6 @@ func request_VisualizationService_CreateVisualization_0(ctx context.Context, mar } protoReq.Namespace, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } @@ -63,6 +65,74 @@ func request_VisualizationService_CreateVisualization_0(ctx context.Context, mar } +func local_request_VisualizationService_CreateVisualization_0(ctx context.Context, marshaler runtime.Marshaler, server VisualizationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateVisualizationRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Visualization); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.CreateVisualization(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterVisualizationServiceHandlerServer registers the http handlers for service VisualizationService to "mux". +// UnaryRPC :call VisualizationServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterVisualizationServiceHandlerFromEndpoint instead. +func RegisterVisualizationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VisualizationServiceServer) error { + + mux.Handle("POST", pattern_VisualizationService_CreateVisualization_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.VisualizationService/CreateVisualization", runtime.WithHTTPPathPattern("/apis/v1/visualizations/{namespace}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisualizationService_CreateVisualization_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisualizationService_CreateVisualization_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterVisualizationServiceHandlerFromEndpoint is same as RegisterVisualizationServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterVisualizationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -105,19 +175,21 @@ func RegisterVisualizationServiceHandlerClient(ctx context.Context, mux *runtime ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.VisualizationService/CreateVisualization", runtime.WithHTTPPathPattern("/apis/v1/visualizations/{namespace}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_VisualizationService_CreateVisualization_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_VisualizationService_CreateVisualization_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_VisualizationService_CreateVisualization_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_VisualizationService_CreateVisualization_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_client.go b/backend/api/v1/go_http_client/experiment_client/experiment_client.go index 900a26ebfa..1987fdf9ba 100644 --- a/backend/api/v1/go_http_client/experiment_client/experiment_client.go +++ b/backend/api/v1/go_http_client/experiment_client/experiment_client.go @@ -8,8 +8,7 @@ package experiment_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_client/experiment_service" ) @@ -27,7 +26,7 @@ const ( ) // DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http", "https"} +var DefaultSchemes = []string{"http"} // NewHTTPClient creates a new experiment HTTP client. func NewHTTPClient(formats strfmt.Registry) *Experiment { @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Experiment cli := new(Experiment) cli.Transport = transport - cli.ExperimentService = experiment_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Experiment is a client for experiment type Experiment struct { - ExperimentService *experiment_service.Client + ExperimentService experiment_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Experiment struct { // SetTransport changes the transport on the client and all its subresources func (c *Experiment) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.ExperimentService.SetTransport(transport) - } diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/archive_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/archive_experiment_parameters.go deleted file mode 100644 index 51b7262ccd..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/archive_experiment_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewArchiveExperimentParams creates a new ArchiveExperimentParams object -// with the default values initialized. -func NewArchiveExperimentParams() *ArchiveExperimentParams { - var () - return &ArchiveExperimentParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewArchiveExperimentParamsWithTimeout creates a new ArchiveExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewArchiveExperimentParamsWithTimeout(timeout time.Duration) *ArchiveExperimentParams { - var () - return &ArchiveExperimentParams{ - - timeout: timeout, - } -} - -// NewArchiveExperimentParamsWithContext creates a new ArchiveExperimentParams object -// with the default values initialized, and the ability to set a context for a request -func NewArchiveExperimentParamsWithContext(ctx context.Context) *ArchiveExperimentParams { - var () - return &ArchiveExperimentParams{ - - Context: ctx, - } -} - -// NewArchiveExperimentParamsWithHTTPClient creates a new ArchiveExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewArchiveExperimentParamsWithHTTPClient(client *http.Client) *ArchiveExperimentParams { - var () - return &ArchiveExperimentParams{ - HTTPClient: client, - } -} - -/*ArchiveExperimentParams contains all the parameters to send to the API endpoint -for the archive experiment operation typically these are written to a http.Request -*/ -type ArchiveExperimentParams struct { - - /*ID - The ID of the experiment to be archived. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the archive experiment params -func (o *ArchiveExperimentParams) WithTimeout(timeout time.Duration) *ArchiveExperimentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the archive experiment params -func (o *ArchiveExperimentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the archive experiment params -func (o *ArchiveExperimentParams) WithContext(ctx context.Context) *ArchiveExperimentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the archive experiment params -func (o *ArchiveExperimentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the archive experiment params -func (o *ArchiveExperimentParams) WithHTTPClient(client *http.Client) *ArchiveExperimentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the archive experiment params -func (o *ArchiveExperimentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the archive experiment params -func (o *ArchiveExperimentParams) WithID(id string) *ArchiveExperimentParams { - o.SetID(id) - return o -} - -// SetID adds the id to the archive experiment params -func (o *ArchiveExperimentParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ArchiveExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/archive_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/archive_experiment_responses.go deleted file mode 100644 index a39e9a9bea..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/archive_experiment_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" -) - -// ArchiveExperimentReader is a Reader for the ArchiveExperiment structure. -type ArchiveExperimentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArchiveExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewArchiveExperimentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewArchiveExperimentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArchiveExperimentOK creates a ArchiveExperimentOK with default headers values -func NewArchiveExperimentOK() *ArchiveExperimentOK { - return &ArchiveExperimentOK{} -} - -/*ArchiveExperimentOK handles this case with default header values. - -A successful response. -*/ -type ArchiveExperimentOK struct { - Payload interface{} -} - -func (o *ArchiveExperimentOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/experiments/{id}:archive][%d] archiveExperimentOK %+v", 200, o.Payload) -} - -func (o *ArchiveExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArchiveExperimentDefault creates a ArchiveExperimentDefault with default headers values -func NewArchiveExperimentDefault(code int) *ArchiveExperimentDefault { - return &ArchiveExperimentDefault{ - _statusCode: code, - } -} - -/*ArchiveExperimentDefault handles this case with default header values. - -ArchiveExperimentDefault archive experiment default -*/ -type ArchiveExperimentDefault struct { - _statusCode int - - Payload *experiment_model.V1Status -} - -// Code gets the status code for the archive experiment default response -func (o *ArchiveExperimentDefault) Code() int { - return o._statusCode -} - -func (o *ArchiveExperimentDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/experiments/{id}:archive][%d] ArchiveExperiment default %+v", o._statusCode, o.Payload) -} - -func (o *ArchiveExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(experiment_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/create_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/create_experiment_parameters.go deleted file mode 100644 index f30029326f..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/create_experiment_parameters.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" -) - -// NewCreateExperimentParams creates a new CreateExperimentParams object -// with the default values initialized. -func NewCreateExperimentParams() *CreateExperimentParams { - var () - return &CreateExperimentParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewCreateExperimentParamsWithTimeout creates a new CreateExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewCreateExperimentParamsWithTimeout(timeout time.Duration) *CreateExperimentParams { - var () - return &CreateExperimentParams{ - - timeout: timeout, - } -} - -// NewCreateExperimentParamsWithContext creates a new CreateExperimentParams object -// with the default values initialized, and the ability to set a context for a request -func NewCreateExperimentParamsWithContext(ctx context.Context) *CreateExperimentParams { - var () - return &CreateExperimentParams{ - - Context: ctx, - } -} - -// NewCreateExperimentParamsWithHTTPClient creates a new CreateExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewCreateExperimentParamsWithHTTPClient(client *http.Client) *CreateExperimentParams { - var () - return &CreateExperimentParams{ - HTTPClient: client, - } -} - -/*CreateExperimentParams contains all the parameters to send to the API endpoint -for the create experiment operation typically these are written to a http.Request -*/ -type CreateExperimentParams struct { - - /*Body - The experiment to be created. - - */ - Body *experiment_model.V1Experiment - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the create experiment params -func (o *CreateExperimentParams) WithTimeout(timeout time.Duration) *CreateExperimentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create experiment params -func (o *CreateExperimentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create experiment params -func (o *CreateExperimentParams) WithContext(ctx context.Context) *CreateExperimentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create experiment params -func (o *CreateExperimentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create experiment params -func (o *CreateExperimentParams) WithHTTPClient(client *http.Client) *CreateExperimentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create experiment params -func (o *CreateExperimentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create experiment params -func (o *CreateExperimentParams) WithBody(body *experiment_model.V1Experiment) *CreateExperimentParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create experiment params -func (o *CreateExperimentParams) SetBody(body *experiment_model.V1Experiment) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/create_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/create_experiment_responses.go deleted file mode 100644 index b829ea702b..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/create_experiment_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" -) - -// CreateExperimentReader is a Reader for the CreateExperiment structure. -type CreateExperimentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewCreateExperimentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewCreateExperimentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreateExperimentOK creates a CreateExperimentOK with default headers values -func NewCreateExperimentOK() *CreateExperimentOK { - return &CreateExperimentOK{} -} - -/*CreateExperimentOK handles this case with default header values. - -A successful response. -*/ -type CreateExperimentOK struct { - Payload *experiment_model.V1Experiment -} - -func (o *CreateExperimentOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/experiments][%d] createExperimentOK %+v", 200, o.Payload) -} - -func (o *CreateExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(experiment_model.V1Experiment) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateExperimentDefault creates a CreateExperimentDefault with default headers values -func NewCreateExperimentDefault(code int) *CreateExperimentDefault { - return &CreateExperimentDefault{ - _statusCode: code, - } -} - -/*CreateExperimentDefault handles this case with default header values. - -CreateExperimentDefault create experiment default -*/ -type CreateExperimentDefault struct { - _statusCode int - - Payload *experiment_model.V1Status -} - -// Code gets the status code for the create experiment default response -func (o *CreateExperimentDefault) Code() int { - return o._statusCode -} - -func (o *CreateExperimentDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/experiments][%d] CreateExperiment default %+v", o._statusCode, o.Payload) -} - -func (o *CreateExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(experiment_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/delete_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/delete_experiment_parameters.go deleted file mode 100644 index d2ad3fca08..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/delete_experiment_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDeleteExperimentParams creates a new DeleteExperimentParams object -// with the default values initialized. -func NewDeleteExperimentParams() *DeleteExperimentParams { - var () - return &DeleteExperimentParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteExperimentParamsWithTimeout creates a new DeleteExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDeleteExperimentParamsWithTimeout(timeout time.Duration) *DeleteExperimentParams { - var () - return &DeleteExperimentParams{ - - timeout: timeout, - } -} - -// NewDeleteExperimentParamsWithContext creates a new DeleteExperimentParams object -// with the default values initialized, and the ability to set a context for a request -func NewDeleteExperimentParamsWithContext(ctx context.Context) *DeleteExperimentParams { - var () - return &DeleteExperimentParams{ - - Context: ctx, - } -} - -// NewDeleteExperimentParamsWithHTTPClient creates a new DeleteExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDeleteExperimentParamsWithHTTPClient(client *http.Client) *DeleteExperimentParams { - var () - return &DeleteExperimentParams{ - HTTPClient: client, - } -} - -/*DeleteExperimentParams contains all the parameters to send to the API endpoint -for the delete experiment operation typically these are written to a http.Request -*/ -type DeleteExperimentParams struct { - - /*ID - The ID of the experiment to be deleted. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the delete experiment params -func (o *DeleteExperimentParams) WithTimeout(timeout time.Duration) *DeleteExperimentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete experiment params -func (o *DeleteExperimentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete experiment params -func (o *DeleteExperimentParams) WithContext(ctx context.Context) *DeleteExperimentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete experiment params -func (o *DeleteExperimentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete experiment params -func (o *DeleteExperimentParams) WithHTTPClient(client *http.Client) *DeleteExperimentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete experiment params -func (o *DeleteExperimentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete experiment params -func (o *DeleteExperimentParams) WithID(id string) *DeleteExperimentParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete experiment params -func (o *DeleteExperimentParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/delete_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/delete_experiment_responses.go deleted file mode 100644 index c1e5fbec2a..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/delete_experiment_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" -) - -// DeleteExperimentReader is a Reader for the DeleteExperiment structure. -type DeleteExperimentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewDeleteExperimentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewDeleteExperimentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDeleteExperimentOK creates a DeleteExperimentOK with default headers values -func NewDeleteExperimentOK() *DeleteExperimentOK { - return &DeleteExperimentOK{} -} - -/*DeleteExperimentOK handles this case with default header values. - -A successful response. -*/ -type DeleteExperimentOK struct { - Payload interface{} -} - -func (o *DeleteExperimentOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/experiments/{id}][%d] deleteExperimentOK %+v", 200, o.Payload) -} - -func (o *DeleteExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteExperimentDefault creates a DeleteExperimentDefault with default headers values -func NewDeleteExperimentDefault(code int) *DeleteExperimentDefault { - return &DeleteExperimentDefault{ - _statusCode: code, - } -} - -/*DeleteExperimentDefault handles this case with default header values. - -DeleteExperimentDefault delete experiment default -*/ -type DeleteExperimentDefault struct { - _statusCode int - - Payload *experiment_model.V1Status -} - -// Code gets the status code for the delete experiment default response -func (o *DeleteExperimentDefault) Code() int { - return o._statusCode -} - -func (o *DeleteExperimentDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/experiments/{id}][%d] DeleteExperiment default %+v", o._statusCode, o.Payload) -} - -func (o *DeleteExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(experiment_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_parameters.go new file mode 100644 index 0000000000..8590d00828 --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewExperimentServiceArchiveExperimentParams creates a new ExperimentServiceArchiveExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewExperimentServiceArchiveExperimentParams() *ExperimentServiceArchiveExperimentParams { + return &ExperimentServiceArchiveExperimentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewExperimentServiceArchiveExperimentParamsWithTimeout creates a new ExperimentServiceArchiveExperimentParams object +// with the ability to set a timeout on a request. +func NewExperimentServiceArchiveExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceArchiveExperimentParams { + return &ExperimentServiceArchiveExperimentParams{ + timeout: timeout, + } +} + +// NewExperimentServiceArchiveExperimentParamsWithContext creates a new ExperimentServiceArchiveExperimentParams object +// with the ability to set a context for a request. +func NewExperimentServiceArchiveExperimentParamsWithContext(ctx context.Context) *ExperimentServiceArchiveExperimentParams { + return &ExperimentServiceArchiveExperimentParams{ + Context: ctx, + } +} + +// NewExperimentServiceArchiveExperimentParamsWithHTTPClient creates a new ExperimentServiceArchiveExperimentParams object +// with the ability to set a custom HTTPClient for a request. +func NewExperimentServiceArchiveExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceArchiveExperimentParams { + return &ExperimentServiceArchiveExperimentParams{ + HTTPClient: client, + } +} + +/* +ExperimentServiceArchiveExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service archive experiment operation. + + Typically these are written to a http.Request. +*/ +type ExperimentServiceArchiveExperimentParams struct { + + /* ID. + + The ID of the experiment to be archived. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the experiment service archive experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceArchiveExperimentParams) WithDefaults() *ExperimentServiceArchiveExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service archive experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceArchiveExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the experiment service archive experiment params +func (o *ExperimentServiceArchiveExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceArchiveExperimentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the experiment service archive experiment params +func (o *ExperimentServiceArchiveExperimentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the experiment service archive experiment params +func (o *ExperimentServiceArchiveExperimentParams) WithContext(ctx context.Context) *ExperimentServiceArchiveExperimentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the experiment service archive experiment params +func (o *ExperimentServiceArchiveExperimentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the experiment service archive experiment params +func (o *ExperimentServiceArchiveExperimentParams) WithHTTPClient(client *http.Client) *ExperimentServiceArchiveExperimentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the experiment service archive experiment params +func (o *ExperimentServiceArchiveExperimentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the experiment service archive experiment params +func (o *ExperimentServiceArchiveExperimentParams) WithID(id string) *ExperimentServiceArchiveExperimentParams { + o.SetID(id) + return o +} + +// SetID adds the id to the experiment service archive experiment params +func (o *ExperimentServiceArchiveExperimentParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *ExperimentServiceArchiveExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_responses.go new file mode 100644 index 0000000000..81e4443a61 --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" +) + +// ExperimentServiceArchiveExperimentReader is a Reader for the ExperimentServiceArchiveExperiment structure. +type ExperimentServiceArchiveExperimentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ExperimentServiceArchiveExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewExperimentServiceArchiveExperimentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewExperimentServiceArchiveExperimentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewExperimentServiceArchiveExperimentOK creates a ExperimentServiceArchiveExperimentOK with default headers values +func NewExperimentServiceArchiveExperimentOK() *ExperimentServiceArchiveExperimentOK { + return &ExperimentServiceArchiveExperimentOK{} +} + +/* +ExperimentServiceArchiveExperimentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ExperimentServiceArchiveExperimentOK struct { + Payload interface{} +} + +// IsSuccess returns true when this experiment service archive experiment o k response has a 2xx status code +func (o *ExperimentServiceArchiveExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service archive experiment o k response has a 3xx status code +func (o *ExperimentServiceArchiveExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service archive experiment o k response has a 4xx status code +func (o *ExperimentServiceArchiveExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service archive experiment o k response has a 5xx status code +func (o *ExperimentServiceArchiveExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service archive experiment o k response a status code equal to that given +func (o *ExperimentServiceArchiveExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service archive experiment o k response +func (o *ExperimentServiceArchiveExperimentOK) Code() int { + return 200 +} + +func (o *ExperimentServiceArchiveExperimentOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/experiments/{id}:archive][%d] experimentServiceArchiveExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceArchiveExperimentOK) String() string { + return fmt.Sprintf("[POST /apis/v1/experiments/{id}:archive][%d] experimentServiceArchiveExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceArchiveExperimentOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ExperimentServiceArchiveExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewExperimentServiceArchiveExperimentDefault creates a ExperimentServiceArchiveExperimentDefault with default headers values +func NewExperimentServiceArchiveExperimentDefault(code int) *ExperimentServiceArchiveExperimentDefault { + return &ExperimentServiceArchiveExperimentDefault{ + _statusCode: code, + } +} + +/* +ExperimentServiceArchiveExperimentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ExperimentServiceArchiveExperimentDefault struct { + _statusCode int + + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service archive experiment default response has a 2xx status code +func (o *ExperimentServiceArchiveExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service archive experiment default response has a 3xx status code +func (o *ExperimentServiceArchiveExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service archive experiment default response has a 4xx status code +func (o *ExperimentServiceArchiveExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service archive experiment default response has a 5xx status code +func (o *ExperimentServiceArchiveExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service archive experiment default response a status code equal to that given +func (o *ExperimentServiceArchiveExperimentDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the experiment service archive experiment default response +func (o *ExperimentServiceArchiveExperimentDefault) Code() int { + return o._statusCode +} + +func (o *ExperimentServiceArchiveExperimentDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/experiments/{id}:archive][%d] ExperimentService_ArchiveExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceArchiveExperimentDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/experiments/{id}:archive][%d] ExperimentService_ArchiveExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceArchiveExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload +} + +func (o *ExperimentServiceArchiveExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(experiment_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_client.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_client.go index dc8b6ef8aa..804e9f1b23 100644 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_client.go +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_client.go @@ -7,12 +7,11 @@ package experiment_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) // New creates a new experiment service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -24,178 +23,252 @@ type Client struct { formats strfmt.Registry } +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + ExperimentServiceArchiveExperiment(params *ExperimentServiceArchiveExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceArchiveExperimentOK, error) + + ExperimentServiceCreateExperiment(params *ExperimentServiceCreateExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceCreateExperimentOK, error) + + ExperimentServiceDeleteExperiment(params *ExperimentServiceDeleteExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceDeleteExperimentOK, error) + + ExperimentServiceGetExperiment(params *ExperimentServiceGetExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceGetExperimentOK, error) + + ExperimentServiceListExperiment(params *ExperimentServiceListExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceListExperimentOK, error) + + ExperimentServiceUnarchiveExperiment(params *ExperimentServiceUnarchiveExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceUnarchiveExperimentOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -ArchiveExperiment archives an experiment and the experiment s runs and jobs +ExperimentServiceArchiveExperiment archives an experiment and the experiment s runs and jobs */ -func (a *Client) ArchiveExperiment(params *ArchiveExperimentParams, authInfo runtime.ClientAuthInfoWriter) (*ArchiveExperimentOK, error) { +func (a *Client) ExperimentServiceArchiveExperiment(params *ExperimentServiceArchiveExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceArchiveExperimentOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewArchiveExperimentParams() + params = NewExperimentServiceArchiveExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ArchiveExperiment", + op := &runtime.ClientOperation{ + ID: "ExperimentService_ArchiveExperiment", Method: "POST", PathPattern: "/apis/v1/experiments/{id}:archive", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &ArchiveExperimentReader{formats: a.formats}, + Reader: &ExperimentServiceArchiveExperimentReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ArchiveExperimentOK), nil - + success, ok := result.(*ExperimentServiceArchiveExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceArchiveExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -CreateExperiment creates a new experiment +ExperimentServiceCreateExperiment creates a new experiment */ -func (a *Client) CreateExperiment(params *CreateExperimentParams, authInfo runtime.ClientAuthInfoWriter) (*CreateExperimentOK, error) { +func (a *Client) ExperimentServiceCreateExperiment(params *ExperimentServiceCreateExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceCreateExperimentOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewCreateExperimentParams() + params = NewExperimentServiceCreateExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "CreateExperiment", + op := &runtime.ClientOperation{ + ID: "ExperimentService_CreateExperiment", Method: "POST", PathPattern: "/apis/v1/experiments", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &CreateExperimentReader{formats: a.formats}, + Reader: &ExperimentServiceCreateExperimentReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*CreateExperimentOK), nil - + success, ok := result.(*ExperimentServiceCreateExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceCreateExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -DeleteExperiment 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 +ExperimentServiceDeleteExperiment 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 */ -func (a *Client) DeleteExperiment(params *DeleteExperimentParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteExperimentOK, error) { +func (a *Client) ExperimentServiceDeleteExperiment(params *ExperimentServiceDeleteExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceDeleteExperimentOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDeleteExperimentParams() + params = NewExperimentServiceDeleteExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "DeleteExperiment", + op := &runtime.ClientOperation{ + ID: "ExperimentService_DeleteExperiment", Method: "DELETE", PathPattern: "/apis/v1/experiments/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &DeleteExperimentReader{formats: a.formats}, + Reader: &ExperimentServiceDeleteExperimentReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*DeleteExperimentOK), nil - + success, ok := result.(*ExperimentServiceDeleteExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceDeleteExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -GetExperiment finds a specific experiment by ID +ExperimentServiceGetExperiment finds a specific experiment by ID */ -func (a *Client) GetExperiment(params *GetExperimentParams, authInfo runtime.ClientAuthInfoWriter) (*GetExperimentOK, error) { +func (a *Client) ExperimentServiceGetExperiment(params *ExperimentServiceGetExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceGetExperimentOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewGetExperimentParams() + params = NewExperimentServiceGetExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetExperiment", + op := &runtime.ClientOperation{ + ID: "ExperimentService_GetExperiment", Method: "GET", PathPattern: "/apis/v1/experiments/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &GetExperimentReader{formats: a.formats}, + Reader: &ExperimentServiceGetExperimentReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*GetExperimentOK), nil - + success, ok := result.(*ExperimentServiceGetExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceGetExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ListExperiment finds all experiments supports pagination and sorting on certain fields +ExperimentServiceListExperiment finds all experiments supports pagination and sorting on certain fields */ -func (a *Client) ListExperiment(params *ListExperimentParams, authInfo runtime.ClientAuthInfoWriter) (*ListExperimentOK, error) { +func (a *Client) ExperimentServiceListExperiment(params *ExperimentServiceListExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceListExperimentOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewListExperimentParams() + params = NewExperimentServiceListExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ListExperiment", + op := &runtime.ClientOperation{ + ID: "ExperimentService_ListExperiment", Method: "GET", PathPattern: "/apis/v1/experiments", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &ListExperimentReader{formats: a.formats}, + Reader: &ExperimentServiceListExperimentReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ListExperimentOK), nil - + success, ok := result.(*ExperimentServiceListExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceListExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -UnarchiveExperiment restores an archived experiment the experiment s archived runs and jobs will stay archived +ExperimentServiceUnarchiveExperiment restores an archived experiment the experiment s archived runs and jobs will stay archived */ -func (a *Client) UnarchiveExperiment(params *UnarchiveExperimentParams, authInfo runtime.ClientAuthInfoWriter) (*UnarchiveExperimentOK, error) { +func (a *Client) ExperimentServiceUnarchiveExperiment(params *ExperimentServiceUnarchiveExperimentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceUnarchiveExperimentOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewUnarchiveExperimentParams() + params = NewExperimentServiceUnarchiveExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "UnarchiveExperiment", + op := &runtime.ClientOperation{ + ID: "ExperimentService_UnarchiveExperiment", Method: "POST", PathPattern: "/apis/v1/experiments/{id}:unarchive", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &UnarchiveExperimentReader{formats: a.formats}, + Reader: &ExperimentServiceUnarchiveExperimentReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*UnarchiveExperimentOK), nil - + success, ok := result.(*ExperimentServiceUnarchiveExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceUnarchiveExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_parameters.go new file mode 100644 index 0000000000..9b70d8330e --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" +) + +// NewExperimentServiceCreateExperimentParams creates a new ExperimentServiceCreateExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewExperimentServiceCreateExperimentParams() *ExperimentServiceCreateExperimentParams { + return &ExperimentServiceCreateExperimentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewExperimentServiceCreateExperimentParamsWithTimeout creates a new ExperimentServiceCreateExperimentParams object +// with the ability to set a timeout on a request. +func NewExperimentServiceCreateExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceCreateExperimentParams { + return &ExperimentServiceCreateExperimentParams{ + timeout: timeout, + } +} + +// NewExperimentServiceCreateExperimentParamsWithContext creates a new ExperimentServiceCreateExperimentParams object +// with the ability to set a context for a request. +func NewExperimentServiceCreateExperimentParamsWithContext(ctx context.Context) *ExperimentServiceCreateExperimentParams { + return &ExperimentServiceCreateExperimentParams{ + Context: ctx, + } +} + +// NewExperimentServiceCreateExperimentParamsWithHTTPClient creates a new ExperimentServiceCreateExperimentParams object +// with the ability to set a custom HTTPClient for a request. +func NewExperimentServiceCreateExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceCreateExperimentParams { + return &ExperimentServiceCreateExperimentParams{ + HTTPClient: client, + } +} + +/* +ExperimentServiceCreateExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service create experiment operation. + + Typically these are written to a http.Request. +*/ +type ExperimentServiceCreateExperimentParams struct { + + /* Experiment. + + The experiment to be created. + */ + Experiment *experiment_model.V1Experiment + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the experiment service create experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceCreateExperimentParams) WithDefaults() *ExperimentServiceCreateExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service create experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceCreateExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceCreateExperimentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) WithContext(ctx context.Context) *ExperimentServiceCreateExperimentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) WithHTTPClient(client *http.Client) *ExperimentServiceCreateExperimentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithExperiment adds the experiment to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) WithExperiment(experiment *experiment_model.V1Experiment) *ExperimentServiceCreateExperimentParams { + o.SetExperiment(experiment) + return o +} + +// SetExperiment adds the experiment to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) SetExperiment(experiment *experiment_model.V1Experiment) { + o.Experiment = experiment +} + +// WriteToRequest writes these params to a swagger request +func (o *ExperimentServiceCreateExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Experiment != nil { + if err := r.SetBodyParam(o.Experiment); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_responses.go new file mode 100644 index 0000000000..9af0176503 --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" +) + +// ExperimentServiceCreateExperimentReader is a Reader for the ExperimentServiceCreateExperiment structure. +type ExperimentServiceCreateExperimentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ExperimentServiceCreateExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewExperimentServiceCreateExperimentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewExperimentServiceCreateExperimentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewExperimentServiceCreateExperimentOK creates a ExperimentServiceCreateExperimentOK with default headers values +func NewExperimentServiceCreateExperimentOK() *ExperimentServiceCreateExperimentOK { + return &ExperimentServiceCreateExperimentOK{} +} + +/* +ExperimentServiceCreateExperimentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ExperimentServiceCreateExperimentOK struct { + Payload *experiment_model.V1Experiment +} + +// IsSuccess returns true when this experiment service create experiment o k response has a 2xx status code +func (o *ExperimentServiceCreateExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service create experiment o k response has a 3xx status code +func (o *ExperimentServiceCreateExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service create experiment o k response has a 4xx status code +func (o *ExperimentServiceCreateExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service create experiment o k response has a 5xx status code +func (o *ExperimentServiceCreateExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service create experiment o k response a status code equal to that given +func (o *ExperimentServiceCreateExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service create experiment o k response +func (o *ExperimentServiceCreateExperimentOK) Code() int { + return 200 +} + +func (o *ExperimentServiceCreateExperimentOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/experiments][%d] experimentServiceCreateExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceCreateExperimentOK) String() string { + return fmt.Sprintf("[POST /apis/v1/experiments][%d] experimentServiceCreateExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceCreateExperimentOK) GetPayload() *experiment_model.V1Experiment { + return o.Payload +} + +func (o *ExperimentServiceCreateExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(experiment_model.V1Experiment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewExperimentServiceCreateExperimentDefault creates a ExperimentServiceCreateExperimentDefault with default headers values +func NewExperimentServiceCreateExperimentDefault(code int) *ExperimentServiceCreateExperimentDefault { + return &ExperimentServiceCreateExperimentDefault{ + _statusCode: code, + } +} + +/* +ExperimentServiceCreateExperimentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ExperimentServiceCreateExperimentDefault struct { + _statusCode int + + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service create experiment default response has a 2xx status code +func (o *ExperimentServiceCreateExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service create experiment default response has a 3xx status code +func (o *ExperimentServiceCreateExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service create experiment default response has a 4xx status code +func (o *ExperimentServiceCreateExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service create experiment default response has a 5xx status code +func (o *ExperimentServiceCreateExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service create experiment default response a status code equal to that given +func (o *ExperimentServiceCreateExperimentDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the experiment service create experiment default response +func (o *ExperimentServiceCreateExperimentDefault) Code() int { + return o._statusCode +} + +func (o *ExperimentServiceCreateExperimentDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/experiments][%d] ExperimentService_CreateExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceCreateExperimentDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/experiments][%d] ExperimentService_CreateExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceCreateExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload +} + +func (o *ExperimentServiceCreateExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(experiment_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_parameters.go new file mode 100644 index 0000000000..ae81951e45 --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewExperimentServiceDeleteExperimentParams creates a new ExperimentServiceDeleteExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewExperimentServiceDeleteExperimentParams() *ExperimentServiceDeleteExperimentParams { + return &ExperimentServiceDeleteExperimentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewExperimentServiceDeleteExperimentParamsWithTimeout creates a new ExperimentServiceDeleteExperimentParams object +// with the ability to set a timeout on a request. +func NewExperimentServiceDeleteExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceDeleteExperimentParams { + return &ExperimentServiceDeleteExperimentParams{ + timeout: timeout, + } +} + +// NewExperimentServiceDeleteExperimentParamsWithContext creates a new ExperimentServiceDeleteExperimentParams object +// with the ability to set a context for a request. +func NewExperimentServiceDeleteExperimentParamsWithContext(ctx context.Context) *ExperimentServiceDeleteExperimentParams { + return &ExperimentServiceDeleteExperimentParams{ + Context: ctx, + } +} + +// NewExperimentServiceDeleteExperimentParamsWithHTTPClient creates a new ExperimentServiceDeleteExperimentParams object +// with the ability to set a custom HTTPClient for a request. +func NewExperimentServiceDeleteExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceDeleteExperimentParams { + return &ExperimentServiceDeleteExperimentParams{ + HTTPClient: client, + } +} + +/* +ExperimentServiceDeleteExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service delete experiment operation. + + Typically these are written to a http.Request. +*/ +type ExperimentServiceDeleteExperimentParams struct { + + /* ID. + + The ID of the experiment to be deleted. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the experiment service delete experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceDeleteExperimentParams) WithDefaults() *ExperimentServiceDeleteExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service delete experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceDeleteExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the experiment service delete experiment params +func (o *ExperimentServiceDeleteExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceDeleteExperimentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the experiment service delete experiment params +func (o *ExperimentServiceDeleteExperimentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the experiment service delete experiment params +func (o *ExperimentServiceDeleteExperimentParams) WithContext(ctx context.Context) *ExperimentServiceDeleteExperimentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the experiment service delete experiment params +func (o *ExperimentServiceDeleteExperimentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the experiment service delete experiment params +func (o *ExperimentServiceDeleteExperimentParams) WithHTTPClient(client *http.Client) *ExperimentServiceDeleteExperimentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the experiment service delete experiment params +func (o *ExperimentServiceDeleteExperimentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the experiment service delete experiment params +func (o *ExperimentServiceDeleteExperimentParams) WithID(id string) *ExperimentServiceDeleteExperimentParams { + o.SetID(id) + return o +} + +// SetID adds the id to the experiment service delete experiment params +func (o *ExperimentServiceDeleteExperimentParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *ExperimentServiceDeleteExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_responses.go new file mode 100644 index 0000000000..9b04c0f173 --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" +) + +// ExperimentServiceDeleteExperimentReader is a Reader for the ExperimentServiceDeleteExperiment structure. +type ExperimentServiceDeleteExperimentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ExperimentServiceDeleteExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewExperimentServiceDeleteExperimentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewExperimentServiceDeleteExperimentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewExperimentServiceDeleteExperimentOK creates a ExperimentServiceDeleteExperimentOK with default headers values +func NewExperimentServiceDeleteExperimentOK() *ExperimentServiceDeleteExperimentOK { + return &ExperimentServiceDeleteExperimentOK{} +} + +/* +ExperimentServiceDeleteExperimentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ExperimentServiceDeleteExperimentOK struct { + Payload interface{} +} + +// IsSuccess returns true when this experiment service delete experiment o k response has a 2xx status code +func (o *ExperimentServiceDeleteExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service delete experiment o k response has a 3xx status code +func (o *ExperimentServiceDeleteExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service delete experiment o k response has a 4xx status code +func (o *ExperimentServiceDeleteExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service delete experiment o k response has a 5xx status code +func (o *ExperimentServiceDeleteExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service delete experiment o k response a status code equal to that given +func (o *ExperimentServiceDeleteExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service delete experiment o k response +func (o *ExperimentServiceDeleteExperimentOK) Code() int { + return 200 +} + +func (o *ExperimentServiceDeleteExperimentOK) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/experiments/{id}][%d] experimentServiceDeleteExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceDeleteExperimentOK) String() string { + return fmt.Sprintf("[DELETE /apis/v1/experiments/{id}][%d] experimentServiceDeleteExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceDeleteExperimentOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ExperimentServiceDeleteExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewExperimentServiceDeleteExperimentDefault creates a ExperimentServiceDeleteExperimentDefault with default headers values +func NewExperimentServiceDeleteExperimentDefault(code int) *ExperimentServiceDeleteExperimentDefault { + return &ExperimentServiceDeleteExperimentDefault{ + _statusCode: code, + } +} + +/* +ExperimentServiceDeleteExperimentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ExperimentServiceDeleteExperimentDefault struct { + _statusCode int + + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service delete experiment default response has a 2xx status code +func (o *ExperimentServiceDeleteExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service delete experiment default response has a 3xx status code +func (o *ExperimentServiceDeleteExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service delete experiment default response has a 4xx status code +func (o *ExperimentServiceDeleteExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service delete experiment default response has a 5xx status code +func (o *ExperimentServiceDeleteExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service delete experiment default response a status code equal to that given +func (o *ExperimentServiceDeleteExperimentDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the experiment service delete experiment default response +func (o *ExperimentServiceDeleteExperimentDefault) Code() int { + return o._statusCode +} + +func (o *ExperimentServiceDeleteExperimentDefault) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/experiments/{id}][%d] ExperimentService_DeleteExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceDeleteExperimentDefault) String() string { + return fmt.Sprintf("[DELETE /apis/v1/experiments/{id}][%d] ExperimentService_DeleteExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceDeleteExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload +} + +func (o *ExperimentServiceDeleteExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(experiment_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_parameters.go new file mode 100644 index 0000000000..6bc0311169 --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewExperimentServiceGetExperimentParams creates a new ExperimentServiceGetExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewExperimentServiceGetExperimentParams() *ExperimentServiceGetExperimentParams { + return &ExperimentServiceGetExperimentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewExperimentServiceGetExperimentParamsWithTimeout creates a new ExperimentServiceGetExperimentParams object +// with the ability to set a timeout on a request. +func NewExperimentServiceGetExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceGetExperimentParams { + return &ExperimentServiceGetExperimentParams{ + timeout: timeout, + } +} + +// NewExperimentServiceGetExperimentParamsWithContext creates a new ExperimentServiceGetExperimentParams object +// with the ability to set a context for a request. +func NewExperimentServiceGetExperimentParamsWithContext(ctx context.Context) *ExperimentServiceGetExperimentParams { + return &ExperimentServiceGetExperimentParams{ + Context: ctx, + } +} + +// NewExperimentServiceGetExperimentParamsWithHTTPClient creates a new ExperimentServiceGetExperimentParams object +// with the ability to set a custom HTTPClient for a request. +func NewExperimentServiceGetExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceGetExperimentParams { + return &ExperimentServiceGetExperimentParams{ + HTTPClient: client, + } +} + +/* +ExperimentServiceGetExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service get experiment operation. + + Typically these are written to a http.Request. +*/ +type ExperimentServiceGetExperimentParams struct { + + /* ID. + + The ID of the experiment to be retrieved. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the experiment service get experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceGetExperimentParams) WithDefaults() *ExperimentServiceGetExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service get experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceGetExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the experiment service get experiment params +func (o *ExperimentServiceGetExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceGetExperimentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the experiment service get experiment params +func (o *ExperimentServiceGetExperimentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the experiment service get experiment params +func (o *ExperimentServiceGetExperimentParams) WithContext(ctx context.Context) *ExperimentServiceGetExperimentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the experiment service get experiment params +func (o *ExperimentServiceGetExperimentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the experiment service get experiment params +func (o *ExperimentServiceGetExperimentParams) WithHTTPClient(client *http.Client) *ExperimentServiceGetExperimentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the experiment service get experiment params +func (o *ExperimentServiceGetExperimentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the experiment service get experiment params +func (o *ExperimentServiceGetExperimentParams) WithID(id string) *ExperimentServiceGetExperimentParams { + o.SetID(id) + return o +} + +// SetID adds the id to the experiment service get experiment params +func (o *ExperimentServiceGetExperimentParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *ExperimentServiceGetExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_responses.go new file mode 100644 index 0000000000..e9624c285d --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" +) + +// ExperimentServiceGetExperimentReader is a Reader for the ExperimentServiceGetExperiment structure. +type ExperimentServiceGetExperimentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ExperimentServiceGetExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewExperimentServiceGetExperimentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewExperimentServiceGetExperimentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewExperimentServiceGetExperimentOK creates a ExperimentServiceGetExperimentOK with default headers values +func NewExperimentServiceGetExperimentOK() *ExperimentServiceGetExperimentOK { + return &ExperimentServiceGetExperimentOK{} +} + +/* +ExperimentServiceGetExperimentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ExperimentServiceGetExperimentOK struct { + Payload *experiment_model.V1Experiment +} + +// IsSuccess returns true when this experiment service get experiment o k response has a 2xx status code +func (o *ExperimentServiceGetExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service get experiment o k response has a 3xx status code +func (o *ExperimentServiceGetExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service get experiment o k response has a 4xx status code +func (o *ExperimentServiceGetExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service get experiment o k response has a 5xx status code +func (o *ExperimentServiceGetExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service get experiment o k response a status code equal to that given +func (o *ExperimentServiceGetExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service get experiment o k response +func (o *ExperimentServiceGetExperimentOK) Code() int { + return 200 +} + +func (o *ExperimentServiceGetExperimentOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/experiments/{id}][%d] experimentServiceGetExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceGetExperimentOK) String() string { + return fmt.Sprintf("[GET /apis/v1/experiments/{id}][%d] experimentServiceGetExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceGetExperimentOK) GetPayload() *experiment_model.V1Experiment { + return o.Payload +} + +func (o *ExperimentServiceGetExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(experiment_model.V1Experiment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewExperimentServiceGetExperimentDefault creates a ExperimentServiceGetExperimentDefault with default headers values +func NewExperimentServiceGetExperimentDefault(code int) *ExperimentServiceGetExperimentDefault { + return &ExperimentServiceGetExperimentDefault{ + _statusCode: code, + } +} + +/* +ExperimentServiceGetExperimentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ExperimentServiceGetExperimentDefault struct { + _statusCode int + + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service get experiment default response has a 2xx status code +func (o *ExperimentServiceGetExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service get experiment default response has a 3xx status code +func (o *ExperimentServiceGetExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service get experiment default response has a 4xx status code +func (o *ExperimentServiceGetExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service get experiment default response has a 5xx status code +func (o *ExperimentServiceGetExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service get experiment default response a status code equal to that given +func (o *ExperimentServiceGetExperimentDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the experiment service get experiment default response +func (o *ExperimentServiceGetExperimentDefault) Code() int { + return o._statusCode +} + +func (o *ExperimentServiceGetExperimentDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/experiments/{id}][%d] ExperimentService_GetExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceGetExperimentDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/experiments/{id}][%d] ExperimentService_GetExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceGetExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload +} + +func (o *ExperimentServiceGetExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(experiment_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiment_parameters.go new file mode 100644 index 0000000000..4a25d04312 --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiment_parameters.go @@ -0,0 +1,355 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewExperimentServiceListExperimentParams creates a new ExperimentServiceListExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewExperimentServiceListExperimentParams() *ExperimentServiceListExperimentParams { + return &ExperimentServiceListExperimentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewExperimentServiceListExperimentParamsWithTimeout creates a new ExperimentServiceListExperimentParams object +// with the ability to set a timeout on a request. +func NewExperimentServiceListExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceListExperimentParams { + return &ExperimentServiceListExperimentParams{ + timeout: timeout, + } +} + +// NewExperimentServiceListExperimentParamsWithContext creates a new ExperimentServiceListExperimentParams object +// with the ability to set a context for a request. +func NewExperimentServiceListExperimentParamsWithContext(ctx context.Context) *ExperimentServiceListExperimentParams { + return &ExperimentServiceListExperimentParams{ + Context: ctx, + } +} + +// NewExperimentServiceListExperimentParamsWithHTTPClient creates a new ExperimentServiceListExperimentParams object +// with the ability to set a custom HTTPClient for a request. +func NewExperimentServiceListExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceListExperimentParams { + return &ExperimentServiceListExperimentParams{ + HTTPClient: client, + } +} + +/* +ExperimentServiceListExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service list experiment operation. + + Typically these are written to a http.Request. +*/ +type ExperimentServiceListExperimentParams struct { + + /* Filter. + + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). + */ + Filter *string + + /* PageSize. + + 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. + + Format: int32 + */ + PageSize *int32 + + /* PageToken. + + 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. + */ + PageToken *string + + /* ResourceReferenceKeyID. + + The ID of the resource that referred to. + */ + ResourceReferenceKeyID *string + + /* ResourceReferenceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" + */ + ResourceReferenceKeyType *string + + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + Ascending by default. + */ + SortBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the experiment service list experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceListExperimentParams) WithDefaults() *ExperimentServiceListExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service list experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceListExperimentParams) SetDefaults() { + var ( + resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := ExperimentServiceListExperimentParams{ + ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceListExperimentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) WithContext(ctx context.Context) *ExperimentServiceListExperimentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) WithHTTPClient(client *http.Client) *ExperimentServiceListExperimentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) WithFilter(filter *string) *ExperimentServiceListExperimentParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithPageSize adds the pageSize to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) WithPageSize(pageSize *int32) *ExperimentServiceListExperimentParams { + o.SetPageSize(pageSize) + return o +} + +// SetPageSize adds the pageSize to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) SetPageSize(pageSize *int32) { + o.PageSize = pageSize +} + +// WithPageToken adds the pageToken to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) WithPageToken(pageToken *string) *ExperimentServiceListExperimentParams { + o.SetPageToken(pageToken) + return o +} + +// SetPageToken adds the pageToken to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) SetPageToken(pageToken *string) { + o.PageToken = pageToken +} + +// WithResourceReferenceKeyID adds the resourceReferenceKeyID to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) WithResourceReferenceKeyID(resourceReferenceKeyID *string) *ExperimentServiceListExperimentParams { + o.SetResourceReferenceKeyID(resourceReferenceKeyID) + return o +} + +// SetResourceReferenceKeyID adds the resourceReferenceKeyId to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) SetResourceReferenceKeyID(resourceReferenceKeyID *string) { + o.ResourceReferenceKeyID = resourceReferenceKeyID +} + +// WithResourceReferenceKeyType adds the resourceReferenceKeyType to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) WithResourceReferenceKeyType(resourceReferenceKeyType *string) *ExperimentServiceListExperimentParams { + o.SetResourceReferenceKeyType(resourceReferenceKeyType) + return o +} + +// SetResourceReferenceKeyType adds the resourceReferenceKeyType to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) SetResourceReferenceKeyType(resourceReferenceKeyType *string) { + o.ResourceReferenceKeyType = resourceReferenceKeyType +} + +// WithSortBy adds the sortBy to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) WithSortBy(sortBy *string) *ExperimentServiceListExperimentParams { + o.SetSortBy(sortBy) + return o +} + +// SetSortBy adds the sortBy to the experiment service list experiment params +func (o *ExperimentServiceListExperimentParams) SetSortBy(sortBy *string) { + o.SortBy = sortBy +} + +// WriteToRequest writes these params to a swagger request +func (o *ExperimentServiceListExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.PageSize != nil { + + // query param page_size + var qrPageSize int32 + + if o.PageSize != nil { + qrPageSize = *o.PageSize + } + qPageSize := swag.FormatInt32(qrPageSize) + if qPageSize != "" { + + if err := r.SetQueryParam("page_size", qPageSize); err != nil { + return err + } + } + } + + if o.PageToken != nil { + + // query param page_token + var qrPageToken string + + if o.PageToken != nil { + qrPageToken = *o.PageToken + } + qPageToken := qrPageToken + if qPageToken != "" { + + if err := r.SetQueryParam("page_token", qPageToken); err != nil { + return err + } + } + } + + if o.ResourceReferenceKeyID != nil { + + // query param resource_reference_key.id + var qrResourceReferenceKeyID string + + if o.ResourceReferenceKeyID != nil { + qrResourceReferenceKeyID = *o.ResourceReferenceKeyID + } + qResourceReferenceKeyID := qrResourceReferenceKeyID + if qResourceReferenceKeyID != "" { + + if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { + return err + } + } + } + + if o.ResourceReferenceKeyType != nil { + + // query param resource_reference_key.type + var qrResourceReferenceKeyType string + + if o.ResourceReferenceKeyType != nil { + qrResourceReferenceKeyType = *o.ResourceReferenceKeyType + } + qResourceReferenceKeyType := qrResourceReferenceKeyType + if qResourceReferenceKeyType != "" { + + if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { + return err + } + } + } + + if o.SortBy != nil { + + // query param sort_by + var qrSortBy string + + if o.SortBy != nil { + qrSortBy = *o.SortBy + } + qSortBy := qrSortBy + if qSortBy != "" { + + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiment_responses.go new file mode 100644 index 0000000000..c89007bf42 --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiment_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" +) + +// ExperimentServiceListExperimentReader is a Reader for the ExperimentServiceListExperiment structure. +type ExperimentServiceListExperimentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ExperimentServiceListExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewExperimentServiceListExperimentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewExperimentServiceListExperimentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewExperimentServiceListExperimentOK creates a ExperimentServiceListExperimentOK with default headers values +func NewExperimentServiceListExperimentOK() *ExperimentServiceListExperimentOK { + return &ExperimentServiceListExperimentOK{} +} + +/* +ExperimentServiceListExperimentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ExperimentServiceListExperimentOK struct { + Payload *experiment_model.V1ListExperimentsResponse +} + +// IsSuccess returns true when this experiment service list experiment o k response has a 2xx status code +func (o *ExperimentServiceListExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service list experiment o k response has a 3xx status code +func (o *ExperimentServiceListExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service list experiment o k response has a 4xx status code +func (o *ExperimentServiceListExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service list experiment o k response has a 5xx status code +func (o *ExperimentServiceListExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service list experiment o k response a status code equal to that given +func (o *ExperimentServiceListExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service list experiment o k response +func (o *ExperimentServiceListExperimentOK) Code() int { + return 200 +} + +func (o *ExperimentServiceListExperimentOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/experiments][%d] experimentServiceListExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceListExperimentOK) String() string { + return fmt.Sprintf("[GET /apis/v1/experiments][%d] experimentServiceListExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceListExperimentOK) GetPayload() *experiment_model.V1ListExperimentsResponse { + return o.Payload +} + +func (o *ExperimentServiceListExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(experiment_model.V1ListExperimentsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewExperimentServiceListExperimentDefault creates a ExperimentServiceListExperimentDefault with default headers values +func NewExperimentServiceListExperimentDefault(code int) *ExperimentServiceListExperimentDefault { + return &ExperimentServiceListExperimentDefault{ + _statusCode: code, + } +} + +/* +ExperimentServiceListExperimentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ExperimentServiceListExperimentDefault struct { + _statusCode int + + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service list experiment default response has a 2xx status code +func (o *ExperimentServiceListExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service list experiment default response has a 3xx status code +func (o *ExperimentServiceListExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service list experiment default response has a 4xx status code +func (o *ExperimentServiceListExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service list experiment default response has a 5xx status code +func (o *ExperimentServiceListExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service list experiment default response a status code equal to that given +func (o *ExperimentServiceListExperimentDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the experiment service list experiment default response +func (o *ExperimentServiceListExperimentDefault) Code() int { + return o._statusCode +} + +func (o *ExperimentServiceListExperimentDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/experiments][%d] ExperimentService_ListExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceListExperimentDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/experiments][%d] ExperimentService_ListExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceListExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload +} + +func (o *ExperimentServiceListExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(experiment_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_parameters.go new file mode 100644 index 0000000000..7e82acc26f --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewExperimentServiceUnarchiveExperimentParams creates a new ExperimentServiceUnarchiveExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewExperimentServiceUnarchiveExperimentParams() *ExperimentServiceUnarchiveExperimentParams { + return &ExperimentServiceUnarchiveExperimentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewExperimentServiceUnarchiveExperimentParamsWithTimeout creates a new ExperimentServiceUnarchiveExperimentParams object +// with the ability to set a timeout on a request. +func NewExperimentServiceUnarchiveExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceUnarchiveExperimentParams { + return &ExperimentServiceUnarchiveExperimentParams{ + timeout: timeout, + } +} + +// NewExperimentServiceUnarchiveExperimentParamsWithContext creates a new ExperimentServiceUnarchiveExperimentParams object +// with the ability to set a context for a request. +func NewExperimentServiceUnarchiveExperimentParamsWithContext(ctx context.Context) *ExperimentServiceUnarchiveExperimentParams { + return &ExperimentServiceUnarchiveExperimentParams{ + Context: ctx, + } +} + +// NewExperimentServiceUnarchiveExperimentParamsWithHTTPClient creates a new ExperimentServiceUnarchiveExperimentParams object +// with the ability to set a custom HTTPClient for a request. +func NewExperimentServiceUnarchiveExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceUnarchiveExperimentParams { + return &ExperimentServiceUnarchiveExperimentParams{ + HTTPClient: client, + } +} + +/* +ExperimentServiceUnarchiveExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service unarchive experiment operation. + + Typically these are written to a http.Request. +*/ +type ExperimentServiceUnarchiveExperimentParams struct { + + /* ID. + + The ID of the experiment to be restored. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the experiment service unarchive experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceUnarchiveExperimentParams) WithDefaults() *ExperimentServiceUnarchiveExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service unarchive experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceUnarchiveExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the experiment service unarchive experiment params +func (o *ExperimentServiceUnarchiveExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceUnarchiveExperimentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the experiment service unarchive experiment params +func (o *ExperimentServiceUnarchiveExperimentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the experiment service unarchive experiment params +func (o *ExperimentServiceUnarchiveExperimentParams) WithContext(ctx context.Context) *ExperimentServiceUnarchiveExperimentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the experiment service unarchive experiment params +func (o *ExperimentServiceUnarchiveExperimentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the experiment service unarchive experiment params +func (o *ExperimentServiceUnarchiveExperimentParams) WithHTTPClient(client *http.Client) *ExperimentServiceUnarchiveExperimentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the experiment service unarchive experiment params +func (o *ExperimentServiceUnarchiveExperimentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the experiment service unarchive experiment params +func (o *ExperimentServiceUnarchiveExperimentParams) WithID(id string) *ExperimentServiceUnarchiveExperimentParams { + o.SetID(id) + return o +} + +// SetID adds the id to the experiment service unarchive experiment params +func (o *ExperimentServiceUnarchiveExperimentParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *ExperimentServiceUnarchiveExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_responses.go new file mode 100644 index 0000000000..a0c5d83964 --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" +) + +// ExperimentServiceUnarchiveExperimentReader is a Reader for the ExperimentServiceUnarchiveExperiment structure. +type ExperimentServiceUnarchiveExperimentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ExperimentServiceUnarchiveExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewExperimentServiceUnarchiveExperimentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewExperimentServiceUnarchiveExperimentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewExperimentServiceUnarchiveExperimentOK creates a ExperimentServiceUnarchiveExperimentOK with default headers values +func NewExperimentServiceUnarchiveExperimentOK() *ExperimentServiceUnarchiveExperimentOK { + return &ExperimentServiceUnarchiveExperimentOK{} +} + +/* +ExperimentServiceUnarchiveExperimentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ExperimentServiceUnarchiveExperimentOK struct { + Payload interface{} +} + +// IsSuccess returns true when this experiment service unarchive experiment o k response has a 2xx status code +func (o *ExperimentServiceUnarchiveExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service unarchive experiment o k response has a 3xx status code +func (o *ExperimentServiceUnarchiveExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service unarchive experiment o k response has a 4xx status code +func (o *ExperimentServiceUnarchiveExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service unarchive experiment o k response has a 5xx status code +func (o *ExperimentServiceUnarchiveExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service unarchive experiment o k response a status code equal to that given +func (o *ExperimentServiceUnarchiveExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service unarchive experiment o k response +func (o *ExperimentServiceUnarchiveExperimentOK) Code() int { + return 200 +} + +func (o *ExperimentServiceUnarchiveExperimentOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/experiments/{id}:unarchive][%d] experimentServiceUnarchiveExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceUnarchiveExperimentOK) String() string { + return fmt.Sprintf("[POST /apis/v1/experiments/{id}:unarchive][%d] experimentServiceUnarchiveExperimentOK %+v", 200, o.Payload) +} + +func (o *ExperimentServiceUnarchiveExperimentOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ExperimentServiceUnarchiveExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewExperimentServiceUnarchiveExperimentDefault creates a ExperimentServiceUnarchiveExperimentDefault with default headers values +func NewExperimentServiceUnarchiveExperimentDefault(code int) *ExperimentServiceUnarchiveExperimentDefault { + return &ExperimentServiceUnarchiveExperimentDefault{ + _statusCode: code, + } +} + +/* +ExperimentServiceUnarchiveExperimentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ExperimentServiceUnarchiveExperimentDefault struct { + _statusCode int + + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service unarchive experiment default response has a 2xx status code +func (o *ExperimentServiceUnarchiveExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service unarchive experiment default response has a 3xx status code +func (o *ExperimentServiceUnarchiveExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service unarchive experiment default response has a 4xx status code +func (o *ExperimentServiceUnarchiveExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service unarchive experiment default response has a 5xx status code +func (o *ExperimentServiceUnarchiveExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service unarchive experiment default response a status code equal to that given +func (o *ExperimentServiceUnarchiveExperimentDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the experiment service unarchive experiment default response +func (o *ExperimentServiceUnarchiveExperimentDefault) Code() int { + return o._statusCode +} + +func (o *ExperimentServiceUnarchiveExperimentDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/experiments/{id}:unarchive][%d] ExperimentService_UnarchiveExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceUnarchiveExperimentDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/experiments/{id}:unarchive][%d] ExperimentService_UnarchiveExperiment default %+v", o._statusCode, o.Payload) +} + +func (o *ExperimentServiceUnarchiveExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload +} + +func (o *ExperimentServiceUnarchiveExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(experiment_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/get_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/get_experiment_parameters.go deleted file mode 100644 index 9bacdf41c8..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/get_experiment_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetExperimentParams creates a new GetExperimentParams object -// with the default values initialized. -func NewGetExperimentParams() *GetExperimentParams { - var () - return &GetExperimentParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetExperimentParamsWithTimeout creates a new GetExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetExperimentParamsWithTimeout(timeout time.Duration) *GetExperimentParams { - var () - return &GetExperimentParams{ - - timeout: timeout, - } -} - -// NewGetExperimentParamsWithContext creates a new GetExperimentParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetExperimentParamsWithContext(ctx context.Context) *GetExperimentParams { - var () - return &GetExperimentParams{ - - Context: ctx, - } -} - -// NewGetExperimentParamsWithHTTPClient creates a new GetExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetExperimentParamsWithHTTPClient(client *http.Client) *GetExperimentParams { - var () - return &GetExperimentParams{ - HTTPClient: client, - } -} - -/*GetExperimentParams contains all the parameters to send to the API endpoint -for the get experiment operation typically these are written to a http.Request -*/ -type GetExperimentParams struct { - - /*ID - The ID of the experiment to be retrieved. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get experiment params -func (o *GetExperimentParams) WithTimeout(timeout time.Duration) *GetExperimentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get experiment params -func (o *GetExperimentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get experiment params -func (o *GetExperimentParams) WithContext(ctx context.Context) *GetExperimentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get experiment params -func (o *GetExperimentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get experiment params -func (o *GetExperimentParams) WithHTTPClient(client *http.Client) *GetExperimentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get experiment params -func (o *GetExperimentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get experiment params -func (o *GetExperimentParams) WithID(id string) *GetExperimentParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get experiment params -func (o *GetExperimentParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/get_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/get_experiment_responses.go deleted file mode 100644 index 82e57f33f1..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/get_experiment_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" -) - -// GetExperimentReader is a Reader for the GetExperiment structure. -type GetExperimentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewGetExperimentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewGetExperimentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetExperimentOK creates a GetExperimentOK with default headers values -func NewGetExperimentOK() *GetExperimentOK { - return &GetExperimentOK{} -} - -/*GetExperimentOK handles this case with default header values. - -A successful response. -*/ -type GetExperimentOK struct { - Payload *experiment_model.V1Experiment -} - -func (o *GetExperimentOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/experiments/{id}][%d] getExperimentOK %+v", 200, o.Payload) -} - -func (o *GetExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(experiment_model.V1Experiment) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetExperimentDefault creates a GetExperimentDefault with default headers values -func NewGetExperimentDefault(code int) *GetExperimentDefault { - return &GetExperimentDefault{ - _statusCode: code, - } -} - -/*GetExperimentDefault handles this case with default header values. - -GetExperimentDefault get experiment default -*/ -type GetExperimentDefault struct { - _statusCode int - - Payload *experiment_model.V1Status -} - -// Code gets the status code for the get experiment default response -func (o *GetExperimentDefault) Code() int { - return o._statusCode -} - -func (o *GetExperimentDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/experiments/{id}][%d] GetExperiment default %+v", o._statusCode, o.Payload) -} - -func (o *GetExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(experiment_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/list_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/list_experiment_parameters.go deleted file mode 100644 index 06629f3705..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/list_experiment_parameters.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewListExperimentParams creates a new ListExperimentParams object -// with the default values initialized. -func NewListExperimentParams() *ListExperimentParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListExperimentParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - timeout: cr.DefaultTimeout, - } -} - -// NewListExperimentParamsWithTimeout creates a new ListExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewListExperimentParamsWithTimeout(timeout time.Duration) *ListExperimentParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListExperimentParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - timeout: timeout, - } -} - -// NewListExperimentParamsWithContext creates a new ListExperimentParams object -// with the default values initialized, and the ability to set a context for a request -func NewListExperimentParamsWithContext(ctx context.Context) *ListExperimentParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListExperimentParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - Context: ctx, - } -} - -// NewListExperimentParamsWithHTTPClient creates a new ListExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewListExperimentParamsWithHTTPClient(client *http.Client) *ListExperimentParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListExperimentParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - HTTPClient: client, - } -} - -/*ListExperimentParams contains all the parameters to send to the API endpoint -for the list experiment operation typically these are written to a http.Request -*/ -type ListExperimentParams struct { - - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). - - */ - Filter *string - /*PageSize - 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. - - */ - PageSize *int32 - /*PageToken - 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. - - */ - PageToken *string - /*ResourceReferenceKeyID - The ID of the resource that referred to. - - */ - ResourceReferenceKeyID *string - /*ResourceReferenceKeyType - The type of the resource that referred to. - - */ - ResourceReferenceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - Ascending by default. - - */ - SortBy *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the list experiment params -func (o *ListExperimentParams) WithTimeout(timeout time.Duration) *ListExperimentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list experiment params -func (o *ListExperimentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list experiment params -func (o *ListExperimentParams) WithContext(ctx context.Context) *ListExperimentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list experiment params -func (o *ListExperimentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list experiment params -func (o *ListExperimentParams) WithHTTPClient(client *http.Client) *ListExperimentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list experiment params -func (o *ListExperimentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFilter adds the filter to the list experiment params -func (o *ListExperimentParams) WithFilter(filter *string) *ListExperimentParams { - o.SetFilter(filter) - return o -} - -// SetFilter adds the filter to the list experiment params -func (o *ListExperimentParams) SetFilter(filter *string) { - o.Filter = filter -} - -// WithPageSize adds the pageSize to the list experiment params -func (o *ListExperimentParams) WithPageSize(pageSize *int32) *ListExperimentParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the list experiment params -func (o *ListExperimentParams) SetPageSize(pageSize *int32) { - o.PageSize = pageSize -} - -// WithPageToken adds the pageToken to the list experiment params -func (o *ListExperimentParams) WithPageToken(pageToken *string) *ListExperimentParams { - o.SetPageToken(pageToken) - return o -} - -// SetPageToken adds the pageToken to the list experiment params -func (o *ListExperimentParams) SetPageToken(pageToken *string) { - o.PageToken = pageToken -} - -// WithResourceReferenceKeyID adds the resourceReferenceKeyID to the list experiment params -func (o *ListExperimentParams) WithResourceReferenceKeyID(resourceReferenceKeyID *string) *ListExperimentParams { - o.SetResourceReferenceKeyID(resourceReferenceKeyID) - return o -} - -// SetResourceReferenceKeyID adds the resourceReferenceKeyId to the list experiment params -func (o *ListExperimentParams) SetResourceReferenceKeyID(resourceReferenceKeyID *string) { - o.ResourceReferenceKeyID = resourceReferenceKeyID -} - -// WithResourceReferenceKeyType adds the resourceReferenceKeyType to the list experiment params -func (o *ListExperimentParams) WithResourceReferenceKeyType(resourceReferenceKeyType *string) *ListExperimentParams { - o.SetResourceReferenceKeyType(resourceReferenceKeyType) - return o -} - -// SetResourceReferenceKeyType adds the resourceReferenceKeyType to the list experiment params -func (o *ListExperimentParams) SetResourceReferenceKeyType(resourceReferenceKeyType *string) { - o.ResourceReferenceKeyType = resourceReferenceKeyType -} - -// WithSortBy adds the sortBy to the list experiment params -func (o *ListExperimentParams) WithSortBy(sortBy *string) *ListExperimentParams { - o.SetSortBy(sortBy) - return o -} - -// SetSortBy adds the sortBy to the list experiment params -func (o *ListExperimentParams) SetSortBy(sortBy *string) { - o.SortBy = sortBy -} - -// WriteToRequest writes these params to a swagger request -func (o *ListExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Filter != nil { - - // query param filter - var qrFilter string - if o.Filter != nil { - qrFilter = *o.Filter - } - qFilter := qrFilter - if qFilter != "" { - if err := r.SetQueryParam("filter", qFilter); err != nil { - return err - } - } - - } - - if o.PageSize != nil { - - // query param page_size - var qrPageSize int32 - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt32(qrPageSize) - if qPageSize != "" { - if err := r.SetQueryParam("page_size", qPageSize); err != nil { - return err - } - } - - } - - if o.PageToken != nil { - - // query param page_token - var qrPageToken string - if o.PageToken != nil { - qrPageToken = *o.PageToken - } - qPageToken := qrPageToken - if qPageToken != "" { - if err := r.SetQueryParam("page_token", qPageToken); err != nil { - return err - } - } - - } - - if o.ResourceReferenceKeyID != nil { - - // query param resource_reference_key.id - var qrResourceReferenceKeyID string - if o.ResourceReferenceKeyID != nil { - qrResourceReferenceKeyID = *o.ResourceReferenceKeyID - } - qResourceReferenceKeyID := qrResourceReferenceKeyID - if qResourceReferenceKeyID != "" { - if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { - return err - } - } - - } - - if o.ResourceReferenceKeyType != nil { - - // query param resource_reference_key.type - var qrResourceReferenceKeyType string - if o.ResourceReferenceKeyType != nil { - qrResourceReferenceKeyType = *o.ResourceReferenceKeyType - } - qResourceReferenceKeyType := qrResourceReferenceKeyType - if qResourceReferenceKeyType != "" { - if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { - return err - } - } - - } - - if o.SortBy != nil { - - // query param sort_by - var qrSortBy string - if o.SortBy != nil { - qrSortBy = *o.SortBy - } - qSortBy := qrSortBy - if qSortBy != "" { - if err := r.SetQueryParam("sort_by", qSortBy); err != nil { - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/list_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/list_experiment_responses.go deleted file mode 100644 index 3c39c92be0..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/list_experiment_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" -) - -// ListExperimentReader is a Reader for the ListExperiment structure. -type ListExperimentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewListExperimentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewListExperimentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListExperimentOK creates a ListExperimentOK with default headers values -func NewListExperimentOK() *ListExperimentOK { - return &ListExperimentOK{} -} - -/*ListExperimentOK handles this case with default header values. - -A successful response. -*/ -type ListExperimentOK struct { - Payload *experiment_model.V1ListExperimentsResponse -} - -func (o *ListExperimentOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/experiments][%d] listExperimentOK %+v", 200, o.Payload) -} - -func (o *ListExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(experiment_model.V1ListExperimentsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListExperimentDefault creates a ListExperimentDefault with default headers values -func NewListExperimentDefault(code int) *ListExperimentDefault { - return &ListExperimentDefault{ - _statusCode: code, - } -} - -/*ListExperimentDefault handles this case with default header values. - -ListExperimentDefault list experiment default -*/ -type ListExperimentDefault struct { - _statusCode int - - Payload *experiment_model.V1Status -} - -// Code gets the status code for the list experiment default response -func (o *ListExperimentDefault) Code() int { - return o._statusCode -} - -func (o *ListExperimentDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/experiments][%d] ListExperiment default %+v", o._statusCode, o.Payload) -} - -func (o *ListExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(experiment_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/unarchive_experiment_parameters.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/unarchive_experiment_parameters.go deleted file mode 100644 index 1a21b98602..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/unarchive_experiment_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewUnarchiveExperimentParams creates a new UnarchiveExperimentParams object -// with the default values initialized. -func NewUnarchiveExperimentParams() *UnarchiveExperimentParams { - var () - return &UnarchiveExperimentParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewUnarchiveExperimentParamsWithTimeout creates a new UnarchiveExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewUnarchiveExperimentParamsWithTimeout(timeout time.Duration) *UnarchiveExperimentParams { - var () - return &UnarchiveExperimentParams{ - - timeout: timeout, - } -} - -// NewUnarchiveExperimentParamsWithContext creates a new UnarchiveExperimentParams object -// with the default values initialized, and the ability to set a context for a request -func NewUnarchiveExperimentParamsWithContext(ctx context.Context) *UnarchiveExperimentParams { - var () - return &UnarchiveExperimentParams{ - - Context: ctx, - } -} - -// NewUnarchiveExperimentParamsWithHTTPClient creates a new UnarchiveExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewUnarchiveExperimentParamsWithHTTPClient(client *http.Client) *UnarchiveExperimentParams { - var () - return &UnarchiveExperimentParams{ - HTTPClient: client, - } -} - -/*UnarchiveExperimentParams contains all the parameters to send to the API endpoint -for the unarchive experiment operation typically these are written to a http.Request -*/ -type UnarchiveExperimentParams struct { - - /*ID - The ID of the experiment to be restored. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the unarchive experiment params -func (o *UnarchiveExperimentParams) WithTimeout(timeout time.Duration) *UnarchiveExperimentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unarchive experiment params -func (o *UnarchiveExperimentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unarchive experiment params -func (o *UnarchiveExperimentParams) WithContext(ctx context.Context) *UnarchiveExperimentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unarchive experiment params -func (o *UnarchiveExperimentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unarchive experiment params -func (o *UnarchiveExperimentParams) WithHTTPClient(client *http.Client) *UnarchiveExperimentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unarchive experiment params -func (o *UnarchiveExperimentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the unarchive experiment params -func (o *UnarchiveExperimentParams) WithID(id string) *UnarchiveExperimentParams { - o.SetID(id) - return o -} - -// SetID adds the id to the unarchive experiment params -func (o *UnarchiveExperimentParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UnarchiveExperimentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_client/experiment_service/unarchive_experiment_responses.go b/backend/api/v1/go_http_client/experiment_client/experiment_service/unarchive_experiment_responses.go deleted file mode 100644 index 2a66c01a89..0000000000 --- a/backend/api/v1/go_http_client/experiment_client/experiment_service/unarchive_experiment_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/experiment_model" -) - -// UnarchiveExperimentReader is a Reader for the UnarchiveExperiment structure. -type UnarchiveExperimentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnarchiveExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewUnarchiveExperimentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewUnarchiveExperimentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUnarchiveExperimentOK creates a UnarchiveExperimentOK with default headers values -func NewUnarchiveExperimentOK() *UnarchiveExperimentOK { - return &UnarchiveExperimentOK{} -} - -/*UnarchiveExperimentOK handles this case with default header values. - -A successful response. -*/ -type UnarchiveExperimentOK struct { - Payload interface{} -} - -func (o *UnarchiveExperimentOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/experiments/{id}:unarchive][%d] unarchiveExperimentOK %+v", 200, o.Payload) -} - -func (o *UnarchiveExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUnarchiveExperimentDefault creates a UnarchiveExperimentDefault with default headers values -func NewUnarchiveExperimentDefault(code int) *UnarchiveExperimentDefault { - return &UnarchiveExperimentDefault{ - _statusCode: code, - } -} - -/*UnarchiveExperimentDefault handles this case with default header values. - -UnarchiveExperimentDefault unarchive experiment default -*/ -type UnarchiveExperimentDefault struct { - _statusCode int - - Payload *experiment_model.V1Status -} - -// Code gets the status code for the unarchive experiment default response -func (o *UnarchiveExperimentDefault) Code() int { - return o._statusCode -} - -func (o *UnarchiveExperimentDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/experiments/{id}:unarchive][%d] UnarchiveExperiment default %+v", o._statusCode, o.Payload) -} - -func (o *UnarchiveExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(experiment_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/experiment_model/googlerpc_status.go b/backend/api/v1/go_http_client/experiment_model/googlerpc_status.go new file mode 100644 index 0000000000..56eee6ae4d --- /dev/null +++ b/backend/api/v1/go_http_client/experiment_model/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_model/protobuf_any.go b/backend/api/v1/go_http_client/experiment_model/protobuf_any.go index 9d87904dec..ae44af882c 100644 --- a/backend/api/v1/go_http_client/experiment_model/protobuf_any.go +++ b/backend/api/v1/go_http_client/experiment_model/protobuf_any.go @@ -6,9 +6,9 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +20,45 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// 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 := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// 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 := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(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 @@ -66,34 +66,34 @@ import ( // 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; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@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" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -124,35 +124,16 @@ type ProtobufAny struct { // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` - - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + AtType string `json:"@type,omitempty"` } // Validate validates this protobuf any func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { - - if swag.IsZero(m.Value) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1/go_http_client/experiment_model/v1_experiment.go b/backend/api/v1/go_http_client/experiment_model/v1_experiment.go index bf9751e6b7..a38af26022 100644 --- a/backend/api/v1/go_http_client/experiment_model/v1_experiment.go +++ b/backend/api/v1/go_http_client/experiment_model/v1_experiment.go @@ -6,16 +6,17 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V1Experiment v1 experiment +// // swagger:model v1Experiment type V1Experiment struct { @@ -37,7 +38,7 @@ type V1Experiment struct { ResourceReferences []*V1ResourceReference `json:"resource_references"` // Output. Specifies whether this experiment is in archived or available state. - StorageState V1ExperimentStorageState `json:"storage_state,omitempty"` + StorageState *V1ExperimentStorageState `json:"storage_state,omitempty"` } // Validate validates this v1 experiment @@ -63,7 +64,6 @@ func (m *V1Experiment) Validate(formats strfmt.Registry) error { } func (m *V1Experiment) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -76,7 +76,6 @@ func (m *V1Experiment) validateCreatedAt(formats strfmt.Registry) error { } func (m *V1Experiment) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -90,6 +89,8 @@ func (m *V1Experiment) validateResourceReferences(formats strfmt.Registry) error if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } @@ -101,16 +102,73 @@ func (m *V1Experiment) validateResourceReferences(formats strfmt.Registry) error } func (m *V1Experiment) validateStorageState(formats strfmt.Registry) error { - if swag.IsZero(m.StorageState) { // not required return nil } - if err := m.StorageState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storage_state") + if m.StorageState != nil { + if err := m.StorageState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 experiment based on the context it is used +func (m *V1Experiment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStorageState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Experiment) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Experiment) contextValidateStorageState(ctx context.Context, formats strfmt.Registry) error { + + if m.StorageState != nil { + if err := m.StorageState.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/experiment_model/v1_experiment_storage_state.go b/backend/api/v1/go_http_client/experiment_model/v1_experiment_storage_state.go index edcba33219..a232c5f558 100644 --- a/backend/api/v1/go_http_client/experiment_model/v1_experiment_storage_state.go +++ b/backend/api/v1/go_http_client/experiment_model/v1_experiment_storage_state.go @@ -6,18 +6,28 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1ExperimentStorageState v1 experiment storage state +// // swagger:model v1ExperimentStorageState type V1ExperimentStorageState string +func NewV1ExperimentStorageState(value V1ExperimentStorageState) *V1ExperimentStorageState { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1ExperimentStorageState. +func (m V1ExperimentStorageState) Pointer() *V1ExperimentStorageState { + return &m +} + const ( // V1ExperimentStorageStateSTORAGESTATEUNSPECIFIED captures enum value "STORAGESTATE_UNSPECIFIED" @@ -44,7 +54,7 @@ func init() { } func (m V1ExperimentStorageState) validateV1ExperimentStorageStateEnum(path, location string, value V1ExperimentStorageState) error { - if err := validate.Enum(path, location, value, v1ExperimentStorageStateEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1ExperimentStorageStateEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m V1ExperimentStorageState) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 experiment storage state based on context it is used +func (m V1ExperimentStorageState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_model/v1_list_experiments_response.go b/backend/api/v1/go_http_client/experiment_model/v1_list_experiments_response.go index c4fd864542..0323dcb5c1 100644 --- a/backend/api/v1/go_http_client/experiment_model/v1_list_experiments_response.go +++ b/backend/api/v1/go_http_client/experiment_model/v1_list_experiments_response.go @@ -6,15 +6,16 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ListExperimentsResponse v1 list experiments response +// // swagger:model v1ListExperimentsResponse type V1ListExperimentsResponse struct { @@ -43,7 +44,6 @@ func (m *V1ListExperimentsResponse) Validate(formats strfmt.Registry) error { } func (m *V1ListExperimentsResponse) validateExperiments(formats strfmt.Registry) error { - if swag.IsZero(m.Experiments) { // not required return nil } @@ -57,6 +57,42 @@ func (m *V1ListExperimentsResponse) validateExperiments(formats strfmt.Registry) if err := m.Experiments[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("experiments" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("experiments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 list experiments response based on the context it is used +func (m *V1ListExperimentsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateExperiments(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListExperimentsResponse) contextValidateExperiments(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Experiments); i++ { + + if m.Experiments[i] != nil { + if err := m.Experiments[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("experiments" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("experiments" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1/go_http_client/experiment_model/v1_relationship.go b/backend/api/v1/go_http_client/experiment_model/v1_relationship.go index db28f7270d..8ac112afea 100644 --- a/backend/api/v1/go_http_client/experiment_model/v1_relationship.go +++ b/backend/api/v1/go_http_client/experiment_model/v1_relationship.go @@ -6,18 +6,28 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1Relationship v1 relationship +// // swagger:model v1Relationship type V1Relationship string +func NewV1Relationship(value V1Relationship) *V1Relationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1Relationship. +func (m V1Relationship) Pointer() *V1Relationship { + return &m +} + const ( // V1RelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m V1Relationship) validateV1RelationshipEnum(path, location string, value V1Relationship) error { - if err := validate.Enum(path, location, value, v1RelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1RelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m V1Relationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 relationship based on context it is used +func (m V1Relationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_model/v1_resource_key.go b/backend/api/v1/go_http_client/experiment_model/v1_resource_key.go index 859ec66a47..4c15db1d06 100644 --- a/backend/api/v1/go_http_client/experiment_model/v1_resource_key.go +++ b/backend/api/v1/go_http_client/experiment_model/v1_resource_key.go @@ -6,13 +6,15 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceKey v1 resource key +// // swagger:model v1ResourceKey type V1ResourceKey struct { @@ -20,7 +22,7 @@ type V1ResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type V1ResourceType `json:"type,omitempty"` + Type *V1ResourceType `json:"type,omitempty"` } // Validate validates this v1 resource key @@ -38,16 +40,49 @@ func (m *V1ResourceKey) Validate(formats strfmt.Registry) error { } func (m *V1ResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource key based on the context it is used +func (m *V1ResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/experiment_model/v1_resource_reference.go b/backend/api/v1/go_http_client/experiment_model/v1_resource_reference.go index 2ea26a3464..487621d032 100644 --- a/backend/api/v1/go_http_client/experiment_model/v1_resource_reference.go +++ b/backend/api/v1/go_http_client/experiment_model/v1_resource_reference.go @@ -6,13 +6,15 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceReference v1 resource reference +// // swagger:model v1ResourceReference type V1ResourceReference struct { @@ -23,7 +25,7 @@ type V1ResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship V1Relationship `json:"relationship,omitempty"` + Relationship *V1Relationship `json:"relationship,omitempty"` } // Validate validates this v1 resource reference @@ -45,7 +47,6 @@ func (m *V1ResourceReference) Validate(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,69 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource reference based on the context it is used +func (m *V1ResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *V1ResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/experiment_model/v1_resource_type.go b/backend/api/v1/go_http_client/experiment_model/v1_resource_type.go index 799d8b61ba..548db29a74 100644 --- a/backend/api/v1/go_http_client/experiment_model/v1_resource_type.go +++ b/backend/api/v1/go_http_client/experiment_model/v1_resource_type.go @@ -6,18 +6,28 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1ResourceType v1 resource type +// // swagger:model v1ResourceType type V1ResourceType string +func NewV1ResourceType(value V1ResourceType) *V1ResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1ResourceType. +func (m V1ResourceType) Pointer() *V1ResourceType { + return &m +} + const ( // V1ResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m V1ResourceType) validateV1ResourceTypeEnum(path, location string, value V1ResourceType) error { - if err := validate.Enum(path, location, value, v1ResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1ResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m V1ResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 resource type based on context it is used +func (m V1ResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/experiment_model/v1_status.go b/backend/api/v1/go_http_client/experiment_model/v1_status.go deleted file mode 100644 index df1f93ae62..0000000000 --- a/backend/api/v1/go_http_client/experiment_model/v1_status.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// V1Status v1 status -// swagger:model v1Status -type V1Status struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` -} - -// Validate validates this v1 status -func (m *V1Status) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1Status) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1Status) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1Status) UnmarshalBinary(b []byte) error { - var res V1Status - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1/go_http_client/healthz_client/healthz_client.go b/backend/api/v1/go_http_client/healthz_client/healthz_client.go index 4a7425e53e..baddc921d9 100644 --- a/backend/api/v1/go_http_client/healthz_client/healthz_client.go +++ b/backend/api/v1/go_http_client/healthz_client/healthz_client.go @@ -8,8 +8,7 @@ package healthz_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/healthz_client/healthz_service" ) @@ -27,7 +26,7 @@ const ( ) // DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http", "https"} +var DefaultSchemes = []string{"http"} // NewHTTPClient creates a new healthz HTTP client. func NewHTTPClient(formats strfmt.Registry) *Healthz { @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Healthz { cli := new(Healthz) cli.Transport = transport - cli.HealthzService = healthz_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Healthz is a client for healthz type Healthz struct { - HealthzService *healthz_service.Client + HealthzService healthz_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Healthz struct { // SetTransport changes the transport on the client and all its subresources func (c *Healthz) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.HealthzService.SetTransport(transport) - } diff --git a/backend/api/v1/go_http_client/healthz_client/healthz_service/get_healthz_parameters.go b/backend/api/v1/go_http_client/healthz_client/healthz_service/get_healthz_parameters.go deleted file mode 100644 index b03e4c1c45..0000000000 --- a/backend/api/v1/go_http_client/healthz_client/healthz_service/get_healthz_parameters.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package healthz_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetHealthzParams creates a new GetHealthzParams object -// with the default values initialized. -func NewGetHealthzParams() *GetHealthzParams { - - return &GetHealthzParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetHealthzParamsWithTimeout creates a new GetHealthzParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetHealthzParamsWithTimeout(timeout time.Duration) *GetHealthzParams { - - return &GetHealthzParams{ - - timeout: timeout, - } -} - -// NewGetHealthzParamsWithContext creates a new GetHealthzParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetHealthzParamsWithContext(ctx context.Context) *GetHealthzParams { - - return &GetHealthzParams{ - - Context: ctx, - } -} - -// NewGetHealthzParamsWithHTTPClient creates a new GetHealthzParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetHealthzParamsWithHTTPClient(client *http.Client) *GetHealthzParams { - - return &GetHealthzParams{ - HTTPClient: client, - } -} - -/*GetHealthzParams contains all the parameters to send to the API endpoint -for the get healthz operation typically these are written to a http.Request -*/ -type GetHealthzParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get healthz params -func (o *GetHealthzParams) WithTimeout(timeout time.Duration) *GetHealthzParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get healthz params -func (o *GetHealthzParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get healthz params -func (o *GetHealthzParams) WithContext(ctx context.Context) *GetHealthzParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get healthz params -func (o *GetHealthzParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get healthz params -func (o *GetHealthzParams) WithHTTPClient(client *http.Client) *GetHealthzParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get healthz params -func (o *GetHealthzParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetHealthzParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/healthz_client/healthz_service/get_healthz_responses.go b/backend/api/v1/go_http_client/healthz_client/healthz_service/get_healthz_responses.go deleted file mode 100644 index e75347a275..0000000000 --- a/backend/api/v1/go_http_client/healthz_client/healthz_service/get_healthz_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package healthz_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - healthz_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/healthz_model" -) - -// GetHealthzReader is a Reader for the GetHealthz structure. -type GetHealthzReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetHealthzReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewGetHealthzOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewGetHealthzDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetHealthzOK creates a GetHealthzOK with default headers values -func NewGetHealthzOK() *GetHealthzOK { - return &GetHealthzOK{} -} - -/*GetHealthzOK handles this case with default header values. - -A successful response. -*/ -type GetHealthzOK struct { - Payload *healthz_model.V1GetHealthzResponse -} - -func (o *GetHealthzOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/healthz][%d] getHealthzOK %+v", 200, o.Payload) -} - -func (o *GetHealthzOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(healthz_model.V1GetHealthzResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetHealthzDefault creates a GetHealthzDefault with default headers values -func NewGetHealthzDefault(code int) *GetHealthzDefault { - return &GetHealthzDefault{ - _statusCode: code, - } -} - -/*GetHealthzDefault handles this case with default header values. - -GetHealthzDefault get healthz default -*/ -type GetHealthzDefault struct { - _statusCode int - - Payload *healthz_model.V1Status -} - -// Code gets the status code for the get healthz default response -func (o *GetHealthzDefault) Code() int { - return o._statusCode -} - -func (o *GetHealthzDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/healthz][%d] GetHealthz default %+v", o._statusCode, o.Payload) -} - -func (o *GetHealthzDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(healthz_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_client.go b/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_client.go index f7d3c77c3b..3e00f76e9e 100644 --- a/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_client.go +++ b/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_client.go @@ -7,12 +7,11 @@ package healthz_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) // New creates a new healthz service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -24,33 +23,52 @@ type Client struct { formats strfmt.Registry } +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HealthzServiceGetHealthzOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -GetHealthz gets healthz data +HealthzServiceGetHealthz gets healthz data */ -func (a *Client) GetHealthz(params *GetHealthzParams, authInfo runtime.ClientAuthInfoWriter) (*GetHealthzOK, error) { +func (a *Client) HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HealthzServiceGetHealthzOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewGetHealthzParams() + params = NewHealthzServiceGetHealthzParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetHealthz", + op := &runtime.ClientOperation{ + ID: "HealthzService_GetHealthz", Method: "GET", PathPattern: "/apis/v1/healthz", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &GetHealthzReader{formats: a.formats}, + Reader: &HealthzServiceGetHealthzReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*GetHealthzOK), nil - + success, ok := result.(*HealthzServiceGetHealthzOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*HealthzServiceGetHealthzDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go b/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go new file mode 100644 index 0000000000..4cb71a4238 --- /dev/null +++ b/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package healthz_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewHealthzServiceGetHealthzParams creates a new HealthzServiceGetHealthzParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewHealthzServiceGetHealthzParams() *HealthzServiceGetHealthzParams { + return &HealthzServiceGetHealthzParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewHealthzServiceGetHealthzParamsWithTimeout creates a new HealthzServiceGetHealthzParams object +// with the ability to set a timeout on a request. +func NewHealthzServiceGetHealthzParamsWithTimeout(timeout time.Duration) *HealthzServiceGetHealthzParams { + return &HealthzServiceGetHealthzParams{ + timeout: timeout, + } +} + +// NewHealthzServiceGetHealthzParamsWithContext creates a new HealthzServiceGetHealthzParams object +// with the ability to set a context for a request. +func NewHealthzServiceGetHealthzParamsWithContext(ctx context.Context) *HealthzServiceGetHealthzParams { + return &HealthzServiceGetHealthzParams{ + Context: ctx, + } +} + +// NewHealthzServiceGetHealthzParamsWithHTTPClient creates a new HealthzServiceGetHealthzParams object +// with the ability to set a custom HTTPClient for a request. +func NewHealthzServiceGetHealthzParamsWithHTTPClient(client *http.Client) *HealthzServiceGetHealthzParams { + return &HealthzServiceGetHealthzParams{ + HTTPClient: client, + } +} + +/* +HealthzServiceGetHealthzParams contains all the parameters to send to the API endpoint + + for the healthz service get healthz operation. + + Typically these are written to a http.Request. +*/ +type HealthzServiceGetHealthzParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the healthz service get healthz params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *HealthzServiceGetHealthzParams) WithDefaults() *HealthzServiceGetHealthzParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the healthz service get healthz params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *HealthzServiceGetHealthzParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the healthz service get healthz params +func (o *HealthzServiceGetHealthzParams) WithTimeout(timeout time.Duration) *HealthzServiceGetHealthzParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the healthz service get healthz params +func (o *HealthzServiceGetHealthzParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the healthz service get healthz params +func (o *HealthzServiceGetHealthzParams) WithContext(ctx context.Context) *HealthzServiceGetHealthzParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the healthz service get healthz params +func (o *HealthzServiceGetHealthzParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the healthz service get healthz params +func (o *HealthzServiceGetHealthzParams) WithHTTPClient(client *http.Client) *HealthzServiceGetHealthzParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the healthz service get healthz params +func (o *HealthzServiceGetHealthzParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *HealthzServiceGetHealthzParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go b/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go new file mode 100644 index 0000000000..c77efbe9fa --- /dev/null +++ b/backend/api/v1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package healthz_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/healthz_model" +) + +// HealthzServiceGetHealthzReader is a Reader for the HealthzServiceGetHealthz structure. +type HealthzServiceGetHealthzReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *HealthzServiceGetHealthzReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewHealthzServiceGetHealthzOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewHealthzServiceGetHealthzDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewHealthzServiceGetHealthzOK creates a HealthzServiceGetHealthzOK with default headers values +func NewHealthzServiceGetHealthzOK() *HealthzServiceGetHealthzOK { + return &HealthzServiceGetHealthzOK{} +} + +/* +HealthzServiceGetHealthzOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type HealthzServiceGetHealthzOK struct { + Payload *healthz_model.V1GetHealthzResponse +} + +// IsSuccess returns true when this healthz service get healthz o k response has a 2xx status code +func (o *HealthzServiceGetHealthzOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this healthz service get healthz o k response has a 3xx status code +func (o *HealthzServiceGetHealthzOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this healthz service get healthz o k response has a 4xx status code +func (o *HealthzServiceGetHealthzOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this healthz service get healthz o k response has a 5xx status code +func (o *HealthzServiceGetHealthzOK) IsServerError() bool { + return false +} + +// IsCode returns true when this healthz service get healthz o k response a status code equal to that given +func (o *HealthzServiceGetHealthzOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the healthz service get healthz o k response +func (o *HealthzServiceGetHealthzOK) Code() int { + return 200 +} + +func (o *HealthzServiceGetHealthzOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/healthz][%d] healthzServiceGetHealthzOK %+v", 200, o.Payload) +} + +func (o *HealthzServiceGetHealthzOK) String() string { + return fmt.Sprintf("[GET /apis/v1/healthz][%d] healthzServiceGetHealthzOK %+v", 200, o.Payload) +} + +func (o *HealthzServiceGetHealthzOK) GetPayload() *healthz_model.V1GetHealthzResponse { + return o.Payload +} + +func (o *HealthzServiceGetHealthzOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(healthz_model.V1GetHealthzResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewHealthzServiceGetHealthzDefault creates a HealthzServiceGetHealthzDefault with default headers values +func NewHealthzServiceGetHealthzDefault(code int) *HealthzServiceGetHealthzDefault { + return &HealthzServiceGetHealthzDefault{ + _statusCode: code, + } +} + +/* +HealthzServiceGetHealthzDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type HealthzServiceGetHealthzDefault struct { + _statusCode int + + Payload *healthz_model.GooglerpcStatus +} + +// IsSuccess returns true when this healthz service get healthz default response has a 2xx status code +func (o *HealthzServiceGetHealthzDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this healthz service get healthz default response has a 3xx status code +func (o *HealthzServiceGetHealthzDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this healthz service get healthz default response has a 4xx status code +func (o *HealthzServiceGetHealthzDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this healthz service get healthz default response has a 5xx status code +func (o *HealthzServiceGetHealthzDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this healthz service get healthz default response a status code equal to that given +func (o *HealthzServiceGetHealthzDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the healthz service get healthz default response +func (o *HealthzServiceGetHealthzDefault) Code() int { + return o._statusCode +} + +func (o *HealthzServiceGetHealthzDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/healthz][%d] HealthzService_GetHealthz default %+v", o._statusCode, o.Payload) +} + +func (o *HealthzServiceGetHealthzDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/healthz][%d] HealthzService_GetHealthz default %+v", o._statusCode, o.Payload) +} + +func (o *HealthzServiceGetHealthzDefault) GetPayload() *healthz_model.GooglerpcStatus { + return o.Payload +} + +func (o *HealthzServiceGetHealthzDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(healthz_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/healthz_model/googlerpc_status.go b/backend/api/v1/go_http_client/healthz_model/googlerpc_status.go new file mode 100644 index 0000000000..e1aeaae395 --- /dev/null +++ b/backend/api/v1/go_http_client/healthz_model/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package healthz_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1/go_http_client/healthz_model/protobuf_any.go b/backend/api/v1/go_http_client/healthz_model/protobuf_any.go index 52a0e70e64..fdf3156874 100644 --- a/backend/api/v1/go_http_client/healthz_model/protobuf_any.go +++ b/backend/api/v1/go_http_client/healthz_model/protobuf_any.go @@ -6,9 +6,9 @@ package healthz_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +20,45 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// 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 := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// 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 := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(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 @@ -66,34 +66,34 @@ import ( // 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; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@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" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -124,35 +124,16 @@ type ProtobufAny struct { // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` - - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + AtType string `json:"@type,omitempty"` } // Validate validates this protobuf any func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { - - if swag.IsZero(m.Value) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1/go_http_client/healthz_model/v1_get_healthz_response.go b/backend/api/v1/go_http_client/healthz_model/v1_get_healthz_response.go index 2d66af3730..91cdb75a8e 100644 --- a/backend/api/v1/go_http_client/healthz_model/v1_get_healthz_response.go +++ b/backend/api/v1/go_http_client/healthz_model/v1_get_healthz_response.go @@ -6,12 +6,14 @@ package healthz_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1GetHealthzResponse v1 get healthz response +// // swagger:model v1GetHealthzResponse type V1GetHealthzResponse struct { @@ -24,6 +26,11 @@ func (m *V1GetHealthzResponse) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 get healthz response based on context it is used +func (m *V1GetHealthzResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1GetHealthzResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/healthz_model/v1_status.go b/backend/api/v1/go_http_client/healthz_model/v1_status.go deleted file mode 100644 index 06ae49cbf7..0000000000 --- a/backend/api/v1/go_http_client/healthz_model/v1_status.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package healthz_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// V1Status v1 status -// swagger:model v1Status -type V1Status struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` -} - -// Validate validates this v1 status -func (m *V1Status) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1Status) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1Status) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1Status) UnmarshalBinary(b []byte) error { - var res V1Status - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_client.go b/backend/api/v1/go_http_client/job_client/job_client.go index 663609a44f..88c589d8f6 100644 --- a/backend/api/v1/go_http_client/job_client/job_client.go +++ b/backend/api/v1/go_http_client/job_client/job_client.go @@ -8,8 +8,7 @@ package job_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_client/job_service" ) @@ -27,7 +26,7 @@ const ( ) // DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http", "https"} +var DefaultSchemes = []string{"http"} // NewHTTPClient creates a new job HTTP client. func NewHTTPClient(formats strfmt.Registry) *Job { @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Job { cli := new(Job) cli.Transport = transport - cli.JobService = job_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Job is a client for job type Job struct { - JobService *job_service.Client + JobService job_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Job struct { // SetTransport changes the transport on the client and all its subresources func (c *Job) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.JobService.SetTransport(transport) - } diff --git a/backend/api/v1/go_http_client/job_client/job_service/create_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/create_job_parameters.go deleted file mode 100644 index 20a2b1f66b..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/create_job_parameters.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" -) - -// NewCreateJobParams creates a new CreateJobParams object -// with the default values initialized. -func NewCreateJobParams() *CreateJobParams { - var () - return &CreateJobParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewCreateJobParamsWithTimeout creates a new CreateJobParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewCreateJobParamsWithTimeout(timeout time.Duration) *CreateJobParams { - var () - return &CreateJobParams{ - - timeout: timeout, - } -} - -// NewCreateJobParamsWithContext creates a new CreateJobParams object -// with the default values initialized, and the ability to set a context for a request -func NewCreateJobParamsWithContext(ctx context.Context) *CreateJobParams { - var () - return &CreateJobParams{ - - Context: ctx, - } -} - -// NewCreateJobParamsWithHTTPClient creates a new CreateJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewCreateJobParamsWithHTTPClient(client *http.Client) *CreateJobParams { - var () - return &CreateJobParams{ - HTTPClient: client, - } -} - -/*CreateJobParams contains all the parameters to send to the API endpoint -for the create job operation typically these are written to a http.Request -*/ -type CreateJobParams struct { - - /*Body - The job to be created - - */ - Body *job_model.V1Job - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the create job params -func (o *CreateJobParams) WithTimeout(timeout time.Duration) *CreateJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create job params -func (o *CreateJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create job params -func (o *CreateJobParams) WithContext(ctx context.Context) *CreateJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create job params -func (o *CreateJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create job params -func (o *CreateJobParams) WithHTTPClient(client *http.Client) *CreateJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create job params -func (o *CreateJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create job params -func (o *CreateJobParams) WithBody(body *job_model.V1Job) *CreateJobParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create job params -func (o *CreateJobParams) SetBody(body *job_model.V1Job) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/create_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/create_job_responses.go deleted file mode 100644 index a88107f0fd..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/create_job_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" -) - -// CreateJobReader is a Reader for the CreateJob structure. -type CreateJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewCreateJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewCreateJobDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreateJobOK creates a CreateJobOK with default headers values -func NewCreateJobOK() *CreateJobOK { - return &CreateJobOK{} -} - -/*CreateJobOK handles this case with default header values. - -A successful response. -*/ -type CreateJobOK struct { - Payload *job_model.V1Job -} - -func (o *CreateJobOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/jobs][%d] createJobOK %+v", 200, o.Payload) -} - -func (o *CreateJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(job_model.V1Job) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateJobDefault creates a CreateJobDefault with default headers values -func NewCreateJobDefault(code int) *CreateJobDefault { - return &CreateJobDefault{ - _statusCode: code, - } -} - -/*CreateJobDefault handles this case with default header values. - -CreateJobDefault create job default -*/ -type CreateJobDefault struct { - _statusCode int - - Payload *job_model.V1Status -} - -// Code gets the status code for the create job default response -func (o *CreateJobDefault) Code() int { - return o._statusCode -} - -func (o *CreateJobDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/jobs][%d] CreateJob default %+v", o._statusCode, o.Payload) -} - -func (o *CreateJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(job_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/delete_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/delete_job_parameters.go deleted file mode 100644 index c68b144fab..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/delete_job_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDeleteJobParams creates a new DeleteJobParams object -// with the default values initialized. -func NewDeleteJobParams() *DeleteJobParams { - var () - return &DeleteJobParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteJobParamsWithTimeout creates a new DeleteJobParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDeleteJobParamsWithTimeout(timeout time.Duration) *DeleteJobParams { - var () - return &DeleteJobParams{ - - timeout: timeout, - } -} - -// NewDeleteJobParamsWithContext creates a new DeleteJobParams object -// with the default values initialized, and the ability to set a context for a request -func NewDeleteJobParamsWithContext(ctx context.Context) *DeleteJobParams { - var () - return &DeleteJobParams{ - - Context: ctx, - } -} - -// NewDeleteJobParamsWithHTTPClient creates a new DeleteJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDeleteJobParamsWithHTTPClient(client *http.Client) *DeleteJobParams { - var () - return &DeleteJobParams{ - HTTPClient: client, - } -} - -/*DeleteJobParams contains all the parameters to send to the API endpoint -for the delete job operation typically these are written to a http.Request -*/ -type DeleteJobParams struct { - - /*ID - The ID of the job to be deleted - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the delete job params -func (o *DeleteJobParams) WithTimeout(timeout time.Duration) *DeleteJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete job params -func (o *DeleteJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete job params -func (o *DeleteJobParams) WithContext(ctx context.Context) *DeleteJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete job params -func (o *DeleteJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete job params -func (o *DeleteJobParams) WithHTTPClient(client *http.Client) *DeleteJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete job params -func (o *DeleteJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete job params -func (o *DeleteJobParams) WithID(id string) *DeleteJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete job params -func (o *DeleteJobParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/delete_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/delete_job_responses.go deleted file mode 100644 index c5faeb9ed9..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/delete_job_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" -) - -// DeleteJobReader is a Reader for the DeleteJob structure. -type DeleteJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewDeleteJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewDeleteJobDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDeleteJobOK creates a DeleteJobOK with default headers values -func NewDeleteJobOK() *DeleteJobOK { - return &DeleteJobOK{} -} - -/*DeleteJobOK handles this case with default header values. - -A successful response. -*/ -type DeleteJobOK struct { - Payload interface{} -} - -func (o *DeleteJobOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/jobs/{id}][%d] deleteJobOK %+v", 200, o.Payload) -} - -func (o *DeleteJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteJobDefault creates a DeleteJobDefault with default headers values -func NewDeleteJobDefault(code int) *DeleteJobDefault { - return &DeleteJobDefault{ - _statusCode: code, - } -} - -/*DeleteJobDefault handles this case with default header values. - -DeleteJobDefault delete job default -*/ -type DeleteJobDefault struct { - _statusCode int - - Payload *job_model.V1Status -} - -// Code gets the status code for the delete job default response -func (o *DeleteJobDefault) Code() int { - return o._statusCode -} - -func (o *DeleteJobDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/jobs/{id}][%d] DeleteJob default %+v", o._statusCode, o.Payload) -} - -func (o *DeleteJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(job_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/disable_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/disable_job_parameters.go deleted file mode 100644 index 3613607ddb..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/disable_job_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDisableJobParams creates a new DisableJobParams object -// with the default values initialized. -func NewDisableJobParams() *DisableJobParams { - var () - return &DisableJobParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDisableJobParamsWithTimeout creates a new DisableJobParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDisableJobParamsWithTimeout(timeout time.Duration) *DisableJobParams { - var () - return &DisableJobParams{ - - timeout: timeout, - } -} - -// NewDisableJobParamsWithContext creates a new DisableJobParams object -// with the default values initialized, and the ability to set a context for a request -func NewDisableJobParamsWithContext(ctx context.Context) *DisableJobParams { - var () - return &DisableJobParams{ - - Context: ctx, - } -} - -// NewDisableJobParamsWithHTTPClient creates a new DisableJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDisableJobParamsWithHTTPClient(client *http.Client) *DisableJobParams { - var () - return &DisableJobParams{ - HTTPClient: client, - } -} - -/*DisableJobParams contains all the parameters to send to the API endpoint -for the disable job operation typically these are written to a http.Request -*/ -type DisableJobParams struct { - - /*ID - The ID of the job to be disabled - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the disable job params -func (o *DisableJobParams) WithTimeout(timeout time.Duration) *DisableJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the disable job params -func (o *DisableJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the disable job params -func (o *DisableJobParams) WithContext(ctx context.Context) *DisableJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the disable job params -func (o *DisableJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the disable job params -func (o *DisableJobParams) WithHTTPClient(client *http.Client) *DisableJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the disable job params -func (o *DisableJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the disable job params -func (o *DisableJobParams) WithID(id string) *DisableJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the disable job params -func (o *DisableJobParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DisableJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/disable_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/disable_job_responses.go deleted file mode 100644 index 5483f42a4f..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/disable_job_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" -) - -// DisableJobReader is a Reader for the DisableJob structure. -type DisableJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DisableJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewDisableJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewDisableJobDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDisableJobOK creates a DisableJobOK with default headers values -func NewDisableJobOK() *DisableJobOK { - return &DisableJobOK{} -} - -/*DisableJobOK handles this case with default header values. - -A successful response. -*/ -type DisableJobOK struct { - Payload interface{} -} - -func (o *DisableJobOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/jobs/{id}/disable][%d] disableJobOK %+v", 200, o.Payload) -} - -func (o *DisableJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDisableJobDefault creates a DisableJobDefault with default headers values -func NewDisableJobDefault(code int) *DisableJobDefault { - return &DisableJobDefault{ - _statusCode: code, - } -} - -/*DisableJobDefault handles this case with default header values. - -DisableJobDefault disable job default -*/ -type DisableJobDefault struct { - _statusCode int - - Payload *job_model.V1Status -} - -// Code gets the status code for the disable job default response -func (o *DisableJobDefault) Code() int { - return o._statusCode -} - -func (o *DisableJobDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/jobs/{id}/disable][%d] DisableJob default %+v", o._statusCode, o.Payload) -} - -func (o *DisableJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(job_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/enable_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/enable_job_parameters.go deleted file mode 100644 index 0d98cfc591..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/enable_job_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewEnableJobParams creates a new EnableJobParams object -// with the default values initialized. -func NewEnableJobParams() *EnableJobParams { - var () - return &EnableJobParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewEnableJobParamsWithTimeout creates a new EnableJobParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewEnableJobParamsWithTimeout(timeout time.Duration) *EnableJobParams { - var () - return &EnableJobParams{ - - timeout: timeout, - } -} - -// NewEnableJobParamsWithContext creates a new EnableJobParams object -// with the default values initialized, and the ability to set a context for a request -func NewEnableJobParamsWithContext(ctx context.Context) *EnableJobParams { - var () - return &EnableJobParams{ - - Context: ctx, - } -} - -// NewEnableJobParamsWithHTTPClient creates a new EnableJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewEnableJobParamsWithHTTPClient(client *http.Client) *EnableJobParams { - var () - return &EnableJobParams{ - HTTPClient: client, - } -} - -/*EnableJobParams contains all the parameters to send to the API endpoint -for the enable job operation typically these are written to a http.Request -*/ -type EnableJobParams struct { - - /*ID - The ID of the job to be enabled - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the enable job params -func (o *EnableJobParams) WithTimeout(timeout time.Duration) *EnableJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the enable job params -func (o *EnableJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the enable job params -func (o *EnableJobParams) WithContext(ctx context.Context) *EnableJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the enable job params -func (o *EnableJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the enable job params -func (o *EnableJobParams) WithHTTPClient(client *http.Client) *EnableJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the enable job params -func (o *EnableJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the enable job params -func (o *EnableJobParams) WithID(id string) *EnableJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the enable job params -func (o *EnableJobParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *EnableJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/enable_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/enable_job_responses.go deleted file mode 100644 index 6334942280..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/enable_job_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" -) - -// EnableJobReader is a Reader for the EnableJob structure. -type EnableJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *EnableJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewEnableJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewEnableJobDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewEnableJobOK creates a EnableJobOK with default headers values -func NewEnableJobOK() *EnableJobOK { - return &EnableJobOK{} -} - -/*EnableJobOK handles this case with default header values. - -A successful response. -*/ -type EnableJobOK struct { - Payload interface{} -} - -func (o *EnableJobOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/jobs/{id}/enable][%d] enableJobOK %+v", 200, o.Payload) -} - -func (o *EnableJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewEnableJobDefault creates a EnableJobDefault with default headers values -func NewEnableJobDefault(code int) *EnableJobDefault { - return &EnableJobDefault{ - _statusCode: code, - } -} - -/*EnableJobDefault handles this case with default header values. - -EnableJobDefault enable job default -*/ -type EnableJobDefault struct { - _statusCode int - - Payload *job_model.V1Status -} - -// Code gets the status code for the enable job default response -func (o *EnableJobDefault) Code() int { - return o._statusCode -} - -func (o *EnableJobDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/jobs/{id}/enable][%d] EnableJob default %+v", o._statusCode, o.Payload) -} - -func (o *EnableJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(job_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/get_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/get_job_parameters.go deleted file mode 100644 index 1b11cb2dfc..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/get_job_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetJobParams creates a new GetJobParams object -// with the default values initialized. -func NewGetJobParams() *GetJobParams { - var () - return &GetJobParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetJobParamsWithTimeout creates a new GetJobParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetJobParamsWithTimeout(timeout time.Duration) *GetJobParams { - var () - return &GetJobParams{ - - timeout: timeout, - } -} - -// NewGetJobParamsWithContext creates a new GetJobParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetJobParamsWithContext(ctx context.Context) *GetJobParams { - var () - return &GetJobParams{ - - Context: ctx, - } -} - -// NewGetJobParamsWithHTTPClient creates a new GetJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetJobParamsWithHTTPClient(client *http.Client) *GetJobParams { - var () - return &GetJobParams{ - HTTPClient: client, - } -} - -/*GetJobParams contains all the parameters to send to the API endpoint -for the get job operation typically these are written to a http.Request -*/ -type GetJobParams struct { - - /*ID - The ID of the job to be retrieved - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get job params -func (o *GetJobParams) WithTimeout(timeout time.Duration) *GetJobParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get job params -func (o *GetJobParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get job params -func (o *GetJobParams) WithContext(ctx context.Context) *GetJobParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get job params -func (o *GetJobParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get job params -func (o *GetJobParams) WithHTTPClient(client *http.Client) *GetJobParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get job params -func (o *GetJobParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get job params -func (o *GetJobParams) WithID(id string) *GetJobParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get job params -func (o *GetJobParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/get_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/get_job_responses.go deleted file mode 100644 index 5d72fa7743..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/get_job_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" -) - -// GetJobReader is a Reader for the GetJob structure. -type GetJobReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewGetJobOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewGetJobDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetJobOK creates a GetJobOK with default headers values -func NewGetJobOK() *GetJobOK { - return &GetJobOK{} -} - -/*GetJobOK handles this case with default header values. - -A successful response. -*/ -type GetJobOK struct { - Payload *job_model.V1Job -} - -func (o *GetJobOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/jobs/{id}][%d] getJobOK %+v", 200, o.Payload) -} - -func (o *GetJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(job_model.V1Job) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetJobDefault creates a GetJobDefault with default headers values -func NewGetJobDefault(code int) *GetJobDefault { - return &GetJobDefault{ - _statusCode: code, - } -} - -/*GetJobDefault handles this case with default header values. - -GetJobDefault get job default -*/ -type GetJobDefault struct { - _statusCode int - - Payload *job_model.V1Status -} - -// Code gets the status code for the get job default response -func (o *GetJobDefault) Code() int { - return o._statusCode -} - -func (o *GetJobDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/jobs/{id}][%d] GetJob default %+v", o._statusCode, o.Payload) -} - -func (o *GetJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(job_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_client.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_client.go index 9a8dc6b277..703ebbc9f2 100644 --- a/backend/api/v1/go_http_client/job_client/job_service/job_service_client.go +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_client.go @@ -7,12 +7,11 @@ package job_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) // New creates a new job service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -24,178 +23,252 @@ type Client struct { formats strfmt.Registry } +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + JobServiceCreateJob(params *JobServiceCreateJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceCreateJobOK, error) + + JobServiceDeleteJob(params *JobServiceDeleteJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceDeleteJobOK, error) + + JobServiceDisableJob(params *JobServiceDisableJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceDisableJobOK, error) + + JobServiceEnableJob(params *JobServiceEnableJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceEnableJobOK, error) + + JobServiceGetJob(params *JobServiceGetJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceGetJobOK, error) + + JobServiceListJobs(params *JobServiceListJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceListJobsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -CreateJob creates a new job +JobServiceCreateJob creates a new job */ -func (a *Client) CreateJob(params *CreateJobParams, authInfo runtime.ClientAuthInfoWriter) (*CreateJobOK, error) { +func (a *Client) JobServiceCreateJob(params *JobServiceCreateJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceCreateJobOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewCreateJobParams() + params = NewJobServiceCreateJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "CreateJob", + op := &runtime.ClientOperation{ + ID: "JobService_CreateJob", Method: "POST", PathPattern: "/apis/v1/jobs", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &CreateJobReader{formats: a.formats}, + Reader: &JobServiceCreateJobReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*CreateJobOK), nil - + success, ok := result.(*JobServiceCreateJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceCreateJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -DeleteJob deletes a job +JobServiceDeleteJob deletes a job */ -func (a *Client) DeleteJob(params *DeleteJobParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteJobOK, error) { +func (a *Client) JobServiceDeleteJob(params *JobServiceDeleteJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceDeleteJobOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDeleteJobParams() + params = NewJobServiceDeleteJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "DeleteJob", + op := &runtime.ClientOperation{ + ID: "JobService_DeleteJob", Method: "DELETE", PathPattern: "/apis/v1/jobs/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &DeleteJobReader{formats: a.formats}, + Reader: &JobServiceDeleteJobReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*DeleteJobOK), nil - + success, ok := result.(*JobServiceDeleteJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceDeleteJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -DisableJob stops a job and all its associated runs the job is not deleted +JobServiceDisableJob stops a job and all its associated runs the job is not deleted */ -func (a *Client) DisableJob(params *DisableJobParams, authInfo runtime.ClientAuthInfoWriter) (*DisableJobOK, error) { +func (a *Client) JobServiceDisableJob(params *JobServiceDisableJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceDisableJobOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDisableJobParams() + params = NewJobServiceDisableJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "DisableJob", + op := &runtime.ClientOperation{ + ID: "JobService_DisableJob", Method: "POST", PathPattern: "/apis/v1/jobs/{id}/disable", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &DisableJobReader{formats: a.formats}, + Reader: &JobServiceDisableJobReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*DisableJobOK), nil - + success, ok := result.(*JobServiceDisableJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceDisableJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -EnableJob restarts a job that was previously stopped all runs associated with the job will continue +JobServiceEnableJob restarts a job that was previously stopped all runs associated with the job will continue */ -func (a *Client) EnableJob(params *EnableJobParams, authInfo runtime.ClientAuthInfoWriter) (*EnableJobOK, error) { +func (a *Client) JobServiceEnableJob(params *JobServiceEnableJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceEnableJobOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewEnableJobParams() + params = NewJobServiceEnableJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "EnableJob", + op := &runtime.ClientOperation{ + ID: "JobService_EnableJob", Method: "POST", PathPattern: "/apis/v1/jobs/{id}/enable", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &EnableJobReader{formats: a.formats}, + Reader: &JobServiceEnableJobReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*EnableJobOK), nil - + success, ok := result.(*JobServiceEnableJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceEnableJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -GetJob finds a specific job by ID +JobServiceGetJob finds a specific job by ID */ -func (a *Client) GetJob(params *GetJobParams, authInfo runtime.ClientAuthInfoWriter) (*GetJobOK, error) { +func (a *Client) JobServiceGetJob(params *JobServiceGetJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceGetJobOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewGetJobParams() + params = NewJobServiceGetJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetJob", + op := &runtime.ClientOperation{ + ID: "JobService_GetJob", Method: "GET", PathPattern: "/apis/v1/jobs/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &GetJobReader{formats: a.formats}, + Reader: &JobServiceGetJobReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*GetJobOK), nil - + success, ok := result.(*JobServiceGetJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceGetJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ListJobs finds all jobs +JobServiceListJobs finds all jobs */ -func (a *Client) ListJobs(params *ListJobsParams, authInfo runtime.ClientAuthInfoWriter) (*ListJobsOK, error) { +func (a *Client) JobServiceListJobs(params *JobServiceListJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceListJobsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewListJobsParams() + params = NewJobServiceListJobsParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ListJobs", + op := &runtime.ClientOperation{ + ID: "JobService_ListJobs", Method: "GET", PathPattern: "/apis/v1/jobs", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &ListJobsReader{formats: a.formats}, + Reader: &JobServiceListJobsReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ListJobsOK), nil - + success, ok := result.(*JobServiceListJobsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceListJobsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_create_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_create_job_parameters.go new file mode 100644 index 0000000000..31700ed7ae --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_create_job_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" +) + +// NewJobServiceCreateJobParams creates a new JobServiceCreateJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewJobServiceCreateJobParams() *JobServiceCreateJobParams { + return &JobServiceCreateJobParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobServiceCreateJobParamsWithTimeout creates a new JobServiceCreateJobParams object +// with the ability to set a timeout on a request. +func NewJobServiceCreateJobParamsWithTimeout(timeout time.Duration) *JobServiceCreateJobParams { + return &JobServiceCreateJobParams{ + timeout: timeout, + } +} + +// NewJobServiceCreateJobParamsWithContext creates a new JobServiceCreateJobParams object +// with the ability to set a context for a request. +func NewJobServiceCreateJobParamsWithContext(ctx context.Context) *JobServiceCreateJobParams { + return &JobServiceCreateJobParams{ + Context: ctx, + } +} + +// NewJobServiceCreateJobParamsWithHTTPClient creates a new JobServiceCreateJobParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobServiceCreateJobParamsWithHTTPClient(client *http.Client) *JobServiceCreateJobParams { + return &JobServiceCreateJobParams{ + HTTPClient: client, + } +} + +/* +JobServiceCreateJobParams contains all the parameters to send to the API endpoint + + for the job service create job operation. + + Typically these are written to a http.Request. +*/ +type JobServiceCreateJobParams struct { + + /* Job. + + The job to be created + */ + Job *job_model.V1Job + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the job service create job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceCreateJobParams) WithDefaults() *JobServiceCreateJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service create job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceCreateJobParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the job service create job params +func (o *JobServiceCreateJobParams) WithTimeout(timeout time.Duration) *JobServiceCreateJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the job service create job params +func (o *JobServiceCreateJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the job service create job params +func (o *JobServiceCreateJobParams) WithContext(ctx context.Context) *JobServiceCreateJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the job service create job params +func (o *JobServiceCreateJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the job service create job params +func (o *JobServiceCreateJobParams) WithHTTPClient(client *http.Client) *JobServiceCreateJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the job service create job params +func (o *JobServiceCreateJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithJob adds the job to the job service create job params +func (o *JobServiceCreateJobParams) WithJob(job *job_model.V1Job) *JobServiceCreateJobParams { + o.SetJob(job) + return o +} + +// SetJob adds the job to the job service create job params +func (o *JobServiceCreateJobParams) SetJob(job *job_model.V1Job) { + o.Job = job +} + +// WriteToRequest writes these params to a swagger request +func (o *JobServiceCreateJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Job != nil { + if err := r.SetBodyParam(o.Job); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_create_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_create_job_responses.go new file mode 100644 index 0000000000..5f945a29df --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_create_job_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" +) + +// JobServiceCreateJobReader is a Reader for the JobServiceCreateJob structure. +type JobServiceCreateJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobServiceCreateJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobServiceCreateJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobServiceCreateJobDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewJobServiceCreateJobOK creates a JobServiceCreateJobOK with default headers values +func NewJobServiceCreateJobOK() *JobServiceCreateJobOK { + return &JobServiceCreateJobOK{} +} + +/* +JobServiceCreateJobOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobServiceCreateJobOK struct { + Payload *job_model.V1Job +} + +// IsSuccess returns true when this job service create job o k response has a 2xx status code +func (o *JobServiceCreateJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service create job o k response has a 3xx status code +func (o *JobServiceCreateJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service create job o k response has a 4xx status code +func (o *JobServiceCreateJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service create job o k response has a 5xx status code +func (o *JobServiceCreateJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service create job o k response a status code equal to that given +func (o *JobServiceCreateJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service create job o k response +func (o *JobServiceCreateJobOK) Code() int { + return 200 +} + +func (o *JobServiceCreateJobOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/jobs][%d] jobServiceCreateJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceCreateJobOK) String() string { + return fmt.Sprintf("[POST /apis/v1/jobs][%d] jobServiceCreateJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceCreateJobOK) GetPayload() *job_model.V1Job { + return o.Payload +} + +func (o *JobServiceCreateJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(job_model.V1Job) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewJobServiceCreateJobDefault creates a JobServiceCreateJobDefault with default headers values +func NewJobServiceCreateJobDefault(code int) *JobServiceCreateJobDefault { + return &JobServiceCreateJobDefault{ + _statusCode: code, + } +} + +/* +JobServiceCreateJobDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobServiceCreateJobDefault struct { + _statusCode int + + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service create job default response has a 2xx status code +func (o *JobServiceCreateJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service create job default response has a 3xx status code +func (o *JobServiceCreateJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service create job default response has a 4xx status code +func (o *JobServiceCreateJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service create job default response has a 5xx status code +func (o *JobServiceCreateJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service create job default response a status code equal to that given +func (o *JobServiceCreateJobDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the job service create job default response +func (o *JobServiceCreateJobDefault) Code() int { + return o._statusCode +} + +func (o *JobServiceCreateJobDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/jobs][%d] JobService_CreateJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceCreateJobDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/jobs][%d] JobService_CreateJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceCreateJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload +} + +func (o *JobServiceCreateJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(job_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_delete_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_delete_job_parameters.go new file mode 100644 index 0000000000..299890039a --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_delete_job_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewJobServiceDeleteJobParams creates a new JobServiceDeleteJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewJobServiceDeleteJobParams() *JobServiceDeleteJobParams { + return &JobServiceDeleteJobParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobServiceDeleteJobParamsWithTimeout creates a new JobServiceDeleteJobParams object +// with the ability to set a timeout on a request. +func NewJobServiceDeleteJobParamsWithTimeout(timeout time.Duration) *JobServiceDeleteJobParams { + return &JobServiceDeleteJobParams{ + timeout: timeout, + } +} + +// NewJobServiceDeleteJobParamsWithContext creates a new JobServiceDeleteJobParams object +// with the ability to set a context for a request. +func NewJobServiceDeleteJobParamsWithContext(ctx context.Context) *JobServiceDeleteJobParams { + return &JobServiceDeleteJobParams{ + Context: ctx, + } +} + +// NewJobServiceDeleteJobParamsWithHTTPClient creates a new JobServiceDeleteJobParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobServiceDeleteJobParamsWithHTTPClient(client *http.Client) *JobServiceDeleteJobParams { + return &JobServiceDeleteJobParams{ + HTTPClient: client, + } +} + +/* +JobServiceDeleteJobParams contains all the parameters to send to the API endpoint + + for the job service delete job operation. + + Typically these are written to a http.Request. +*/ +type JobServiceDeleteJobParams struct { + + /* ID. + + The ID of the job to be deleted + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the job service delete job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceDeleteJobParams) WithDefaults() *JobServiceDeleteJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service delete job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceDeleteJobParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the job service delete job params +func (o *JobServiceDeleteJobParams) WithTimeout(timeout time.Duration) *JobServiceDeleteJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the job service delete job params +func (o *JobServiceDeleteJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the job service delete job params +func (o *JobServiceDeleteJobParams) WithContext(ctx context.Context) *JobServiceDeleteJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the job service delete job params +func (o *JobServiceDeleteJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the job service delete job params +func (o *JobServiceDeleteJobParams) WithHTTPClient(client *http.Client) *JobServiceDeleteJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the job service delete job params +func (o *JobServiceDeleteJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the job service delete job params +func (o *JobServiceDeleteJobParams) WithID(id string) *JobServiceDeleteJobParams { + o.SetID(id) + return o +} + +// SetID adds the id to the job service delete job params +func (o *JobServiceDeleteJobParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *JobServiceDeleteJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_delete_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_delete_job_responses.go new file mode 100644 index 0000000000..4694661006 --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_delete_job_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" +) + +// JobServiceDeleteJobReader is a Reader for the JobServiceDeleteJob structure. +type JobServiceDeleteJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobServiceDeleteJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobServiceDeleteJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobServiceDeleteJobDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewJobServiceDeleteJobOK creates a JobServiceDeleteJobOK with default headers values +func NewJobServiceDeleteJobOK() *JobServiceDeleteJobOK { + return &JobServiceDeleteJobOK{} +} + +/* +JobServiceDeleteJobOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobServiceDeleteJobOK struct { + Payload interface{} +} + +// IsSuccess returns true when this job service delete job o k response has a 2xx status code +func (o *JobServiceDeleteJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service delete job o k response has a 3xx status code +func (o *JobServiceDeleteJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service delete job o k response has a 4xx status code +func (o *JobServiceDeleteJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service delete job o k response has a 5xx status code +func (o *JobServiceDeleteJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service delete job o k response a status code equal to that given +func (o *JobServiceDeleteJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service delete job o k response +func (o *JobServiceDeleteJobOK) Code() int { + return 200 +} + +func (o *JobServiceDeleteJobOK) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/jobs/{id}][%d] jobServiceDeleteJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceDeleteJobOK) String() string { + return fmt.Sprintf("[DELETE /apis/v1/jobs/{id}][%d] jobServiceDeleteJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceDeleteJobOK) GetPayload() interface{} { + return o.Payload +} + +func (o *JobServiceDeleteJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewJobServiceDeleteJobDefault creates a JobServiceDeleteJobDefault with default headers values +func NewJobServiceDeleteJobDefault(code int) *JobServiceDeleteJobDefault { + return &JobServiceDeleteJobDefault{ + _statusCode: code, + } +} + +/* +JobServiceDeleteJobDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobServiceDeleteJobDefault struct { + _statusCode int + + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service delete job default response has a 2xx status code +func (o *JobServiceDeleteJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service delete job default response has a 3xx status code +func (o *JobServiceDeleteJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service delete job default response has a 4xx status code +func (o *JobServiceDeleteJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service delete job default response has a 5xx status code +func (o *JobServiceDeleteJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service delete job default response a status code equal to that given +func (o *JobServiceDeleteJobDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the job service delete job default response +func (o *JobServiceDeleteJobDefault) Code() int { + return o._statusCode +} + +func (o *JobServiceDeleteJobDefault) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/jobs/{id}][%d] JobService_DeleteJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceDeleteJobDefault) String() string { + return fmt.Sprintf("[DELETE /apis/v1/jobs/{id}][%d] JobService_DeleteJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceDeleteJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload +} + +func (o *JobServiceDeleteJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(job_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_disable_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_disable_job_parameters.go new file mode 100644 index 0000000000..a96d252aee --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_disable_job_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewJobServiceDisableJobParams creates a new JobServiceDisableJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewJobServiceDisableJobParams() *JobServiceDisableJobParams { + return &JobServiceDisableJobParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobServiceDisableJobParamsWithTimeout creates a new JobServiceDisableJobParams object +// with the ability to set a timeout on a request. +func NewJobServiceDisableJobParamsWithTimeout(timeout time.Duration) *JobServiceDisableJobParams { + return &JobServiceDisableJobParams{ + timeout: timeout, + } +} + +// NewJobServiceDisableJobParamsWithContext creates a new JobServiceDisableJobParams object +// with the ability to set a context for a request. +func NewJobServiceDisableJobParamsWithContext(ctx context.Context) *JobServiceDisableJobParams { + return &JobServiceDisableJobParams{ + Context: ctx, + } +} + +// NewJobServiceDisableJobParamsWithHTTPClient creates a new JobServiceDisableJobParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobServiceDisableJobParamsWithHTTPClient(client *http.Client) *JobServiceDisableJobParams { + return &JobServiceDisableJobParams{ + HTTPClient: client, + } +} + +/* +JobServiceDisableJobParams contains all the parameters to send to the API endpoint + + for the job service disable job operation. + + Typically these are written to a http.Request. +*/ +type JobServiceDisableJobParams struct { + + /* ID. + + The ID of the job to be disabled + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the job service disable job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceDisableJobParams) WithDefaults() *JobServiceDisableJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service disable job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceDisableJobParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the job service disable job params +func (o *JobServiceDisableJobParams) WithTimeout(timeout time.Duration) *JobServiceDisableJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the job service disable job params +func (o *JobServiceDisableJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the job service disable job params +func (o *JobServiceDisableJobParams) WithContext(ctx context.Context) *JobServiceDisableJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the job service disable job params +func (o *JobServiceDisableJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the job service disable job params +func (o *JobServiceDisableJobParams) WithHTTPClient(client *http.Client) *JobServiceDisableJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the job service disable job params +func (o *JobServiceDisableJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the job service disable job params +func (o *JobServiceDisableJobParams) WithID(id string) *JobServiceDisableJobParams { + o.SetID(id) + return o +} + +// SetID adds the id to the job service disable job params +func (o *JobServiceDisableJobParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *JobServiceDisableJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_disable_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_disable_job_responses.go new file mode 100644 index 0000000000..e347506f5e --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_disable_job_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" +) + +// JobServiceDisableJobReader is a Reader for the JobServiceDisableJob structure. +type JobServiceDisableJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobServiceDisableJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobServiceDisableJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobServiceDisableJobDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewJobServiceDisableJobOK creates a JobServiceDisableJobOK with default headers values +func NewJobServiceDisableJobOK() *JobServiceDisableJobOK { + return &JobServiceDisableJobOK{} +} + +/* +JobServiceDisableJobOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobServiceDisableJobOK struct { + Payload interface{} +} + +// IsSuccess returns true when this job service disable job o k response has a 2xx status code +func (o *JobServiceDisableJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service disable job o k response has a 3xx status code +func (o *JobServiceDisableJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service disable job o k response has a 4xx status code +func (o *JobServiceDisableJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service disable job o k response has a 5xx status code +func (o *JobServiceDisableJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service disable job o k response a status code equal to that given +func (o *JobServiceDisableJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service disable job o k response +func (o *JobServiceDisableJobOK) Code() int { + return 200 +} + +func (o *JobServiceDisableJobOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/jobs/{id}/disable][%d] jobServiceDisableJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceDisableJobOK) String() string { + return fmt.Sprintf("[POST /apis/v1/jobs/{id}/disable][%d] jobServiceDisableJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceDisableJobOK) GetPayload() interface{} { + return o.Payload +} + +func (o *JobServiceDisableJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewJobServiceDisableJobDefault creates a JobServiceDisableJobDefault with default headers values +func NewJobServiceDisableJobDefault(code int) *JobServiceDisableJobDefault { + return &JobServiceDisableJobDefault{ + _statusCode: code, + } +} + +/* +JobServiceDisableJobDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobServiceDisableJobDefault struct { + _statusCode int + + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service disable job default response has a 2xx status code +func (o *JobServiceDisableJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service disable job default response has a 3xx status code +func (o *JobServiceDisableJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service disable job default response has a 4xx status code +func (o *JobServiceDisableJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service disable job default response has a 5xx status code +func (o *JobServiceDisableJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service disable job default response a status code equal to that given +func (o *JobServiceDisableJobDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the job service disable job default response +func (o *JobServiceDisableJobDefault) Code() int { + return o._statusCode +} + +func (o *JobServiceDisableJobDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/jobs/{id}/disable][%d] JobService_DisableJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceDisableJobDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/jobs/{id}/disable][%d] JobService_DisableJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceDisableJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload +} + +func (o *JobServiceDisableJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(job_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_enable_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_enable_job_parameters.go new file mode 100644 index 0000000000..651b1bc8f0 --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_enable_job_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewJobServiceEnableJobParams creates a new JobServiceEnableJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewJobServiceEnableJobParams() *JobServiceEnableJobParams { + return &JobServiceEnableJobParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobServiceEnableJobParamsWithTimeout creates a new JobServiceEnableJobParams object +// with the ability to set a timeout on a request. +func NewJobServiceEnableJobParamsWithTimeout(timeout time.Duration) *JobServiceEnableJobParams { + return &JobServiceEnableJobParams{ + timeout: timeout, + } +} + +// NewJobServiceEnableJobParamsWithContext creates a new JobServiceEnableJobParams object +// with the ability to set a context for a request. +func NewJobServiceEnableJobParamsWithContext(ctx context.Context) *JobServiceEnableJobParams { + return &JobServiceEnableJobParams{ + Context: ctx, + } +} + +// NewJobServiceEnableJobParamsWithHTTPClient creates a new JobServiceEnableJobParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobServiceEnableJobParamsWithHTTPClient(client *http.Client) *JobServiceEnableJobParams { + return &JobServiceEnableJobParams{ + HTTPClient: client, + } +} + +/* +JobServiceEnableJobParams contains all the parameters to send to the API endpoint + + for the job service enable job operation. + + Typically these are written to a http.Request. +*/ +type JobServiceEnableJobParams struct { + + /* ID. + + The ID of the job to be enabled + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the job service enable job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceEnableJobParams) WithDefaults() *JobServiceEnableJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service enable job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceEnableJobParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the job service enable job params +func (o *JobServiceEnableJobParams) WithTimeout(timeout time.Duration) *JobServiceEnableJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the job service enable job params +func (o *JobServiceEnableJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the job service enable job params +func (o *JobServiceEnableJobParams) WithContext(ctx context.Context) *JobServiceEnableJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the job service enable job params +func (o *JobServiceEnableJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the job service enable job params +func (o *JobServiceEnableJobParams) WithHTTPClient(client *http.Client) *JobServiceEnableJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the job service enable job params +func (o *JobServiceEnableJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the job service enable job params +func (o *JobServiceEnableJobParams) WithID(id string) *JobServiceEnableJobParams { + o.SetID(id) + return o +} + +// SetID adds the id to the job service enable job params +func (o *JobServiceEnableJobParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *JobServiceEnableJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_enable_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_enable_job_responses.go new file mode 100644 index 0000000000..53be1bdd75 --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_enable_job_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" +) + +// JobServiceEnableJobReader is a Reader for the JobServiceEnableJob structure. +type JobServiceEnableJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobServiceEnableJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobServiceEnableJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobServiceEnableJobDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewJobServiceEnableJobOK creates a JobServiceEnableJobOK with default headers values +func NewJobServiceEnableJobOK() *JobServiceEnableJobOK { + return &JobServiceEnableJobOK{} +} + +/* +JobServiceEnableJobOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobServiceEnableJobOK struct { + Payload interface{} +} + +// IsSuccess returns true when this job service enable job o k response has a 2xx status code +func (o *JobServiceEnableJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service enable job o k response has a 3xx status code +func (o *JobServiceEnableJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service enable job o k response has a 4xx status code +func (o *JobServiceEnableJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service enable job o k response has a 5xx status code +func (o *JobServiceEnableJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service enable job o k response a status code equal to that given +func (o *JobServiceEnableJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service enable job o k response +func (o *JobServiceEnableJobOK) Code() int { + return 200 +} + +func (o *JobServiceEnableJobOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/jobs/{id}/enable][%d] jobServiceEnableJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceEnableJobOK) String() string { + return fmt.Sprintf("[POST /apis/v1/jobs/{id}/enable][%d] jobServiceEnableJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceEnableJobOK) GetPayload() interface{} { + return o.Payload +} + +func (o *JobServiceEnableJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewJobServiceEnableJobDefault creates a JobServiceEnableJobDefault with default headers values +func NewJobServiceEnableJobDefault(code int) *JobServiceEnableJobDefault { + return &JobServiceEnableJobDefault{ + _statusCode: code, + } +} + +/* +JobServiceEnableJobDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobServiceEnableJobDefault struct { + _statusCode int + + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service enable job default response has a 2xx status code +func (o *JobServiceEnableJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service enable job default response has a 3xx status code +func (o *JobServiceEnableJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service enable job default response has a 4xx status code +func (o *JobServiceEnableJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service enable job default response has a 5xx status code +func (o *JobServiceEnableJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service enable job default response a status code equal to that given +func (o *JobServiceEnableJobDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the job service enable job default response +func (o *JobServiceEnableJobDefault) Code() int { + return o._statusCode +} + +func (o *JobServiceEnableJobDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/jobs/{id}/enable][%d] JobService_EnableJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceEnableJobDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/jobs/{id}/enable][%d] JobService_EnableJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceEnableJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload +} + +func (o *JobServiceEnableJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(job_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_get_job_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_get_job_parameters.go new file mode 100644 index 0000000000..09652d7743 --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_get_job_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewJobServiceGetJobParams creates a new JobServiceGetJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewJobServiceGetJobParams() *JobServiceGetJobParams { + return &JobServiceGetJobParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobServiceGetJobParamsWithTimeout creates a new JobServiceGetJobParams object +// with the ability to set a timeout on a request. +func NewJobServiceGetJobParamsWithTimeout(timeout time.Duration) *JobServiceGetJobParams { + return &JobServiceGetJobParams{ + timeout: timeout, + } +} + +// NewJobServiceGetJobParamsWithContext creates a new JobServiceGetJobParams object +// with the ability to set a context for a request. +func NewJobServiceGetJobParamsWithContext(ctx context.Context) *JobServiceGetJobParams { + return &JobServiceGetJobParams{ + Context: ctx, + } +} + +// NewJobServiceGetJobParamsWithHTTPClient creates a new JobServiceGetJobParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobServiceGetJobParamsWithHTTPClient(client *http.Client) *JobServiceGetJobParams { + return &JobServiceGetJobParams{ + HTTPClient: client, + } +} + +/* +JobServiceGetJobParams contains all the parameters to send to the API endpoint + + for the job service get job operation. + + Typically these are written to a http.Request. +*/ +type JobServiceGetJobParams struct { + + /* ID. + + The ID of the job to be retrieved + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the job service get job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceGetJobParams) WithDefaults() *JobServiceGetJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service get job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceGetJobParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the job service get job params +func (o *JobServiceGetJobParams) WithTimeout(timeout time.Duration) *JobServiceGetJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the job service get job params +func (o *JobServiceGetJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the job service get job params +func (o *JobServiceGetJobParams) WithContext(ctx context.Context) *JobServiceGetJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the job service get job params +func (o *JobServiceGetJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the job service get job params +func (o *JobServiceGetJobParams) WithHTTPClient(client *http.Client) *JobServiceGetJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the job service get job params +func (o *JobServiceGetJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the job service get job params +func (o *JobServiceGetJobParams) WithID(id string) *JobServiceGetJobParams { + o.SetID(id) + return o +} + +// SetID adds the id to the job service get job params +func (o *JobServiceGetJobParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *JobServiceGetJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_get_job_responses.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_get_job_responses.go new file mode 100644 index 0000000000..257b2818c9 --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_get_job_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" +) + +// JobServiceGetJobReader is a Reader for the JobServiceGetJob structure. +type JobServiceGetJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobServiceGetJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobServiceGetJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobServiceGetJobDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewJobServiceGetJobOK creates a JobServiceGetJobOK with default headers values +func NewJobServiceGetJobOK() *JobServiceGetJobOK { + return &JobServiceGetJobOK{} +} + +/* +JobServiceGetJobOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobServiceGetJobOK struct { + Payload *job_model.V1Job +} + +// IsSuccess returns true when this job service get job o k response has a 2xx status code +func (o *JobServiceGetJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service get job o k response has a 3xx status code +func (o *JobServiceGetJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service get job o k response has a 4xx status code +func (o *JobServiceGetJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service get job o k response has a 5xx status code +func (o *JobServiceGetJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service get job o k response a status code equal to that given +func (o *JobServiceGetJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service get job o k response +func (o *JobServiceGetJobOK) Code() int { + return 200 +} + +func (o *JobServiceGetJobOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/jobs/{id}][%d] jobServiceGetJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceGetJobOK) String() string { + return fmt.Sprintf("[GET /apis/v1/jobs/{id}][%d] jobServiceGetJobOK %+v", 200, o.Payload) +} + +func (o *JobServiceGetJobOK) GetPayload() *job_model.V1Job { + return o.Payload +} + +func (o *JobServiceGetJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(job_model.V1Job) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewJobServiceGetJobDefault creates a JobServiceGetJobDefault with default headers values +func NewJobServiceGetJobDefault(code int) *JobServiceGetJobDefault { + return &JobServiceGetJobDefault{ + _statusCode: code, + } +} + +/* +JobServiceGetJobDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobServiceGetJobDefault struct { + _statusCode int + + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service get job default response has a 2xx status code +func (o *JobServiceGetJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service get job default response has a 3xx status code +func (o *JobServiceGetJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service get job default response has a 4xx status code +func (o *JobServiceGetJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service get job default response has a 5xx status code +func (o *JobServiceGetJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service get job default response a status code equal to that given +func (o *JobServiceGetJobDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the job service get job default response +func (o *JobServiceGetJobDefault) Code() int { + return o._statusCode +} + +func (o *JobServiceGetJobDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/jobs/{id}][%d] JobService_GetJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceGetJobDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/jobs/{id}][%d] JobService_GetJob default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceGetJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload +} + +func (o *JobServiceGetJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(job_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_list_jobs_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_list_jobs_parameters.go new file mode 100644 index 0000000000..34701d232b --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_list_jobs_parameters.go @@ -0,0 +1,355 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewJobServiceListJobsParams creates a new JobServiceListJobsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewJobServiceListJobsParams() *JobServiceListJobsParams { + return &JobServiceListJobsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewJobServiceListJobsParamsWithTimeout creates a new JobServiceListJobsParams object +// with the ability to set a timeout on a request. +func NewJobServiceListJobsParamsWithTimeout(timeout time.Duration) *JobServiceListJobsParams { + return &JobServiceListJobsParams{ + timeout: timeout, + } +} + +// NewJobServiceListJobsParamsWithContext creates a new JobServiceListJobsParams object +// with the ability to set a context for a request. +func NewJobServiceListJobsParamsWithContext(ctx context.Context) *JobServiceListJobsParams { + return &JobServiceListJobsParams{ + Context: ctx, + } +} + +// NewJobServiceListJobsParamsWithHTTPClient creates a new JobServiceListJobsParams object +// with the ability to set a custom HTTPClient for a request. +func NewJobServiceListJobsParamsWithHTTPClient(client *http.Client) *JobServiceListJobsParams { + return &JobServiceListJobsParams{ + HTTPClient: client, + } +} + +/* +JobServiceListJobsParams contains all the parameters to send to the API endpoint + + for the job service list jobs operation. + + Typically these are written to a http.Request. +*/ +type JobServiceListJobsParams struct { + + /* Filter. + + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). + */ + Filter *string + + /* PageSize. + + 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. + + Format: int32 + */ + PageSize *int32 + + /* PageToken. + + 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. + */ + PageToken *string + + /* ResourceReferenceKeyID. + + The ID of the resource that referred to. + */ + ResourceReferenceKeyID *string + + /* ResourceReferenceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" + */ + ResourceReferenceKeyType *string + + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc". + Ascending by default. + */ + SortBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the job service list jobs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceListJobsParams) WithDefaults() *JobServiceListJobsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service list jobs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceListJobsParams) SetDefaults() { + var ( + resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := JobServiceListJobsParams{ + ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the job service list jobs params +func (o *JobServiceListJobsParams) WithTimeout(timeout time.Duration) *JobServiceListJobsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the job service list jobs params +func (o *JobServiceListJobsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the job service list jobs params +func (o *JobServiceListJobsParams) WithContext(ctx context.Context) *JobServiceListJobsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the job service list jobs params +func (o *JobServiceListJobsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the job service list jobs params +func (o *JobServiceListJobsParams) WithHTTPClient(client *http.Client) *JobServiceListJobsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the job service list jobs params +func (o *JobServiceListJobsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the job service list jobs params +func (o *JobServiceListJobsParams) WithFilter(filter *string) *JobServiceListJobsParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the job service list jobs params +func (o *JobServiceListJobsParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithPageSize adds the pageSize to the job service list jobs params +func (o *JobServiceListJobsParams) WithPageSize(pageSize *int32) *JobServiceListJobsParams { + o.SetPageSize(pageSize) + return o +} + +// SetPageSize adds the pageSize to the job service list jobs params +func (o *JobServiceListJobsParams) SetPageSize(pageSize *int32) { + o.PageSize = pageSize +} + +// WithPageToken adds the pageToken to the job service list jobs params +func (o *JobServiceListJobsParams) WithPageToken(pageToken *string) *JobServiceListJobsParams { + o.SetPageToken(pageToken) + return o +} + +// SetPageToken adds the pageToken to the job service list jobs params +func (o *JobServiceListJobsParams) SetPageToken(pageToken *string) { + o.PageToken = pageToken +} + +// WithResourceReferenceKeyID adds the resourceReferenceKeyID to the job service list jobs params +func (o *JobServiceListJobsParams) WithResourceReferenceKeyID(resourceReferenceKeyID *string) *JobServiceListJobsParams { + o.SetResourceReferenceKeyID(resourceReferenceKeyID) + return o +} + +// SetResourceReferenceKeyID adds the resourceReferenceKeyId to the job service list jobs params +func (o *JobServiceListJobsParams) SetResourceReferenceKeyID(resourceReferenceKeyID *string) { + o.ResourceReferenceKeyID = resourceReferenceKeyID +} + +// WithResourceReferenceKeyType adds the resourceReferenceKeyType to the job service list jobs params +func (o *JobServiceListJobsParams) WithResourceReferenceKeyType(resourceReferenceKeyType *string) *JobServiceListJobsParams { + o.SetResourceReferenceKeyType(resourceReferenceKeyType) + return o +} + +// SetResourceReferenceKeyType adds the resourceReferenceKeyType to the job service list jobs params +func (o *JobServiceListJobsParams) SetResourceReferenceKeyType(resourceReferenceKeyType *string) { + o.ResourceReferenceKeyType = resourceReferenceKeyType +} + +// WithSortBy adds the sortBy to the job service list jobs params +func (o *JobServiceListJobsParams) WithSortBy(sortBy *string) *JobServiceListJobsParams { + o.SetSortBy(sortBy) + return o +} + +// SetSortBy adds the sortBy to the job service list jobs params +func (o *JobServiceListJobsParams) SetSortBy(sortBy *string) { + o.SortBy = sortBy +} + +// WriteToRequest writes these params to a swagger request +func (o *JobServiceListJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.PageSize != nil { + + // query param page_size + var qrPageSize int32 + + if o.PageSize != nil { + qrPageSize = *o.PageSize + } + qPageSize := swag.FormatInt32(qrPageSize) + if qPageSize != "" { + + if err := r.SetQueryParam("page_size", qPageSize); err != nil { + return err + } + } + } + + if o.PageToken != nil { + + // query param page_token + var qrPageToken string + + if o.PageToken != nil { + qrPageToken = *o.PageToken + } + qPageToken := qrPageToken + if qPageToken != "" { + + if err := r.SetQueryParam("page_token", qPageToken); err != nil { + return err + } + } + } + + if o.ResourceReferenceKeyID != nil { + + // query param resource_reference_key.id + var qrResourceReferenceKeyID string + + if o.ResourceReferenceKeyID != nil { + qrResourceReferenceKeyID = *o.ResourceReferenceKeyID + } + qResourceReferenceKeyID := qrResourceReferenceKeyID + if qResourceReferenceKeyID != "" { + + if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { + return err + } + } + } + + if o.ResourceReferenceKeyType != nil { + + // query param resource_reference_key.type + var qrResourceReferenceKeyType string + + if o.ResourceReferenceKeyType != nil { + qrResourceReferenceKeyType = *o.ResourceReferenceKeyType + } + qResourceReferenceKeyType := qrResourceReferenceKeyType + if qResourceReferenceKeyType != "" { + + if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { + return err + } + } + } + + if o.SortBy != nil { + + // query param sort_by + var qrSortBy string + + if o.SortBy != nil { + qrSortBy = *o.SortBy + } + qSortBy := qrSortBy + if qSortBy != "" { + + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/job_service_list_jobs_responses.go b/backend/api/v1/go_http_client/job_client/job_service/job_service_list_jobs_responses.go new file mode 100644 index 0000000000..0cdacda8b6 --- /dev/null +++ b/backend/api/v1/go_http_client/job_client/job_service/job_service_list_jobs_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" +) + +// JobServiceListJobsReader is a Reader for the JobServiceListJobs structure. +type JobServiceListJobsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobServiceListJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobServiceListJobsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobServiceListJobsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewJobServiceListJobsOK creates a JobServiceListJobsOK with default headers values +func NewJobServiceListJobsOK() *JobServiceListJobsOK { + return &JobServiceListJobsOK{} +} + +/* +JobServiceListJobsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type JobServiceListJobsOK struct { + Payload *job_model.V1ListJobsResponse +} + +// IsSuccess returns true when this job service list jobs o k response has a 2xx status code +func (o *JobServiceListJobsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service list jobs o k response has a 3xx status code +func (o *JobServiceListJobsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service list jobs o k response has a 4xx status code +func (o *JobServiceListJobsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service list jobs o k response has a 5xx status code +func (o *JobServiceListJobsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service list jobs o k response a status code equal to that given +func (o *JobServiceListJobsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service list jobs o k response +func (o *JobServiceListJobsOK) Code() int { + return 200 +} + +func (o *JobServiceListJobsOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/jobs][%d] jobServiceListJobsOK %+v", 200, o.Payload) +} + +func (o *JobServiceListJobsOK) String() string { + return fmt.Sprintf("[GET /apis/v1/jobs][%d] jobServiceListJobsOK %+v", 200, o.Payload) +} + +func (o *JobServiceListJobsOK) GetPayload() *job_model.V1ListJobsResponse { + return o.Payload +} + +func (o *JobServiceListJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(job_model.V1ListJobsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewJobServiceListJobsDefault creates a JobServiceListJobsDefault with default headers values +func NewJobServiceListJobsDefault(code int) *JobServiceListJobsDefault { + return &JobServiceListJobsDefault{ + _statusCode: code, + } +} + +/* +JobServiceListJobsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type JobServiceListJobsDefault struct { + _statusCode int + + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service list jobs default response has a 2xx status code +func (o *JobServiceListJobsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service list jobs default response has a 3xx status code +func (o *JobServiceListJobsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service list jobs default response has a 4xx status code +func (o *JobServiceListJobsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service list jobs default response has a 5xx status code +func (o *JobServiceListJobsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service list jobs default response a status code equal to that given +func (o *JobServiceListJobsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the job service list jobs default response +func (o *JobServiceListJobsDefault) Code() int { + return o._statusCode +} + +func (o *JobServiceListJobsDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/jobs][%d] JobService_ListJobs default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceListJobsDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/jobs][%d] JobService_ListJobs default %+v", o._statusCode, o.Payload) +} + +func (o *JobServiceListJobsDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload +} + +func (o *JobServiceListJobsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(job_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/job_client/job_service/list_jobs_parameters.go b/backend/api/v1/go_http_client/job_client/job_service/list_jobs_parameters.go deleted file mode 100644 index af66d403c7..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/list_jobs_parameters.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewListJobsParams creates a new ListJobsParams object -// with the default values initialized. -func NewListJobsParams() *ListJobsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListJobsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - timeout: cr.DefaultTimeout, - } -} - -// NewListJobsParamsWithTimeout creates a new ListJobsParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewListJobsParamsWithTimeout(timeout time.Duration) *ListJobsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListJobsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - timeout: timeout, - } -} - -// NewListJobsParamsWithContext creates a new ListJobsParams object -// with the default values initialized, and the ability to set a context for a request -func NewListJobsParamsWithContext(ctx context.Context) *ListJobsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListJobsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - Context: ctx, - } -} - -// NewListJobsParamsWithHTTPClient creates a new ListJobsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewListJobsParamsWithHTTPClient(client *http.Client) *ListJobsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListJobsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - HTTPClient: client, - } -} - -/*ListJobsParams contains all the parameters to send to the API endpoint -for the list jobs operation typically these are written to a http.Request -*/ -type ListJobsParams struct { - - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). - - */ - Filter *string - /*PageSize - 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. - - */ - PageSize *int32 - /*PageToken - 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. - - */ - PageToken *string - /*ResourceReferenceKeyID - The ID of the resource that referred to. - - */ - ResourceReferenceKeyID *string - /*ResourceReferenceKeyType - The type of the resource that referred to. - - */ - ResourceReferenceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc". - Ascending by default. - - */ - SortBy *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the list jobs params -func (o *ListJobsParams) WithTimeout(timeout time.Duration) *ListJobsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list jobs params -func (o *ListJobsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list jobs params -func (o *ListJobsParams) WithContext(ctx context.Context) *ListJobsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list jobs params -func (o *ListJobsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list jobs params -func (o *ListJobsParams) WithHTTPClient(client *http.Client) *ListJobsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list jobs params -func (o *ListJobsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFilter adds the filter to the list jobs params -func (o *ListJobsParams) WithFilter(filter *string) *ListJobsParams { - o.SetFilter(filter) - return o -} - -// SetFilter adds the filter to the list jobs params -func (o *ListJobsParams) SetFilter(filter *string) { - o.Filter = filter -} - -// WithPageSize adds the pageSize to the list jobs params -func (o *ListJobsParams) WithPageSize(pageSize *int32) *ListJobsParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the list jobs params -func (o *ListJobsParams) SetPageSize(pageSize *int32) { - o.PageSize = pageSize -} - -// WithPageToken adds the pageToken to the list jobs params -func (o *ListJobsParams) WithPageToken(pageToken *string) *ListJobsParams { - o.SetPageToken(pageToken) - return o -} - -// SetPageToken adds the pageToken to the list jobs params -func (o *ListJobsParams) SetPageToken(pageToken *string) { - o.PageToken = pageToken -} - -// WithResourceReferenceKeyID adds the resourceReferenceKeyID to the list jobs params -func (o *ListJobsParams) WithResourceReferenceKeyID(resourceReferenceKeyID *string) *ListJobsParams { - o.SetResourceReferenceKeyID(resourceReferenceKeyID) - return o -} - -// SetResourceReferenceKeyID adds the resourceReferenceKeyId to the list jobs params -func (o *ListJobsParams) SetResourceReferenceKeyID(resourceReferenceKeyID *string) { - o.ResourceReferenceKeyID = resourceReferenceKeyID -} - -// WithResourceReferenceKeyType adds the resourceReferenceKeyType to the list jobs params -func (o *ListJobsParams) WithResourceReferenceKeyType(resourceReferenceKeyType *string) *ListJobsParams { - o.SetResourceReferenceKeyType(resourceReferenceKeyType) - return o -} - -// SetResourceReferenceKeyType adds the resourceReferenceKeyType to the list jobs params -func (o *ListJobsParams) SetResourceReferenceKeyType(resourceReferenceKeyType *string) { - o.ResourceReferenceKeyType = resourceReferenceKeyType -} - -// WithSortBy adds the sortBy to the list jobs params -func (o *ListJobsParams) WithSortBy(sortBy *string) *ListJobsParams { - o.SetSortBy(sortBy) - return o -} - -// SetSortBy adds the sortBy to the list jobs params -func (o *ListJobsParams) SetSortBy(sortBy *string) { - o.SortBy = sortBy -} - -// WriteToRequest writes these params to a swagger request -func (o *ListJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Filter != nil { - - // query param filter - var qrFilter string - if o.Filter != nil { - qrFilter = *o.Filter - } - qFilter := qrFilter - if qFilter != "" { - if err := r.SetQueryParam("filter", qFilter); err != nil { - return err - } - } - - } - - if o.PageSize != nil { - - // query param page_size - var qrPageSize int32 - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt32(qrPageSize) - if qPageSize != "" { - if err := r.SetQueryParam("page_size", qPageSize); err != nil { - return err - } - } - - } - - if o.PageToken != nil { - - // query param page_token - var qrPageToken string - if o.PageToken != nil { - qrPageToken = *o.PageToken - } - qPageToken := qrPageToken - if qPageToken != "" { - if err := r.SetQueryParam("page_token", qPageToken); err != nil { - return err - } - } - - } - - if o.ResourceReferenceKeyID != nil { - - // query param resource_reference_key.id - var qrResourceReferenceKeyID string - if o.ResourceReferenceKeyID != nil { - qrResourceReferenceKeyID = *o.ResourceReferenceKeyID - } - qResourceReferenceKeyID := qrResourceReferenceKeyID - if qResourceReferenceKeyID != "" { - if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { - return err - } - } - - } - - if o.ResourceReferenceKeyType != nil { - - // query param resource_reference_key.type - var qrResourceReferenceKeyType string - if o.ResourceReferenceKeyType != nil { - qrResourceReferenceKeyType = *o.ResourceReferenceKeyType - } - qResourceReferenceKeyType := qrResourceReferenceKeyType - if qResourceReferenceKeyType != "" { - if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { - return err - } - } - - } - - if o.SortBy != nil { - - // query param sort_by - var qrSortBy string - if o.SortBy != nil { - qrSortBy = *o.SortBy - } - qSortBy := qrSortBy - if qSortBy != "" { - if err := r.SetQueryParam("sort_by", qSortBy); err != nil { - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/job_client/job_service/list_jobs_responses.go b/backend/api/v1/go_http_client/job_client/job_service/list_jobs_responses.go deleted file mode 100644 index e4e91eded2..0000000000 --- a/backend/api/v1/go_http_client/job_client/job_service/list_jobs_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/job_model" -) - -// ListJobsReader is a Reader for the ListJobs structure. -type ListJobsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewListJobsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewListJobsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListJobsOK creates a ListJobsOK with default headers values -func NewListJobsOK() *ListJobsOK { - return &ListJobsOK{} -} - -/*ListJobsOK handles this case with default header values. - -A successful response. -*/ -type ListJobsOK struct { - Payload *job_model.V1ListJobsResponse -} - -func (o *ListJobsOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/jobs][%d] listJobsOK %+v", 200, o.Payload) -} - -func (o *ListJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(job_model.V1ListJobsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListJobsDefault creates a ListJobsDefault with default headers values -func NewListJobsDefault(code int) *ListJobsDefault { - return &ListJobsDefault{ - _statusCode: code, - } -} - -/*ListJobsDefault handles this case with default header values. - -ListJobsDefault list jobs default -*/ -type ListJobsDefault struct { - _statusCode int - - Payload *job_model.V1Status -} - -// Code gets the status code for the list jobs default response -func (o *ListJobsDefault) Code() int { - return o._statusCode -} - -func (o *ListJobsDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/jobs][%d] ListJobs default %+v", o._statusCode, o.Payload) -} - -func (o *ListJobsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(job_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/job_model/googlerpc_status.go b/backend/api/v1/go_http_client/job_model/googlerpc_status.go new file mode 100644 index 0000000000..44e343f5d2 --- /dev/null +++ b/backend/api/v1/go_http_client/job_model/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1/go_http_client/job_model/job_mode.go b/backend/api/v1/go_http_client/job_model/job_mode.go index bb24a14482..31602cee93 100644 --- a/backend/api/v1/go_http_client/job_model/job_mode.go +++ b/backend/api/v1/go_http_client/job_model/job_mode.go @@ -6,20 +6,30 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // JobMode Required input. // -// - DISABLED: The job won't schedule any run if disabled. +// - DISABLED: The job won't schedule any run if disabled. +// // swagger:model JobMode type JobMode string +func NewJobMode(value JobMode) *JobMode { + return &value +} + +// Pointer returns a pointer to a freshly-allocated JobMode. +func (m JobMode) Pointer() *JobMode { + return &m +} + const ( // JobModeUNKNOWNMODE captures enum value "UNKNOWN_MODE" @@ -46,7 +56,7 @@ func init() { } func (m JobMode) validateJobModeEnum(path, location string, value JobMode) error { - if err := validate.Enum(path, location, value, jobModeEnum); err != nil { + if err := validate.EnumCase(path, location, value, jobModeEnum, true); err != nil { return err } return nil @@ -66,3 +76,8 @@ func (m JobMode) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this job mode based on context it is used +func (m JobMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/job_model/pipeline_spec_runtime_config.go b/backend/api/v1/go_http_client/job_model/pipeline_spec_runtime_config.go index 06dc2e96e4..5e127dc5b2 100644 --- a/backend/api/v1/go_http_client/job_model/pipeline_spec_runtime_config.go +++ b/backend/api/v1/go_http_client/job_model/pipeline_spec_runtime_config.go @@ -6,14 +6,16 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // PipelineSpecRuntimeConfig The runtime config of a PipelineSpec. +// // swagger:model PipelineSpecRuntimeConfig type PipelineSpecRuntimeConfig struct { @@ -43,7 +45,6 @@ func (m *PipelineSpecRuntimeConfig) Validate(formats strfmt.Registry) error { } func (m *PipelineSpecRuntimeConfig) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -55,6 +56,40 @@ func (m *PipelineSpecRuntimeConfig) validateParameters(formats strfmt.Registry) } if val, ok := m.Parameters[k]; ok { if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + k) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this pipeline spec runtime config based on the context it is used +func (m *PipelineSpecRuntimeConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PipelineSpecRuntimeConfig) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for k := range m.Parameters { + + if val, ok := m.Parameters[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { return err } } diff --git a/backend/api/v1/go_http_client/job_model/protobuf_any.go b/backend/api/v1/go_http_client/job_model/protobuf_any.go index 543426bef6..9e88692cf0 100644 --- a/backend/api/v1/go_http_client/job_model/protobuf_any.go +++ b/backend/api/v1/go_http_client/job_model/protobuf_any.go @@ -6,9 +6,9 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +20,45 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// 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 := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// 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 := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(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 @@ -66,34 +66,34 @@ import ( // 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; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@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" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -124,35 +124,16 @@ type ProtobufAny struct { // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` - - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + AtType string `json:"@type,omitempty"` } // Validate validates this protobuf any func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { - - if swag.IsZero(m.Value) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1/go_http_client/job_model/v1_cron_schedule.go b/backend/api/v1/go_http_client/job_model/v1_cron_schedule.go index 4bf6f0665a..5200233fb6 100644 --- a/backend/api/v1/go_http_client/job_model/v1_cron_schedule.go +++ b/backend/api/v1/go_http_client/job_model/v1_cron_schedule.go @@ -6,14 +6,16 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V1CronSchedule CronSchedule allow scheduling the job with unix-like cron +// // swagger:model v1CronSchedule type V1CronSchedule struct { @@ -49,7 +51,6 @@ func (m *V1CronSchedule) Validate(formats strfmt.Registry) error { } func (m *V1CronSchedule) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required return nil } @@ -62,7 +63,6 @@ func (m *V1CronSchedule) validateEndTime(formats strfmt.Registry) error { } func (m *V1CronSchedule) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required return nil } @@ -74,6 +74,11 @@ func (m *V1CronSchedule) validateStartTime(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 cron schedule based on context it is used +func (m *V1CronSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1CronSchedule) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/job_model/v1_job.go b/backend/api/v1/go_http_client/job_model/v1_job.go index 6c7082dbe8..cbf8e47aa2 100644 --- a/backend/api/v1/go_http_client/job_model/v1_job.go +++ b/backend/api/v1/go_http_client/job_model/v1_job.go @@ -6,16 +6,17 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V1Job v1 job +// // swagger:model v1Job type V1Job struct { @@ -42,7 +43,7 @@ type V1Job struct { MaxConcurrency int64 `json:"max_concurrency,omitempty,string"` // mode - Mode JobMode `json:"mode,omitempty"` + Mode *JobMode `json:"mode,omitempty"` // Required input field. Job name provided by user. Not unique. Name string `json:"name,omitempty"` @@ -111,7 +112,6 @@ func (m *V1Job) Validate(formats strfmt.Registry) error { } func (m *V1Job) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -124,23 +124,25 @@ func (m *V1Job) validateCreatedAt(formats strfmt.Registry) error { } func (m *V1Job) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required return nil } - if err := m.Mode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mode") + if m.Mode != nil { + if err := m.Mode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err } - return err } return nil } func (m *V1Job) validatePipelineSpec(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineSpec) { // not required return nil } @@ -149,6 +151,8 @@ func (m *V1Job) validatePipelineSpec(formats strfmt.Registry) error { if err := m.PipelineSpec.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") } return err } @@ -158,7 +162,6 @@ func (m *V1Job) validatePipelineSpec(formats strfmt.Registry) error { } func (m *V1Job) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -172,6 +175,8 @@ func (m *V1Job) validateResourceReferences(formats strfmt.Registry) error { if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } @@ -183,7 +188,6 @@ func (m *V1Job) validateResourceReferences(formats strfmt.Registry) error { } func (m *V1Job) validateTrigger(formats strfmt.Registry) error { - if swag.IsZero(m.Trigger) { // not required return nil } @@ -192,6 +196,8 @@ func (m *V1Job) validateTrigger(formats strfmt.Registry) error { if err := m.Trigger.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("trigger") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trigger") } return err } @@ -201,7 +207,6 @@ func (m *V1Job) validateTrigger(formats strfmt.Registry) error { } func (m *V1Job) validateUpdatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.UpdatedAt) { // not required return nil } @@ -213,6 +218,100 @@ func (m *V1Job) validateUpdatedAt(formats strfmt.Registry) error { return nil } +// ContextValidate validate this v1 job based on the context it is used +func (m *V1Job) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMode(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePipelineSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTrigger(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Job) contextValidateMode(ctx context.Context, formats strfmt.Registry) error { + + if m.Mode != nil { + if err := m.Mode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err + } + } + + return nil +} + +func (m *V1Job) contextValidatePipelineSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineSpec != nil { + if err := m.PipelineSpec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") + } + return err + } + } + + return nil +} + +func (m *V1Job) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Job) contextValidateTrigger(ctx context.Context, formats strfmt.Registry) error { + + if m.Trigger != nil { + if err := m.Trigger.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("trigger") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trigger") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *V1Job) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/job_model/v1_job.go-- b/backend/api/v1/go_http_client/job_model/v1_job.go-- new file mode 100644 index 0000000000..1b650ea241 --- /dev/null +++ b/backend/api/v1/go_http_client/job_model/v1_job.go-- @@ -0,0 +1,331 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Job v1 job +// +// swagger:model v1Job +type V1Job struct { + + // Output. The time this job is created. + // Format: date-time + CreatedAt strfmt.DateTime `json:"created_at,omitempty"` + + // Optional input field. Describing the purpose of the job + Description string `json:"description,omitempty"` + + // Input. Whether the job is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // 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. + Error string `json:"error,omitempty"` + + // Output. Unique run ID. Generated by API server. + ID string `json:"id,omitempty"` + + // Required input field. + // Specify how many runs can be executed concurrently. Rage [1-10] + MaxConcurrency string `json:"max_concurrency,omitempty"` + + // mode + Mode *JobMode `json:"mode,omitempty"` + + // Required input field. Job name provided by user. Not unique. + Name string `json:"name,omitempty"` + + // 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. + NoCatchup bool `json:"no_catchup,omitempty"` + + // Required input field. + // Describing what the pipeline manifest and parameters to use + // for the scheduled job. + PipelineSpec *V1PipelineSpec `json:"pipeline_spec,omitempty"` + + // Optional input field. Specify which resource this job belongs to. + ResourceReferences []*V1ResourceReference `json:"resource_references"` + + // Optional input field. Specify which Kubernetes service account this job uses. + ServiceAccount string `json:"service_account,omitempty"` + + // Output. The status of the job. + // One of [Enable, Disable, Error] + Status string `json:"status,omitempty"` + + // Required input field. + // Specify how a run is triggered. Support cron mode or periodic mode. + Trigger *V1Trigger `json:"trigger,omitempty"` + + // Output. The last time this job is updated. + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` +} + +// Validate validates this v1 job +func (m *V1Job) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMode(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePipelineSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceReferences(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrigger(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Job) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("created_at", "body", "date-time", m.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1Job) validateMode(formats strfmt.Registry) error { + if swag.IsZero(m.Mode) { // not required + return nil + } + + if m.Mode != nil { + if err := m.Mode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err + } + } + + return nil +} + +func (m *V1Job) validatePipelineSpec(formats strfmt.Registry) error { + if swag.IsZero(m.PipelineSpec) { // not required + return nil + } + + if m.PipelineSpec != nil { + if err := m.PipelineSpec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") + } + return err + } + } + + return nil +} + +func (m *V1Job) validateResourceReferences(formats strfmt.Registry) error { + if swag.IsZero(m.ResourceReferences) { // not required + return nil + } + + for i := 0; i < len(m.ResourceReferences); i++ { + if swag.IsZero(m.ResourceReferences[i]) { // not required + continue + } + + if m.ResourceReferences[i] != nil { + if err := m.ResourceReferences[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Job) validateTrigger(formats strfmt.Registry) error { + if swag.IsZero(m.Trigger) { // not required + return nil + } + + if m.Trigger != nil { + if err := m.Trigger.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("trigger") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trigger") + } + return err + } + } + + return nil +} + +func (m *V1Job) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(m.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("updated_at", "body", "date-time", m.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this v1 job based on the context it is used +func (m *V1Job) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMode(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePipelineSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTrigger(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Job) contextValidateMode(ctx context.Context, formats strfmt.Registry) error { + + if m.Mode != nil { + if err := m.Mode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err + } + } + + return nil +} + +func (m *V1Job) contextValidatePipelineSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineSpec != nil { + if err := m.PipelineSpec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") + } + return err + } + } + + return nil +} + +func (m *V1Job) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Job) contextValidateTrigger(ctx context.Context, formats strfmt.Registry) error { + + if m.Trigger != nil { + if err := m.Trigger.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("trigger") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trigger") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Job) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Job) UnmarshalBinary(b []byte) error { + var res V1Job + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1/go_http_client/job_model/v1_list_jobs_response.go b/backend/api/v1/go_http_client/job_model/v1_list_jobs_response.go index b3a9025004..33731f5ff8 100644 --- a/backend/api/v1/go_http_client/job_model/v1_list_jobs_response.go +++ b/backend/api/v1/go_http_client/job_model/v1_list_jobs_response.go @@ -6,15 +6,16 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ListJobsResponse v1 list jobs response +// // swagger:model v1ListJobsResponse type V1ListJobsResponse struct { @@ -43,7 +44,6 @@ func (m *V1ListJobsResponse) Validate(formats strfmt.Registry) error { } func (m *V1ListJobsResponse) validateJobs(formats strfmt.Registry) error { - if swag.IsZero(m.Jobs) { // not required return nil } @@ -57,6 +57,42 @@ func (m *V1ListJobsResponse) validateJobs(formats strfmt.Registry) error { if err := m.Jobs[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("jobs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 list jobs response based on the context it is used +func (m *V1ListJobsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateJobs(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListJobsResponse) contextValidateJobs(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Jobs); i++ { + + if m.Jobs[i] != nil { + if err := m.Jobs[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("jobs" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1/go_http_client/job_model/v1_parameter.go b/backend/api/v1/go_http_client/job_model/v1_parameter.go index 0c923285a3..3c3b84d5e7 100644 --- a/backend/api/v1/go_http_client/job_model/v1_parameter.go +++ b/backend/api/v1/go_http_client/job_model/v1_parameter.go @@ -6,12 +6,14 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1Parameter v1 parameter +// // swagger:model v1Parameter type V1Parameter struct { @@ -27,6 +29,11 @@ func (m *V1Parameter) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 parameter based on context it is used +func (m *V1Parameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1Parameter) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/job_model/v1_periodic_schedule.go b/backend/api/v1/go_http_client/job_model/v1_periodic_schedule.go index 3d375c377b..afeef4da5a 100644 --- a/backend/api/v1/go_http_client/job_model/v1_periodic_schedule.go +++ b/backend/api/v1/go_http_client/job_model/v1_periodic_schedule.go @@ -6,14 +6,16 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V1PeriodicSchedule PeriodicSchedule allow scheduling the job periodically with certain interval +// // swagger:model v1PeriodicSchedule type V1PeriodicSchedule struct { @@ -48,7 +50,6 @@ func (m *V1PeriodicSchedule) Validate(formats strfmt.Registry) error { } func (m *V1PeriodicSchedule) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required return nil } @@ -61,7 +62,6 @@ func (m *V1PeriodicSchedule) validateEndTime(formats strfmt.Registry) error { } func (m *V1PeriodicSchedule) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required return nil } @@ -73,6 +73,11 @@ func (m *V1PeriodicSchedule) validateStartTime(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 periodic schedule based on context it is used +func (m *V1PeriodicSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1PeriodicSchedule) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/job_model/v1_periodic_schedule.go-- b/backend/api/v1/go_http_client/job_model/v1_periodic_schedule.go-- new file mode 100644 index 0000000000..94a9c8c854 --- /dev/null +++ b/backend/api/v1/go_http_client/job_model/v1_periodic_schedule.go-- @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PeriodicSchedule PeriodicSchedule allow scheduling the job periodically with certain interval +// +// swagger:model v1PeriodicSchedule +type V1PeriodicSchedule struct { + + // The end time of the periodic job + // Format: date-time + EndTime strfmt.DateTime `json:"end_time,omitempty"` + + // The time interval between the starting time of consecutive jobs + IntervalSecond string `json:"interval_second,omitempty"` + + // The start time of the periodic job + // Format: date-time + StartTime strfmt.DateTime `json:"start_time,omitempty"` +} + +// Validate validates this v1 periodic schedule +func (m *V1PeriodicSchedule) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PeriodicSchedule) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("end_time", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1PeriodicSchedule) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("start_time", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v1 periodic schedule based on context it is used +func (m *V1PeriodicSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PeriodicSchedule) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PeriodicSchedule) UnmarshalBinary(b []byte) error { + var res V1PeriodicSchedule + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1/go_http_client/job_model/v1_pipeline_spec.go b/backend/api/v1/go_http_client/job_model/v1_pipeline_spec.go index 4e7291dda8..b145ca2b19 100644 --- a/backend/api/v1/go_http_client/job_model/v1_pipeline_spec.go +++ b/backend/api/v1/go_http_client/job_model/v1_pipeline_spec.go @@ -6,15 +6,16 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1PipelineSpec v1 pipeline spec +// // swagger:model v1PipelineSpec type V1PipelineSpec struct { @@ -60,7 +61,6 @@ func (m *V1PipelineSpec) Validate(formats strfmt.Registry) error { } func (m *V1PipelineSpec) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -74,6 +74,8 @@ func (m *V1PipelineSpec) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -85,7 +87,6 @@ func (m *V1PipelineSpec) validateParameters(formats strfmt.Registry) error { } func (m *V1PipelineSpec) validateRuntimeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RuntimeConfig) { // not required return nil } @@ -94,6 +95,62 @@ func (m *V1PipelineSpec) validateRuntimeConfig(formats strfmt.Registry) error { if err := m.RuntimeConfig.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 pipeline spec based on the context it is used +func (m *V1PipelineSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRuntimeConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PipelineSpec) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PipelineSpec) contextValidateRuntimeConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.RuntimeConfig != nil { + if err := m.RuntimeConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") } return err } diff --git a/backend/api/v1/go_http_client/job_model/v1_relationship.go b/backend/api/v1/go_http_client/job_model/v1_relationship.go index b50778f63c..f1851c69f9 100644 --- a/backend/api/v1/go_http_client/job_model/v1_relationship.go +++ b/backend/api/v1/go_http_client/job_model/v1_relationship.go @@ -6,18 +6,28 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1Relationship v1 relationship +// // swagger:model v1Relationship type V1Relationship string +func NewV1Relationship(value V1Relationship) *V1Relationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1Relationship. +func (m V1Relationship) Pointer() *V1Relationship { + return &m +} + const ( // V1RelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m V1Relationship) validateV1RelationshipEnum(path, location string, value V1Relationship) error { - if err := validate.Enum(path, location, value, v1RelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1RelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m V1Relationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 relationship based on context it is used +func (m V1Relationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/job_model/v1_resource_key.go b/backend/api/v1/go_http_client/job_model/v1_resource_key.go index 8ba7d63e33..39f725d228 100644 --- a/backend/api/v1/go_http_client/job_model/v1_resource_key.go +++ b/backend/api/v1/go_http_client/job_model/v1_resource_key.go @@ -6,13 +6,15 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceKey v1 resource key +// // swagger:model v1ResourceKey type V1ResourceKey struct { @@ -20,7 +22,7 @@ type V1ResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type V1ResourceType `json:"type,omitempty"` + Type *V1ResourceType `json:"type,omitempty"` } // Validate validates this v1 resource key @@ -38,16 +40,49 @@ func (m *V1ResourceKey) Validate(formats strfmt.Registry) error { } func (m *V1ResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource key based on the context it is used +func (m *V1ResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/job_model/v1_resource_reference.go b/backend/api/v1/go_http_client/job_model/v1_resource_reference.go index 7ebf135633..138ea5e9ef 100644 --- a/backend/api/v1/go_http_client/job_model/v1_resource_reference.go +++ b/backend/api/v1/go_http_client/job_model/v1_resource_reference.go @@ -6,13 +6,15 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceReference v1 resource reference +// // swagger:model v1ResourceReference type V1ResourceReference struct { @@ -23,7 +25,7 @@ type V1ResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship V1Relationship `json:"relationship,omitempty"` + Relationship *V1Relationship `json:"relationship,omitempty"` } // Validate validates this v1 resource reference @@ -45,7 +47,6 @@ func (m *V1ResourceReference) Validate(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,69 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource reference based on the context it is used +func (m *V1ResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *V1ResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/job_model/v1_resource_type.go b/backend/api/v1/go_http_client/job_model/v1_resource_type.go index 3acc76cafd..deb975ae82 100644 --- a/backend/api/v1/go_http_client/job_model/v1_resource_type.go +++ b/backend/api/v1/go_http_client/job_model/v1_resource_type.go @@ -6,18 +6,28 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1ResourceType v1 resource type +// // swagger:model v1ResourceType type V1ResourceType string +func NewV1ResourceType(value V1ResourceType) *V1ResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1ResourceType. +func (m V1ResourceType) Pointer() *V1ResourceType { + return &m +} + const ( // V1ResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m V1ResourceType) validateV1ResourceTypeEnum(path, location string, value V1ResourceType) error { - if err := validate.Enum(path, location, value, v1ResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1ResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m V1ResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 resource type based on context it is used +func (m V1ResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/job_model/v1_status.go b/backend/api/v1/go_http_client/job_model/v1_status.go deleted file mode 100644 index a7d8b8a578..0000000000 --- a/backend/api/v1/go_http_client/job_model/v1_status.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// V1Status v1 status -// swagger:model v1Status -type V1Status struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` -} - -// Validate validates this v1 status -func (m *V1Status) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1Status) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1Status) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1Status) UnmarshalBinary(b []byte) error { - var res V1Status - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1/go_http_client/job_model/v1_trigger.go b/backend/api/v1/go_http_client/job_model/v1_trigger.go index 29c944fc1c..de49827471 100644 --- a/backend/api/v1/go_http_client/job_model/v1_trigger.go +++ b/backend/api/v1/go_http_client/job_model/v1_trigger.go @@ -6,13 +6,15 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1Trigger Trigger defines what starts a pipeline run. +// // swagger:model v1Trigger type V1Trigger struct { @@ -42,7 +44,6 @@ func (m *V1Trigger) Validate(formats strfmt.Registry) error { } func (m *V1Trigger) validateCronSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.CronSchedule) { // not required return nil } @@ -51,6 +52,8 @@ func (m *V1Trigger) validateCronSchedule(formats strfmt.Registry) error { if err := m.CronSchedule.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cron_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cron_schedule") } return err } @@ -60,7 +63,6 @@ func (m *V1Trigger) validateCronSchedule(formats strfmt.Registry) error { } func (m *V1Trigger) validatePeriodicSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.PeriodicSchedule) { // not required return nil } @@ -69,6 +71,58 @@ func (m *V1Trigger) validatePeriodicSchedule(formats strfmt.Registry) error { if err := m.PeriodicSchedule.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("periodic_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("periodic_schedule") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 trigger based on the context it is used +func (m *V1Trigger) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCronSchedule(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePeriodicSchedule(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Trigger) contextValidateCronSchedule(ctx context.Context, formats strfmt.Registry) error { + + if m.CronSchedule != nil { + if err := m.CronSchedule.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cron_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cron_schedule") + } + return err + } + } + + return nil +} + +func (m *V1Trigger) contextValidatePeriodicSchedule(ctx context.Context, formats strfmt.Registry) error { + + if m.PeriodicSchedule != nil { + if err := m.PeriodicSchedule.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("periodic_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("periodic_schedule") } return err } diff --git a/backend/api/v1/go_http_client/job_model/v1_value.go b/backend/api/v1/go_http_client/job_model/v1_value.go index 7fb1bd6f06..b429095229 100644 --- a/backend/api/v1/go_http_client/job_model/v1_value.go +++ b/backend/api/v1/go_http_client/job_model/v1_value.go @@ -6,12 +6,14 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1Value Value is the value of the field. +// // swagger:model v1Value type V1Value struct { @@ -30,6 +32,11 @@ func (m *V1Value) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 value based on context it is used +func (m *V1Value) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1Value) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_client.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_client.go index 98f0dd00f7..6d0ae78529 100644 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_client.go +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_client.go @@ -8,8 +8,7 @@ package pipeline_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_client/pipeline_service" ) @@ -27,7 +26,7 @@ const ( ) // DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http", "https"} +var DefaultSchemes = []string{"http"} // NewHTTPClient creates a new pipeline HTTP client. func NewHTTPClient(formats strfmt.Registry) *Pipeline { @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Pipeline { cli := new(Pipeline) cli.Transport = transport - cli.PipelineService = pipeline_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Pipeline is a client for pipeline type Pipeline struct { - PipelineService *pipeline_service.Client + PipelineService pipeline_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Pipeline struct { // SetTransport changes the transport on the client and all its subresources func (c *Pipeline) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.PipelineService.SetTransport(transport) - } diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_parameters.go deleted file mode 100644 index 97ba7aef41..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// NewCreatePipelineParams creates a new CreatePipelineParams object -// with the default values initialized. -func NewCreatePipelineParams() *CreatePipelineParams { - var () - return &CreatePipelineParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewCreatePipelineParamsWithTimeout creates a new CreatePipelineParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewCreatePipelineParamsWithTimeout(timeout time.Duration) *CreatePipelineParams { - var () - return &CreatePipelineParams{ - - timeout: timeout, - } -} - -// NewCreatePipelineParamsWithContext creates a new CreatePipelineParams object -// with the default values initialized, and the ability to set a context for a request -func NewCreatePipelineParamsWithContext(ctx context.Context) *CreatePipelineParams { - var () - return &CreatePipelineParams{ - - Context: ctx, - } -} - -// NewCreatePipelineParamsWithHTTPClient creates a new CreatePipelineParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewCreatePipelineParamsWithHTTPClient(client *http.Client) *CreatePipelineParams { - var () - return &CreatePipelineParams{ - HTTPClient: client, - } -} - -/*CreatePipelineParams contains all the parameters to send to the API endpoint -for the create pipeline operation typically these are written to a http.Request -*/ -type CreatePipelineParams struct { - - /*Body*/ - Body *pipeline_model.V1Pipeline - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the create pipeline params -func (o *CreatePipelineParams) WithTimeout(timeout time.Duration) *CreatePipelineParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create pipeline params -func (o *CreatePipelineParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create pipeline params -func (o *CreatePipelineParams) WithContext(ctx context.Context) *CreatePipelineParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create pipeline params -func (o *CreatePipelineParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create pipeline params -func (o *CreatePipelineParams) WithHTTPClient(client *http.Client) *CreatePipelineParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create pipeline params -func (o *CreatePipelineParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create pipeline params -func (o *CreatePipelineParams) WithBody(body *pipeline_model.V1Pipeline) *CreatePipelineParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create pipeline params -func (o *CreatePipelineParams) SetBody(body *pipeline_model.V1Pipeline) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreatePipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_responses.go deleted file mode 100644 index 14d90d9d8b..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// CreatePipelineReader is a Reader for the CreatePipeline structure. -type CreatePipelineReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreatePipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewCreatePipelineOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewCreatePipelineDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreatePipelineOK creates a CreatePipelineOK with default headers values -func NewCreatePipelineOK() *CreatePipelineOK { - return &CreatePipelineOK{} -} - -/*CreatePipelineOK handles this case with default header values. - -A successful response. -*/ -type CreatePipelineOK struct { - Payload *pipeline_model.V1Pipeline -} - -func (o *CreatePipelineOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipelines][%d] createPipelineOK %+v", 200, o.Payload) -} - -func (o *CreatePipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Pipeline) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreatePipelineDefault creates a CreatePipelineDefault with default headers values -func NewCreatePipelineDefault(code int) *CreatePipelineDefault { - return &CreatePipelineDefault{ - _statusCode: code, - } -} - -/*CreatePipelineDefault handles this case with default header values. - -CreatePipelineDefault create pipeline default -*/ -type CreatePipelineDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the create pipeline default response -func (o *CreatePipelineDefault) Code() int { - return o._statusCode -} - -func (o *CreatePipelineDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipelines][%d] CreatePipeline default %+v", o._statusCode, o.Payload) -} - -func (o *CreatePipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_version_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_version_parameters.go deleted file mode 100644 index e8f5335028..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_version_parameters.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// NewCreatePipelineVersionParams creates a new CreatePipelineVersionParams object -// with the default values initialized. -func NewCreatePipelineVersionParams() *CreatePipelineVersionParams { - var () - return &CreatePipelineVersionParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewCreatePipelineVersionParamsWithTimeout creates a new CreatePipelineVersionParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewCreatePipelineVersionParamsWithTimeout(timeout time.Duration) *CreatePipelineVersionParams { - var () - return &CreatePipelineVersionParams{ - - timeout: timeout, - } -} - -// NewCreatePipelineVersionParamsWithContext creates a new CreatePipelineVersionParams object -// with the default values initialized, and the ability to set a context for a request -func NewCreatePipelineVersionParamsWithContext(ctx context.Context) *CreatePipelineVersionParams { - var () - return &CreatePipelineVersionParams{ - - Context: ctx, - } -} - -// NewCreatePipelineVersionParamsWithHTTPClient creates a new CreatePipelineVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewCreatePipelineVersionParamsWithHTTPClient(client *http.Client) *CreatePipelineVersionParams { - var () - return &CreatePipelineVersionParams{ - HTTPClient: client, - } -} - -/*CreatePipelineVersionParams contains all the parameters to send to the API endpoint -for the create pipeline version operation typically these are written to a http.Request -*/ -type CreatePipelineVersionParams struct { - - /*Body - ResourceReference inside PipelineVersion specifies the pipeline that this - version belongs to. - - */ - Body *pipeline_model.V1PipelineVersion - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the create pipeline version params -func (o *CreatePipelineVersionParams) WithTimeout(timeout time.Duration) *CreatePipelineVersionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create pipeline version params -func (o *CreatePipelineVersionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create pipeline version params -func (o *CreatePipelineVersionParams) WithContext(ctx context.Context) *CreatePipelineVersionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create pipeline version params -func (o *CreatePipelineVersionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create pipeline version params -func (o *CreatePipelineVersionParams) WithHTTPClient(client *http.Client) *CreatePipelineVersionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create pipeline version params -func (o *CreatePipelineVersionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create pipeline version params -func (o *CreatePipelineVersionParams) WithBody(body *pipeline_model.V1PipelineVersion) *CreatePipelineVersionParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create pipeline version params -func (o *CreatePipelineVersionParams) SetBody(body *pipeline_model.V1PipelineVersion) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreatePipelineVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_version_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_version_responses.go deleted file mode 100644 index 2f8aa612e8..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/create_pipeline_version_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// CreatePipelineVersionReader is a Reader for the CreatePipelineVersion structure. -type CreatePipelineVersionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreatePipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewCreatePipelineVersionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewCreatePipelineVersionDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreatePipelineVersionOK creates a CreatePipelineVersionOK with default headers values -func NewCreatePipelineVersionOK() *CreatePipelineVersionOK { - return &CreatePipelineVersionOK{} -} - -/*CreatePipelineVersionOK handles this case with default header values. - -A successful response. -*/ -type CreatePipelineVersionOK struct { - Payload *pipeline_model.V1PipelineVersion -} - -func (o *CreatePipelineVersionOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipeline_versions][%d] createPipelineVersionOK %+v", 200, o.Payload) -} - -func (o *CreatePipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1PipelineVersion) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreatePipelineVersionDefault creates a CreatePipelineVersionDefault with default headers values -func NewCreatePipelineVersionDefault(code int) *CreatePipelineVersionDefault { - return &CreatePipelineVersionDefault{ - _statusCode: code, - } -} - -/*CreatePipelineVersionDefault handles this case with default header values. - -CreatePipelineVersionDefault create pipeline version default -*/ -type CreatePipelineVersionDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the create pipeline version default response -func (o *CreatePipelineVersionDefault) Code() int { - return o._statusCode -} - -func (o *CreatePipelineVersionDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipeline_versions][%d] CreatePipelineVersion default %+v", o._statusCode, o.Payload) -} - -func (o *CreatePipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_parameters.go deleted file mode 100644 index 0fd3417789..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDeletePipelineParams creates a new DeletePipelineParams object -// with the default values initialized. -func NewDeletePipelineParams() *DeletePipelineParams { - var () - return &DeletePipelineParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDeletePipelineParamsWithTimeout creates a new DeletePipelineParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDeletePipelineParamsWithTimeout(timeout time.Duration) *DeletePipelineParams { - var () - return &DeletePipelineParams{ - - timeout: timeout, - } -} - -// NewDeletePipelineParamsWithContext creates a new DeletePipelineParams object -// with the default values initialized, and the ability to set a context for a request -func NewDeletePipelineParamsWithContext(ctx context.Context) *DeletePipelineParams { - var () - return &DeletePipelineParams{ - - Context: ctx, - } -} - -// NewDeletePipelineParamsWithHTTPClient creates a new DeletePipelineParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDeletePipelineParamsWithHTTPClient(client *http.Client) *DeletePipelineParams { - var () - return &DeletePipelineParams{ - HTTPClient: client, - } -} - -/*DeletePipelineParams contains all the parameters to send to the API endpoint -for the delete pipeline operation typically these are written to a http.Request -*/ -type DeletePipelineParams struct { - - /*ID - The ID of the pipeline to be deleted. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the delete pipeline params -func (o *DeletePipelineParams) WithTimeout(timeout time.Duration) *DeletePipelineParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete pipeline params -func (o *DeletePipelineParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete pipeline params -func (o *DeletePipelineParams) WithContext(ctx context.Context) *DeletePipelineParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete pipeline params -func (o *DeletePipelineParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete pipeline params -func (o *DeletePipelineParams) WithHTTPClient(client *http.Client) *DeletePipelineParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete pipeline params -func (o *DeletePipelineParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete pipeline params -func (o *DeletePipelineParams) WithID(id string) *DeletePipelineParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete pipeline params -func (o *DeletePipelineParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeletePipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_responses.go deleted file mode 100644 index 420cc9b88a..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// DeletePipelineReader is a Reader for the DeletePipeline structure. -type DeletePipelineReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeletePipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewDeletePipelineOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewDeletePipelineDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDeletePipelineOK creates a DeletePipelineOK with default headers values -func NewDeletePipelineOK() *DeletePipelineOK { - return &DeletePipelineOK{} -} - -/*DeletePipelineOK handles this case with default header values. - -A successful response. -*/ -type DeletePipelineOK struct { - Payload interface{} -} - -func (o *DeletePipelineOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/pipelines/{id}][%d] deletePipelineOK %+v", 200, o.Payload) -} - -func (o *DeletePipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeletePipelineDefault creates a DeletePipelineDefault with default headers values -func NewDeletePipelineDefault(code int) *DeletePipelineDefault { - return &DeletePipelineDefault{ - _statusCode: code, - } -} - -/*DeletePipelineDefault handles this case with default header values. - -DeletePipelineDefault delete pipeline default -*/ -type DeletePipelineDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the delete pipeline default response -func (o *DeletePipelineDefault) Code() int { - return o._statusCode -} - -func (o *DeletePipelineDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/pipelines/{id}][%d] DeletePipeline default %+v", o._statusCode, o.Payload) -} - -func (o *DeletePipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_version_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_version_parameters.go deleted file mode 100644 index d8718fe093..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_version_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDeletePipelineVersionParams creates a new DeletePipelineVersionParams object -// with the default values initialized. -func NewDeletePipelineVersionParams() *DeletePipelineVersionParams { - var () - return &DeletePipelineVersionParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDeletePipelineVersionParamsWithTimeout creates a new DeletePipelineVersionParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDeletePipelineVersionParamsWithTimeout(timeout time.Duration) *DeletePipelineVersionParams { - var () - return &DeletePipelineVersionParams{ - - timeout: timeout, - } -} - -// NewDeletePipelineVersionParamsWithContext creates a new DeletePipelineVersionParams object -// with the default values initialized, and the ability to set a context for a request -func NewDeletePipelineVersionParamsWithContext(ctx context.Context) *DeletePipelineVersionParams { - var () - return &DeletePipelineVersionParams{ - - Context: ctx, - } -} - -// NewDeletePipelineVersionParamsWithHTTPClient creates a new DeletePipelineVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDeletePipelineVersionParamsWithHTTPClient(client *http.Client) *DeletePipelineVersionParams { - var () - return &DeletePipelineVersionParams{ - HTTPClient: client, - } -} - -/*DeletePipelineVersionParams contains all the parameters to send to the API endpoint -for the delete pipeline version operation typically these are written to a http.Request -*/ -type DeletePipelineVersionParams struct { - - /*VersionID - The ID of the pipeline version to be deleted. - - */ - VersionID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the delete pipeline version params -func (o *DeletePipelineVersionParams) WithTimeout(timeout time.Duration) *DeletePipelineVersionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete pipeline version params -func (o *DeletePipelineVersionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete pipeline version params -func (o *DeletePipelineVersionParams) WithContext(ctx context.Context) *DeletePipelineVersionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete pipeline version params -func (o *DeletePipelineVersionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete pipeline version params -func (o *DeletePipelineVersionParams) WithHTTPClient(client *http.Client) *DeletePipelineVersionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete pipeline version params -func (o *DeletePipelineVersionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithVersionID adds the versionID to the delete pipeline version params -func (o *DeletePipelineVersionParams) WithVersionID(versionID string) *DeletePipelineVersionParams { - o.SetVersionID(versionID) - return o -} - -// SetVersionID adds the versionId to the delete pipeline version params -func (o *DeletePipelineVersionParams) SetVersionID(versionID string) { - o.VersionID = versionID -} - -// WriteToRequest writes these params to a swagger request -func (o *DeletePipelineVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param version_id - if err := r.SetPathParam("version_id", o.VersionID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_version_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_version_responses.go deleted file mode 100644 index d103f3a15f..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/delete_pipeline_version_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// DeletePipelineVersionReader is a Reader for the DeletePipelineVersion structure. -type DeletePipelineVersionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeletePipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewDeletePipelineVersionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewDeletePipelineVersionDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDeletePipelineVersionOK creates a DeletePipelineVersionOK with default headers values -func NewDeletePipelineVersionOK() *DeletePipelineVersionOK { - return &DeletePipelineVersionOK{} -} - -/*DeletePipelineVersionOK handles this case with default header values. - -A successful response. -*/ -type DeletePipelineVersionOK struct { - Payload interface{} -} - -func (o *DeletePipelineVersionOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/pipeline_versions/{version_id}][%d] deletePipelineVersionOK %+v", 200, o.Payload) -} - -func (o *DeletePipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeletePipelineVersionDefault creates a DeletePipelineVersionDefault with default headers values -func NewDeletePipelineVersionDefault(code int) *DeletePipelineVersionDefault { - return &DeletePipelineVersionDefault{ - _statusCode: code, - } -} - -/*DeletePipelineVersionDefault handles this case with default header values. - -DeletePipelineVersionDefault delete pipeline version default -*/ -type DeletePipelineVersionDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the delete pipeline version default response -func (o *DeletePipelineVersionDefault) Code() int { - return o._statusCode -} - -func (o *DeletePipelineVersionDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/pipeline_versions/{version_id}][%d] DeletePipelineVersion default %+v", o._statusCode, o.Payload) -} - -func (o *DeletePipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_parameters.go deleted file mode 100644 index 499511d87f..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetPipelineParams creates a new GetPipelineParams object -// with the default values initialized. -func NewGetPipelineParams() *GetPipelineParams { - var () - return &GetPipelineParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetPipelineParamsWithTimeout creates a new GetPipelineParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetPipelineParamsWithTimeout(timeout time.Duration) *GetPipelineParams { - var () - return &GetPipelineParams{ - - timeout: timeout, - } -} - -// NewGetPipelineParamsWithContext creates a new GetPipelineParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetPipelineParamsWithContext(ctx context.Context) *GetPipelineParams { - var () - return &GetPipelineParams{ - - Context: ctx, - } -} - -// NewGetPipelineParamsWithHTTPClient creates a new GetPipelineParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetPipelineParamsWithHTTPClient(client *http.Client) *GetPipelineParams { - var () - return &GetPipelineParams{ - HTTPClient: client, - } -} - -/*GetPipelineParams contains all the parameters to send to the API endpoint -for the get pipeline operation typically these are written to a http.Request -*/ -type GetPipelineParams struct { - - /*ID - The ID of the pipeline to be retrieved. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get pipeline params -func (o *GetPipelineParams) WithTimeout(timeout time.Duration) *GetPipelineParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get pipeline params -func (o *GetPipelineParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get pipeline params -func (o *GetPipelineParams) WithContext(ctx context.Context) *GetPipelineParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get pipeline params -func (o *GetPipelineParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get pipeline params -func (o *GetPipelineParams) WithHTTPClient(client *http.Client) *GetPipelineParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get pipeline params -func (o *GetPipelineParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get pipeline params -func (o *GetPipelineParams) WithID(id string) *GetPipelineParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get pipeline params -func (o *GetPipelineParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_responses.go deleted file mode 100644 index 7b4b7bbd99..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// GetPipelineReader is a Reader for the GetPipeline structure. -type GetPipelineReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewGetPipelineOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewGetPipelineDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetPipelineOK creates a GetPipelineOK with default headers values -func NewGetPipelineOK() *GetPipelineOK { - return &GetPipelineOK{} -} - -/*GetPipelineOK handles this case with default header values. - -A successful response. -*/ -type GetPipelineOK struct { - Payload *pipeline_model.V1Pipeline -} - -func (o *GetPipelineOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipelines/{id}][%d] getPipelineOK %+v", 200, o.Payload) -} - -func (o *GetPipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Pipeline) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPipelineDefault creates a GetPipelineDefault with default headers values -func NewGetPipelineDefault(code int) *GetPipelineDefault { - return &GetPipelineDefault{ - _statusCode: code, - } -} - -/*GetPipelineDefault handles this case with default header values. - -GetPipelineDefault get pipeline default -*/ -type GetPipelineDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the get pipeline default response -func (o *GetPipelineDefault) Code() int { - return o._statusCode -} - -func (o *GetPipelineDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipelines/{id}][%d] GetPipeline default %+v", o._statusCode, o.Payload) -} - -func (o *GetPipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_parameters.go deleted file mode 100644 index 4ed8b98dda..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetPipelineVersionParams creates a new GetPipelineVersionParams object -// with the default values initialized. -func NewGetPipelineVersionParams() *GetPipelineVersionParams { - var () - return &GetPipelineVersionParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetPipelineVersionParamsWithTimeout creates a new GetPipelineVersionParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetPipelineVersionParamsWithTimeout(timeout time.Duration) *GetPipelineVersionParams { - var () - return &GetPipelineVersionParams{ - - timeout: timeout, - } -} - -// NewGetPipelineVersionParamsWithContext creates a new GetPipelineVersionParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetPipelineVersionParamsWithContext(ctx context.Context) *GetPipelineVersionParams { - var () - return &GetPipelineVersionParams{ - - Context: ctx, - } -} - -// NewGetPipelineVersionParamsWithHTTPClient creates a new GetPipelineVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetPipelineVersionParamsWithHTTPClient(client *http.Client) *GetPipelineVersionParams { - var () - return &GetPipelineVersionParams{ - HTTPClient: client, - } -} - -/*GetPipelineVersionParams contains all the parameters to send to the API endpoint -for the get pipeline version operation typically these are written to a http.Request -*/ -type GetPipelineVersionParams struct { - - /*VersionID - The ID of the pipeline version to be retrieved. - - */ - VersionID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get pipeline version params -func (o *GetPipelineVersionParams) WithTimeout(timeout time.Duration) *GetPipelineVersionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get pipeline version params -func (o *GetPipelineVersionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get pipeline version params -func (o *GetPipelineVersionParams) WithContext(ctx context.Context) *GetPipelineVersionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get pipeline version params -func (o *GetPipelineVersionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get pipeline version params -func (o *GetPipelineVersionParams) WithHTTPClient(client *http.Client) *GetPipelineVersionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get pipeline version params -func (o *GetPipelineVersionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithVersionID adds the versionID to the get pipeline version params -func (o *GetPipelineVersionParams) WithVersionID(versionID string) *GetPipelineVersionParams { - o.SetVersionID(versionID) - return o -} - -// SetVersionID adds the versionId to the get pipeline version params -func (o *GetPipelineVersionParams) SetVersionID(versionID string) { - o.VersionID = versionID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPipelineVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param version_id - if err := r.SetPathParam("version_id", o.VersionID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_responses.go deleted file mode 100644 index e1efb8802b..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// GetPipelineVersionReader is a Reader for the GetPipelineVersion structure. -type GetPipelineVersionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewGetPipelineVersionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewGetPipelineVersionDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetPipelineVersionOK creates a GetPipelineVersionOK with default headers values -func NewGetPipelineVersionOK() *GetPipelineVersionOK { - return &GetPipelineVersionOK{} -} - -/*GetPipelineVersionOK handles this case with default header values. - -A successful response. -*/ -type GetPipelineVersionOK struct { - Payload *pipeline_model.V1PipelineVersion -} - -func (o *GetPipelineVersionOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}][%d] getPipelineVersionOK %+v", 200, o.Payload) -} - -func (o *GetPipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1PipelineVersion) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPipelineVersionDefault creates a GetPipelineVersionDefault with default headers values -func NewGetPipelineVersionDefault(code int) *GetPipelineVersionDefault { - return &GetPipelineVersionDefault{ - _statusCode: code, - } -} - -/*GetPipelineVersionDefault handles this case with default header values. - -GetPipelineVersionDefault get pipeline version default -*/ -type GetPipelineVersionDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the get pipeline version default response -func (o *GetPipelineVersionDefault) Code() int { - return o._statusCode -} - -func (o *GetPipelineVersionDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}][%d] GetPipelineVersion default %+v", o._statusCode, o.Payload) -} - -func (o *GetPipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_template_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_template_parameters.go deleted file mode 100644 index b5291d9d7a..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_template_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetPipelineVersionTemplateParams creates a new GetPipelineVersionTemplateParams object -// with the default values initialized. -func NewGetPipelineVersionTemplateParams() *GetPipelineVersionTemplateParams { - var () - return &GetPipelineVersionTemplateParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetPipelineVersionTemplateParamsWithTimeout creates a new GetPipelineVersionTemplateParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetPipelineVersionTemplateParamsWithTimeout(timeout time.Duration) *GetPipelineVersionTemplateParams { - var () - return &GetPipelineVersionTemplateParams{ - - timeout: timeout, - } -} - -// NewGetPipelineVersionTemplateParamsWithContext creates a new GetPipelineVersionTemplateParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetPipelineVersionTemplateParamsWithContext(ctx context.Context) *GetPipelineVersionTemplateParams { - var () - return &GetPipelineVersionTemplateParams{ - - Context: ctx, - } -} - -// NewGetPipelineVersionTemplateParamsWithHTTPClient creates a new GetPipelineVersionTemplateParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetPipelineVersionTemplateParamsWithHTTPClient(client *http.Client) *GetPipelineVersionTemplateParams { - var () - return &GetPipelineVersionTemplateParams{ - HTTPClient: client, - } -} - -/*GetPipelineVersionTemplateParams contains all the parameters to send to the API endpoint -for the get pipeline version template operation typically these are written to a http.Request -*/ -type GetPipelineVersionTemplateParams struct { - - /*VersionID - The ID of the pipeline version whose template is to be retrieved. - - */ - VersionID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get pipeline version template params -func (o *GetPipelineVersionTemplateParams) WithTimeout(timeout time.Duration) *GetPipelineVersionTemplateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get pipeline version template params -func (o *GetPipelineVersionTemplateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get pipeline version template params -func (o *GetPipelineVersionTemplateParams) WithContext(ctx context.Context) *GetPipelineVersionTemplateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get pipeline version template params -func (o *GetPipelineVersionTemplateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get pipeline version template params -func (o *GetPipelineVersionTemplateParams) WithHTTPClient(client *http.Client) *GetPipelineVersionTemplateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get pipeline version template params -func (o *GetPipelineVersionTemplateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithVersionID adds the versionID to the get pipeline version template params -func (o *GetPipelineVersionTemplateParams) WithVersionID(versionID string) *GetPipelineVersionTemplateParams { - o.SetVersionID(versionID) - return o -} - -// SetVersionID adds the versionId to the get pipeline version template params -func (o *GetPipelineVersionTemplateParams) SetVersionID(versionID string) { - o.VersionID = versionID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPipelineVersionTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param version_id - if err := r.SetPathParam("version_id", o.VersionID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_template_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_template_responses.go deleted file mode 100644 index 1f72cb696f..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_pipeline_version_template_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// GetPipelineVersionTemplateReader is a Reader for the GetPipelineVersionTemplate structure. -type GetPipelineVersionTemplateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPipelineVersionTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewGetPipelineVersionTemplateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewGetPipelineVersionTemplateDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetPipelineVersionTemplateOK creates a GetPipelineVersionTemplateOK with default headers values -func NewGetPipelineVersionTemplateOK() *GetPipelineVersionTemplateOK { - return &GetPipelineVersionTemplateOK{} -} - -/*GetPipelineVersionTemplateOK handles this case with default header values. - -A successful response. -*/ -type GetPipelineVersionTemplateOK struct { - Payload *pipeline_model.V1GetTemplateResponse -} - -func (o *GetPipelineVersionTemplateOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}/templates][%d] getPipelineVersionTemplateOK %+v", 200, o.Payload) -} - -func (o *GetPipelineVersionTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1GetTemplateResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPipelineVersionTemplateDefault creates a GetPipelineVersionTemplateDefault with default headers values -func NewGetPipelineVersionTemplateDefault(code int) *GetPipelineVersionTemplateDefault { - return &GetPipelineVersionTemplateDefault{ - _statusCode: code, - } -} - -/*GetPipelineVersionTemplateDefault handles this case with default header values. - -GetPipelineVersionTemplateDefault get pipeline version template default -*/ -type GetPipelineVersionTemplateDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the get pipeline version template default response -func (o *GetPipelineVersionTemplateDefault) Code() int { - return o._statusCode -} - -func (o *GetPipelineVersionTemplateDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}/templates][%d] GetPipelineVersionTemplate default %+v", o._statusCode, o.Payload) -} - -func (o *GetPipelineVersionTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_template_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_template_parameters.go deleted file mode 100644 index 684c1c11b9..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_template_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetTemplateParams creates a new GetTemplateParams object -// with the default values initialized. -func NewGetTemplateParams() *GetTemplateParams { - var () - return &GetTemplateParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetTemplateParamsWithTimeout creates a new GetTemplateParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetTemplateParamsWithTimeout(timeout time.Duration) *GetTemplateParams { - var () - return &GetTemplateParams{ - - timeout: timeout, - } -} - -// NewGetTemplateParamsWithContext creates a new GetTemplateParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetTemplateParamsWithContext(ctx context.Context) *GetTemplateParams { - var () - return &GetTemplateParams{ - - Context: ctx, - } -} - -// NewGetTemplateParamsWithHTTPClient creates a new GetTemplateParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetTemplateParamsWithHTTPClient(client *http.Client) *GetTemplateParams { - var () - return &GetTemplateParams{ - HTTPClient: client, - } -} - -/*GetTemplateParams contains all the parameters to send to the API endpoint -for the get template operation typically these are written to a http.Request -*/ -type GetTemplateParams struct { - - /*ID - The ID of the pipeline whose template is to be retrieved. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get template params -func (o *GetTemplateParams) WithTimeout(timeout time.Duration) *GetTemplateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get template params -func (o *GetTemplateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get template params -func (o *GetTemplateParams) WithContext(ctx context.Context) *GetTemplateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get template params -func (o *GetTemplateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get template params -func (o *GetTemplateParams) WithHTTPClient(client *http.Client) *GetTemplateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get template params -func (o *GetTemplateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the get template params -func (o *GetTemplateParams) WithID(id string) *GetTemplateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the get template params -func (o *GetTemplateParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *GetTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_template_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_template_responses.go deleted file mode 100644 index 15818aa89f..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/get_template_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// GetTemplateReader is a Reader for the GetTemplate structure. -type GetTemplateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewGetTemplateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewGetTemplateDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetTemplateOK creates a GetTemplateOK with default headers values -func NewGetTemplateOK() *GetTemplateOK { - return &GetTemplateOK{} -} - -/*GetTemplateOK handles this case with default header values. - -A successful response. -*/ -type GetTemplateOK struct { - Payload *pipeline_model.V1GetTemplateResponse -} - -func (o *GetTemplateOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipelines/{id}/templates][%d] getTemplateOK %+v", 200, o.Payload) -} - -func (o *GetTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1GetTemplateResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetTemplateDefault creates a GetTemplateDefault with default headers values -func NewGetTemplateDefault(code int) *GetTemplateDefault { - return &GetTemplateDefault{ - _statusCode: code, - } -} - -/*GetTemplateDefault handles this case with default header values. - -GetTemplateDefault get template default -*/ -type GetTemplateDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the get template default response -func (o *GetTemplateDefault) Code() int { - return o._statusCode -} - -func (o *GetTemplateDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipelines/{id}/templates][%d] GetTemplate default %+v", o._statusCode, o.Payload) -} - -func (o *GetTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipeline_versions_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipeline_versions_parameters.go deleted file mode 100644 index e47bb7b845..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipeline_versions_parameters.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewListPipelineVersionsParams creates a new ListPipelineVersionsParams object -// with the default values initialized. -func NewListPipelineVersionsParams() *ListPipelineVersionsParams { - var ( - resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListPipelineVersionsParams{ - ResourceKeyType: &resourceKeyTypeDefault, - - timeout: cr.DefaultTimeout, - } -} - -// NewListPipelineVersionsParamsWithTimeout creates a new ListPipelineVersionsParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewListPipelineVersionsParamsWithTimeout(timeout time.Duration) *ListPipelineVersionsParams { - var ( - resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListPipelineVersionsParams{ - ResourceKeyType: &resourceKeyTypeDefault, - - timeout: timeout, - } -} - -// NewListPipelineVersionsParamsWithContext creates a new ListPipelineVersionsParams object -// with the default values initialized, and the ability to set a context for a request -func NewListPipelineVersionsParamsWithContext(ctx context.Context) *ListPipelineVersionsParams { - var ( - resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListPipelineVersionsParams{ - ResourceKeyType: &resourceKeyTypeDefault, - - Context: ctx, - } -} - -// NewListPipelineVersionsParamsWithHTTPClient creates a new ListPipelineVersionsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewListPipelineVersionsParamsWithHTTPClient(client *http.Client) *ListPipelineVersionsParams { - var ( - resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListPipelineVersionsParams{ - ResourceKeyType: &resourceKeyTypeDefault, - HTTPClient: client, - } -} - -/*ListPipelineVersionsParams contains all the parameters to send to the API endpoint -for the list pipeline versions operation typically these are written to a http.Request -*/ -type ListPipelineVersionsParams struct { - - /*Filter - A base-64 encoded, JSON-serialized Filter protocol buffer (see - filter.proto). - - */ - Filter *string - /*PageSize - 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. - - */ - PageSize *int32 - /*PageToken - 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. - - */ - PageToken *string - /*ResourceKeyID - The ID of the resource that referred to. - - */ - ResourceKeyID *string - /*ResourceKeyType - The type of the resource that referred to. - - */ - ResourceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - Ascending by default. - - */ - SortBy *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the list pipeline versions params -func (o *ListPipelineVersionsParams) WithTimeout(timeout time.Duration) *ListPipelineVersionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list pipeline versions params -func (o *ListPipelineVersionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list pipeline versions params -func (o *ListPipelineVersionsParams) WithContext(ctx context.Context) *ListPipelineVersionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list pipeline versions params -func (o *ListPipelineVersionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list pipeline versions params -func (o *ListPipelineVersionsParams) WithHTTPClient(client *http.Client) *ListPipelineVersionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list pipeline versions params -func (o *ListPipelineVersionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFilter adds the filter to the list pipeline versions params -func (o *ListPipelineVersionsParams) WithFilter(filter *string) *ListPipelineVersionsParams { - o.SetFilter(filter) - return o -} - -// SetFilter adds the filter to the list pipeline versions params -func (o *ListPipelineVersionsParams) SetFilter(filter *string) { - o.Filter = filter -} - -// WithPageSize adds the pageSize to the list pipeline versions params -func (o *ListPipelineVersionsParams) WithPageSize(pageSize *int32) *ListPipelineVersionsParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the list pipeline versions params -func (o *ListPipelineVersionsParams) SetPageSize(pageSize *int32) { - o.PageSize = pageSize -} - -// WithPageToken adds the pageToken to the list pipeline versions params -func (o *ListPipelineVersionsParams) WithPageToken(pageToken *string) *ListPipelineVersionsParams { - o.SetPageToken(pageToken) - return o -} - -// SetPageToken adds the pageToken to the list pipeline versions params -func (o *ListPipelineVersionsParams) SetPageToken(pageToken *string) { - o.PageToken = pageToken -} - -// WithResourceKeyID adds the resourceKeyID to the list pipeline versions params -func (o *ListPipelineVersionsParams) WithResourceKeyID(resourceKeyID *string) *ListPipelineVersionsParams { - o.SetResourceKeyID(resourceKeyID) - return o -} - -// SetResourceKeyID adds the resourceKeyId to the list pipeline versions params -func (o *ListPipelineVersionsParams) SetResourceKeyID(resourceKeyID *string) { - o.ResourceKeyID = resourceKeyID -} - -// WithResourceKeyType adds the resourceKeyType to the list pipeline versions params -func (o *ListPipelineVersionsParams) WithResourceKeyType(resourceKeyType *string) *ListPipelineVersionsParams { - o.SetResourceKeyType(resourceKeyType) - return o -} - -// SetResourceKeyType adds the resourceKeyType to the list pipeline versions params -func (o *ListPipelineVersionsParams) SetResourceKeyType(resourceKeyType *string) { - o.ResourceKeyType = resourceKeyType -} - -// WithSortBy adds the sortBy to the list pipeline versions params -func (o *ListPipelineVersionsParams) WithSortBy(sortBy *string) *ListPipelineVersionsParams { - o.SetSortBy(sortBy) - return o -} - -// SetSortBy adds the sortBy to the list pipeline versions params -func (o *ListPipelineVersionsParams) SetSortBy(sortBy *string) { - o.SortBy = sortBy -} - -// WriteToRequest writes these params to a swagger request -func (o *ListPipelineVersionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Filter != nil { - - // query param filter - var qrFilter string - if o.Filter != nil { - qrFilter = *o.Filter - } - qFilter := qrFilter - if qFilter != "" { - if err := r.SetQueryParam("filter", qFilter); err != nil { - return err - } - } - - } - - if o.PageSize != nil { - - // query param page_size - var qrPageSize int32 - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt32(qrPageSize) - if qPageSize != "" { - if err := r.SetQueryParam("page_size", qPageSize); err != nil { - return err - } - } - - } - - if o.PageToken != nil { - - // query param page_token - var qrPageToken string - if o.PageToken != nil { - qrPageToken = *o.PageToken - } - qPageToken := qrPageToken - if qPageToken != "" { - if err := r.SetQueryParam("page_token", qPageToken); err != nil { - return err - } - } - - } - - if o.ResourceKeyID != nil { - - // query param resource_key.id - var qrResourceKeyID string - if o.ResourceKeyID != nil { - qrResourceKeyID = *o.ResourceKeyID - } - qResourceKeyID := qrResourceKeyID - if qResourceKeyID != "" { - if err := r.SetQueryParam("resource_key.id", qResourceKeyID); err != nil { - return err - } - } - - } - - if o.ResourceKeyType != nil { - - // query param resource_key.type - var qrResourceKeyType string - if o.ResourceKeyType != nil { - qrResourceKeyType = *o.ResourceKeyType - } - qResourceKeyType := qrResourceKeyType - if qResourceKeyType != "" { - if err := r.SetQueryParam("resource_key.type", qResourceKeyType); err != nil { - return err - } - } - - } - - if o.SortBy != nil { - - // query param sort_by - var qrSortBy string - if o.SortBy != nil { - qrSortBy = *o.SortBy - } - qSortBy := qrSortBy - if qSortBy != "" { - if err := r.SetQueryParam("sort_by", qSortBy); err != nil { - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipeline_versions_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipeline_versions_responses.go deleted file mode 100644 index a351b33459..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipeline_versions_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// ListPipelineVersionsReader is a Reader for the ListPipelineVersions structure. -type ListPipelineVersionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListPipelineVersionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewListPipelineVersionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewListPipelineVersionsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListPipelineVersionsOK creates a ListPipelineVersionsOK with default headers values -func NewListPipelineVersionsOK() *ListPipelineVersionsOK { - return &ListPipelineVersionsOK{} -} - -/*ListPipelineVersionsOK handles this case with default header values. - -A successful response. -*/ -type ListPipelineVersionsOK struct { - Payload *pipeline_model.V1ListPipelineVersionsResponse -} - -func (o *ListPipelineVersionsOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipeline_versions][%d] listPipelineVersionsOK %+v", 200, o.Payload) -} - -func (o *ListPipelineVersionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1ListPipelineVersionsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListPipelineVersionsDefault creates a ListPipelineVersionsDefault with default headers values -func NewListPipelineVersionsDefault(code int) *ListPipelineVersionsDefault { - return &ListPipelineVersionsDefault{ - _statusCode: code, - } -} - -/*ListPipelineVersionsDefault handles this case with default header values. - -ListPipelineVersionsDefault list pipeline versions default -*/ -type ListPipelineVersionsDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the list pipeline versions default response -func (o *ListPipelineVersionsDefault) Code() int { - return o._statusCode -} - -func (o *ListPipelineVersionsDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipeline_versions][%d] ListPipelineVersions default %+v", o._statusCode, o.Payload) -} - -func (o *ListPipelineVersionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipelines_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipelines_parameters.go deleted file mode 100644 index f402e5369b..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipelines_parameters.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewListPipelinesParams creates a new ListPipelinesParams object -// with the default values initialized. -func NewListPipelinesParams() *ListPipelinesParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListPipelinesParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - timeout: cr.DefaultTimeout, - } -} - -// NewListPipelinesParamsWithTimeout creates a new ListPipelinesParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewListPipelinesParamsWithTimeout(timeout time.Duration) *ListPipelinesParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListPipelinesParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - timeout: timeout, - } -} - -// NewListPipelinesParamsWithContext creates a new ListPipelinesParams object -// with the default values initialized, and the ability to set a context for a request -func NewListPipelinesParamsWithContext(ctx context.Context) *ListPipelinesParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListPipelinesParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - Context: ctx, - } -} - -// NewListPipelinesParamsWithHTTPClient creates a new ListPipelinesParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewListPipelinesParamsWithHTTPClient(client *http.Client) *ListPipelinesParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListPipelinesParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - HTTPClient: client, - } -} - -/*ListPipelinesParams contains all the parameters to send to the API endpoint -for the list pipelines operation typically these are written to a http.Request -*/ -type ListPipelinesParams struct { - - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). - - */ - Filter *string - /*PageSize - 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. - - */ - PageSize *int32 - /*PageToken - 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. - - */ - PageToken *string - /*ResourceReferenceKeyID - The ID of the resource that referred to. - - */ - ResourceReferenceKeyID *string - /*ResourceReferenceKeyType - The type of the resource that referred to. - - */ - ResourceReferenceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - Ascending by default. - - */ - SortBy *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the list pipelines params -func (o *ListPipelinesParams) WithTimeout(timeout time.Duration) *ListPipelinesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list pipelines params -func (o *ListPipelinesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list pipelines params -func (o *ListPipelinesParams) WithContext(ctx context.Context) *ListPipelinesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list pipelines params -func (o *ListPipelinesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list pipelines params -func (o *ListPipelinesParams) WithHTTPClient(client *http.Client) *ListPipelinesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list pipelines params -func (o *ListPipelinesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFilter adds the filter to the list pipelines params -func (o *ListPipelinesParams) WithFilter(filter *string) *ListPipelinesParams { - o.SetFilter(filter) - return o -} - -// SetFilter adds the filter to the list pipelines params -func (o *ListPipelinesParams) SetFilter(filter *string) { - o.Filter = filter -} - -// WithPageSize adds the pageSize to the list pipelines params -func (o *ListPipelinesParams) WithPageSize(pageSize *int32) *ListPipelinesParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the list pipelines params -func (o *ListPipelinesParams) SetPageSize(pageSize *int32) { - o.PageSize = pageSize -} - -// WithPageToken adds the pageToken to the list pipelines params -func (o *ListPipelinesParams) WithPageToken(pageToken *string) *ListPipelinesParams { - o.SetPageToken(pageToken) - return o -} - -// SetPageToken adds the pageToken to the list pipelines params -func (o *ListPipelinesParams) SetPageToken(pageToken *string) { - o.PageToken = pageToken -} - -// WithResourceReferenceKeyID adds the resourceReferenceKeyID to the list pipelines params -func (o *ListPipelinesParams) WithResourceReferenceKeyID(resourceReferenceKeyID *string) *ListPipelinesParams { - o.SetResourceReferenceKeyID(resourceReferenceKeyID) - return o -} - -// SetResourceReferenceKeyID adds the resourceReferenceKeyId to the list pipelines params -func (o *ListPipelinesParams) SetResourceReferenceKeyID(resourceReferenceKeyID *string) { - o.ResourceReferenceKeyID = resourceReferenceKeyID -} - -// WithResourceReferenceKeyType adds the resourceReferenceKeyType to the list pipelines params -func (o *ListPipelinesParams) WithResourceReferenceKeyType(resourceReferenceKeyType *string) *ListPipelinesParams { - o.SetResourceReferenceKeyType(resourceReferenceKeyType) - return o -} - -// SetResourceReferenceKeyType adds the resourceReferenceKeyType to the list pipelines params -func (o *ListPipelinesParams) SetResourceReferenceKeyType(resourceReferenceKeyType *string) { - o.ResourceReferenceKeyType = resourceReferenceKeyType -} - -// WithSortBy adds the sortBy to the list pipelines params -func (o *ListPipelinesParams) WithSortBy(sortBy *string) *ListPipelinesParams { - o.SetSortBy(sortBy) - return o -} - -// SetSortBy adds the sortBy to the list pipelines params -func (o *ListPipelinesParams) SetSortBy(sortBy *string) { - o.SortBy = sortBy -} - -// WriteToRequest writes these params to a swagger request -func (o *ListPipelinesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Filter != nil { - - // query param filter - var qrFilter string - if o.Filter != nil { - qrFilter = *o.Filter - } - qFilter := qrFilter - if qFilter != "" { - if err := r.SetQueryParam("filter", qFilter); err != nil { - return err - } - } - - } - - if o.PageSize != nil { - - // query param page_size - var qrPageSize int32 - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt32(qrPageSize) - if qPageSize != "" { - if err := r.SetQueryParam("page_size", qPageSize); err != nil { - return err - } - } - - } - - if o.PageToken != nil { - - // query param page_token - var qrPageToken string - if o.PageToken != nil { - qrPageToken = *o.PageToken - } - qPageToken := qrPageToken - if qPageToken != "" { - if err := r.SetQueryParam("page_token", qPageToken); err != nil { - return err - } - } - - } - - if o.ResourceReferenceKeyID != nil { - - // query param resource_reference_key.id - var qrResourceReferenceKeyID string - if o.ResourceReferenceKeyID != nil { - qrResourceReferenceKeyID = *o.ResourceReferenceKeyID - } - qResourceReferenceKeyID := qrResourceReferenceKeyID - if qResourceReferenceKeyID != "" { - if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { - return err - } - } - - } - - if o.ResourceReferenceKeyType != nil { - - // query param resource_reference_key.type - var qrResourceReferenceKeyType string - if o.ResourceReferenceKeyType != nil { - qrResourceReferenceKeyType = *o.ResourceReferenceKeyType - } - qResourceReferenceKeyType := qrResourceReferenceKeyType - if qResourceReferenceKeyType != "" { - if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { - return err - } - } - - } - - if o.SortBy != nil { - - // query param sort_by - var qrSortBy string - if o.SortBy != nil { - qrSortBy = *o.SortBy - } - qSortBy := qrSortBy - if qSortBy != "" { - if err := r.SetQueryParam("sort_by", qSortBy); err != nil { - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipelines_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipelines_responses.go deleted file mode 100644 index e6940658a9..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/list_pipelines_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// ListPipelinesReader is a Reader for the ListPipelines structure. -type ListPipelinesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListPipelinesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewListPipelinesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewListPipelinesDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListPipelinesOK creates a ListPipelinesOK with default headers values -func NewListPipelinesOK() *ListPipelinesOK { - return &ListPipelinesOK{} -} - -/*ListPipelinesOK handles this case with default header values. - -A successful response. -*/ -type ListPipelinesOK struct { - Payload *pipeline_model.V1ListPipelinesResponse -} - -func (o *ListPipelinesOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipelines][%d] listPipelinesOK %+v", 200, o.Payload) -} - -func (o *ListPipelinesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1ListPipelinesResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListPipelinesDefault creates a ListPipelinesDefault with default headers values -func NewListPipelinesDefault(code int) *ListPipelinesDefault { - return &ListPipelinesDefault{ - _statusCode: code, - } -} - -/*ListPipelinesDefault handles this case with default header values. - -ListPipelinesDefault list pipelines default -*/ -type ListPipelinesDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the list pipelines default response -func (o *ListPipelinesDefault) Code() int { - return o._statusCode -} - -func (o *ListPipelinesDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/pipelines][%d] ListPipelines default %+v", o._statusCode, o.Payload) -} - -func (o *ListPipelinesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go index 2a6afa894d..0a3e2d6ce2 100644 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go @@ -7,12 +7,11 @@ package pipeline_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) // New creates a new pipeline service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -24,323 +23,452 @@ type Client struct { formats strfmt.Registry } +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + PipelineServiceCreatePipeline(params *PipelineServiceCreatePipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineOK, error) + + PipelineServiceCreatePipelineVersion(params *PipelineServiceCreatePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineVersionOK, error) + + PipelineServiceDeletePipeline(params *PipelineServiceDeletePipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineOK, error) + + PipelineServiceDeletePipelineVersion(params *PipelineServiceDeletePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineVersionOK, error) + + PipelineServiceGetPipeline(params *PipelineServiceGetPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineOK, error) + + PipelineServiceGetPipelineVersion(params *PipelineServiceGetPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionOK, error) + + PipelineServiceGetPipelineVersionTemplate(params *PipelineServiceGetPipelineVersionTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionTemplateOK, error) + + PipelineServiceGetTemplate(params *PipelineServiceGetTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetTemplateOK, error) + + PipelineServiceListPipelineVersions(params *PipelineServiceListPipelineVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelineVersionsOK, error) + + PipelineServiceListPipelines(params *PipelineServiceListPipelinesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelinesOK, error) + + PipelineServiceUpdatePipelineDefaultVersion(params *PipelineServiceUpdatePipelineDefaultVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceUpdatePipelineDefaultVersionOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -CreatePipeline creates a pipeline +PipelineServiceCreatePipeline creates a pipeline */ -func (a *Client) CreatePipeline(params *CreatePipelineParams, authInfo runtime.ClientAuthInfoWriter) (*CreatePipelineOK, error) { +func (a *Client) PipelineServiceCreatePipeline(params *PipelineServiceCreatePipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewCreatePipelineParams() + params = NewPipelineServiceCreatePipelineParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "CreatePipeline", + op := &runtime.ClientOperation{ + ID: "PipelineService_CreatePipeline", Method: "POST", PathPattern: "/apis/v1/pipelines", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &CreatePipelineReader{formats: a.formats}, + Reader: &PipelineServiceCreatePipelineReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*CreatePipelineOK), nil - + success, ok := result.(*PipelineServiceCreatePipelineOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceCreatePipelineDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -CreatePipelineVersion adds a pipeline version to the specified pipeline +PipelineServiceCreatePipelineVersion adds a pipeline version to the specified pipeline */ -func (a *Client) CreatePipelineVersion(params *CreatePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter) (*CreatePipelineVersionOK, error) { +func (a *Client) PipelineServiceCreatePipelineVersion(params *PipelineServiceCreatePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineVersionOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewCreatePipelineVersionParams() + params = NewPipelineServiceCreatePipelineVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "CreatePipelineVersion", + op := &runtime.ClientOperation{ + ID: "PipelineService_CreatePipelineVersion", Method: "POST", PathPattern: "/apis/v1/pipeline_versions", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &CreatePipelineVersionReader{formats: a.formats}, + Reader: &PipelineServiceCreatePipelineVersionReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*CreatePipelineVersionOK), nil - + success, ok := result.(*PipelineServiceCreatePipelineVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceCreatePipelineVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -DeletePipeline deletes a pipeline and its pipeline versions +PipelineServiceDeletePipeline deletes a pipeline and its pipeline versions */ -func (a *Client) DeletePipeline(params *DeletePipelineParams, authInfo runtime.ClientAuthInfoWriter) (*DeletePipelineOK, error) { +func (a *Client) PipelineServiceDeletePipeline(params *PipelineServiceDeletePipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDeletePipelineParams() + params = NewPipelineServiceDeletePipelineParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "DeletePipeline", + op := &runtime.ClientOperation{ + ID: "PipelineService_DeletePipeline", Method: "DELETE", PathPattern: "/apis/v1/pipelines/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &DeletePipelineReader{formats: a.formats}, + Reader: &PipelineServiceDeletePipelineReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*DeletePipelineOK), nil - + success, ok := result.(*PipelineServiceDeletePipelineOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceDeletePipelineDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -DeletePipelineVersion 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 +PipelineServiceDeletePipelineVersion 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 */ -func (a *Client) DeletePipelineVersion(params *DeletePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter) (*DeletePipelineVersionOK, error) { +func (a *Client) PipelineServiceDeletePipelineVersion(params *PipelineServiceDeletePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineVersionOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDeletePipelineVersionParams() + params = NewPipelineServiceDeletePipelineVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "DeletePipelineVersion", + op := &runtime.ClientOperation{ + ID: "PipelineService_DeletePipelineVersion", Method: "DELETE", PathPattern: "/apis/v1/pipeline_versions/{version_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &DeletePipelineVersionReader{formats: a.formats}, + Reader: &PipelineServiceDeletePipelineVersionReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*DeletePipelineVersionOK), nil - + success, ok := result.(*PipelineServiceDeletePipelineVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceDeletePipelineVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -GetPipeline finds a specific pipeline by ID +PipelineServiceGetPipeline finds a specific pipeline by ID */ -func (a *Client) GetPipeline(params *GetPipelineParams, authInfo runtime.ClientAuthInfoWriter) (*GetPipelineOK, error) { +func (a *Client) PipelineServiceGetPipeline(params *PipelineServiceGetPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewGetPipelineParams() + params = NewPipelineServiceGetPipelineParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetPipeline", + op := &runtime.ClientOperation{ + ID: "PipelineService_GetPipeline", Method: "GET", PathPattern: "/apis/v1/pipelines/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &GetPipelineReader{formats: a.formats}, + Reader: &PipelineServiceGetPipelineReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*GetPipelineOK), nil - + success, ok := result.(*PipelineServiceGetPipelineOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -GetPipelineVersion gets a pipeline version by pipeline version ID +PipelineServiceGetPipelineVersion gets a pipeline version by pipeline version ID */ -func (a *Client) GetPipelineVersion(params *GetPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter) (*GetPipelineVersionOK, error) { +func (a *Client) PipelineServiceGetPipelineVersion(params *PipelineServiceGetPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewGetPipelineVersionParams() + params = NewPipelineServiceGetPipelineVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetPipelineVersion", + op := &runtime.ClientOperation{ + ID: "PipelineService_GetPipelineVersion", Method: "GET", PathPattern: "/apis/v1/pipeline_versions/{version_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &GetPipelineVersionReader{formats: a.formats}, + Reader: &PipelineServiceGetPipelineVersionReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*GetPipelineVersionOK), nil - + success, ok := result.(*PipelineServiceGetPipelineVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -GetPipelineVersionTemplate returns a y a m l template that contains the specified pipeline version s description parameters and metadata +PipelineServiceGetPipelineVersionTemplate returns a y a m l template that contains the specified pipeline version s description parameters and metadata */ -func (a *Client) GetPipelineVersionTemplate(params *GetPipelineVersionTemplateParams, authInfo runtime.ClientAuthInfoWriter) (*GetPipelineVersionTemplateOK, error) { +func (a *Client) PipelineServiceGetPipelineVersionTemplate(params *PipelineServiceGetPipelineVersionTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionTemplateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewGetPipelineVersionTemplateParams() + params = NewPipelineServiceGetPipelineVersionTemplateParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetPipelineVersionTemplate", + op := &runtime.ClientOperation{ + ID: "PipelineService_GetPipelineVersionTemplate", Method: "GET", PathPattern: "/apis/v1/pipeline_versions/{version_id}/templates", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &GetPipelineVersionTemplateReader{formats: a.formats}, + Reader: &PipelineServiceGetPipelineVersionTemplateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*GetPipelineVersionTemplateOK), nil - + success, ok := result.(*PipelineServiceGetPipelineVersionTemplateOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineVersionTemplateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -GetTemplate returns a single y a m l template that contains the description parameters and metadata associated with the pipeline provided +PipelineServiceGetTemplate returns a single y a m l template that contains the description parameters and metadata associated with the pipeline provided */ -func (a *Client) GetTemplate(params *GetTemplateParams, authInfo runtime.ClientAuthInfoWriter) (*GetTemplateOK, error) { +func (a *Client) PipelineServiceGetTemplate(params *PipelineServiceGetTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetTemplateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewGetTemplateParams() + params = NewPipelineServiceGetTemplateParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetTemplate", + op := &runtime.ClientOperation{ + ID: "PipelineService_GetTemplate", Method: "GET", PathPattern: "/apis/v1/pipelines/{id}/templates", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &GetTemplateReader{formats: a.formats}, + Reader: &PipelineServiceGetTemplateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*GetTemplateOK), nil - + success, ok := result.(*PipelineServiceGetTemplateOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetTemplateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ListPipelineVersions lists all pipeline versions of a given pipeline +PipelineServiceListPipelineVersions lists all pipeline versions of a given pipeline */ -func (a *Client) ListPipelineVersions(params *ListPipelineVersionsParams, authInfo runtime.ClientAuthInfoWriter) (*ListPipelineVersionsOK, error) { +func (a *Client) PipelineServiceListPipelineVersions(params *PipelineServiceListPipelineVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelineVersionsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewListPipelineVersionsParams() + params = NewPipelineServiceListPipelineVersionsParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ListPipelineVersions", + op := &runtime.ClientOperation{ + ID: "PipelineService_ListPipelineVersions", Method: "GET", PathPattern: "/apis/v1/pipeline_versions", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &ListPipelineVersionsReader{formats: a.formats}, + Reader: &PipelineServiceListPipelineVersionsReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ListPipelineVersionsOK), nil - + success, ok := result.(*PipelineServiceListPipelineVersionsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceListPipelineVersionsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ListPipelines finds all pipelines +PipelineServiceListPipelines finds all pipelines */ -func (a *Client) ListPipelines(params *ListPipelinesParams, authInfo runtime.ClientAuthInfoWriter) (*ListPipelinesOK, error) { +func (a *Client) PipelineServiceListPipelines(params *PipelineServiceListPipelinesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelinesOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewListPipelinesParams() + params = NewPipelineServiceListPipelinesParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ListPipelines", + op := &runtime.ClientOperation{ + ID: "PipelineService_ListPipelines", Method: "GET", PathPattern: "/apis/v1/pipelines", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &ListPipelinesReader{formats: a.formats}, + Reader: &PipelineServiceListPipelinesReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ListPipelinesOK), nil - + success, ok := result.(*PipelineServiceListPipelinesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceListPipelinesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -UpdatePipelineDefaultVersion updates the default pipeline version of a specific pipeline +PipelineServiceUpdatePipelineDefaultVersion updates the default pipeline version of a specific pipeline */ -func (a *Client) UpdatePipelineDefaultVersion(params *UpdatePipelineDefaultVersionParams, authInfo runtime.ClientAuthInfoWriter) (*UpdatePipelineDefaultVersionOK, error) { +func (a *Client) PipelineServiceUpdatePipelineDefaultVersion(params *PipelineServiceUpdatePipelineDefaultVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceUpdatePipelineDefaultVersionOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewUpdatePipelineDefaultVersionParams() + params = NewPipelineServiceUpdatePipelineDefaultVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "UpdatePipelineDefaultVersion", + op := &runtime.ClientOperation{ + ID: "PipelineService_UpdatePipelineDefaultVersion", Method: "POST", PathPattern: "/apis/v1/pipelines/{pipeline_id}/default_version/{version_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &UpdatePipelineDefaultVersionReader{formats: a.formats}, + Reader: &PipelineServiceUpdatePipelineDefaultVersionReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*UpdatePipelineDefaultVersionOK), nil - + success, ok := result.(*PipelineServiceUpdatePipelineDefaultVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceUpdatePipelineDefaultVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_parameters.go new file mode 100644 index 0000000000..59efb455bc --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// NewPipelineServiceCreatePipelineParams creates a new PipelineServiceCreatePipelineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceCreatePipelineParams() *PipelineServiceCreatePipelineParams { + return &PipelineServiceCreatePipelineParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceCreatePipelineParamsWithTimeout creates a new PipelineServiceCreatePipelineParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceCreatePipelineParamsWithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineParams { + return &PipelineServiceCreatePipelineParams{ + timeout: timeout, + } +} + +// NewPipelineServiceCreatePipelineParamsWithContext creates a new PipelineServiceCreatePipelineParams object +// with the ability to set a context for a request. +func NewPipelineServiceCreatePipelineParamsWithContext(ctx context.Context) *PipelineServiceCreatePipelineParams { + return &PipelineServiceCreatePipelineParams{ + Context: ctx, + } +} + +// NewPipelineServiceCreatePipelineParamsWithHTTPClient creates a new PipelineServiceCreatePipelineParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceCreatePipelineParamsWithHTTPClient(client *http.Client) *PipelineServiceCreatePipelineParams { + return &PipelineServiceCreatePipelineParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceCreatePipelineParams contains all the parameters to send to the API endpoint + + for the pipeline service create pipeline operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceCreatePipelineParams struct { + + // Pipeline. + Pipeline *pipeline_model.V1Pipeline + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service create pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineParams) WithDefaults() *PipelineServiceCreatePipelineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service create pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) WithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) WithContext(ctx context.Context) *PipelineServiceCreatePipelineParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) WithHTTPClient(client *http.Client) *PipelineServiceCreatePipelineParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPipeline adds the pipeline to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) WithPipeline(pipeline *pipeline_model.V1Pipeline) *PipelineServiceCreatePipelineParams { + o.SetPipeline(pipeline) + return o +} + +// SetPipeline adds the pipeline to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) SetPipeline(pipeline *pipeline_model.V1Pipeline) { + o.Pipeline = pipeline +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceCreatePipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Pipeline != nil { + if err := r.SetBodyParam(o.Pipeline); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_responses.go new file mode 100644 index 0000000000..193172ebe0 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceCreatePipelineReader is a Reader for the PipelineServiceCreatePipeline structure. +type PipelineServiceCreatePipelineReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceCreatePipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceCreatePipelineOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceCreatePipelineDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceCreatePipelineOK creates a PipelineServiceCreatePipelineOK with default headers values +func NewPipelineServiceCreatePipelineOK() *PipelineServiceCreatePipelineOK { + return &PipelineServiceCreatePipelineOK{} +} + +/* +PipelineServiceCreatePipelineOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceCreatePipelineOK struct { + Payload *pipeline_model.V1Pipeline +} + +// IsSuccess returns true when this pipeline service create pipeline o k response has a 2xx status code +func (o *PipelineServiceCreatePipelineOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service create pipeline o k response has a 3xx status code +func (o *PipelineServiceCreatePipelineOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service create pipeline o k response has a 4xx status code +func (o *PipelineServiceCreatePipelineOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service create pipeline o k response has a 5xx status code +func (o *PipelineServiceCreatePipelineOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service create pipeline o k response a status code equal to that given +func (o *PipelineServiceCreatePipelineOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service create pipeline o k response +func (o *PipelineServiceCreatePipelineOK) Code() int { + return 200 +} + +func (o *PipelineServiceCreatePipelineOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipelines][%d] pipelineServiceCreatePipelineOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceCreatePipelineOK) String() string { + return fmt.Sprintf("[POST /apis/v1/pipelines][%d] pipelineServiceCreatePipelineOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceCreatePipelineOK) GetPayload() *pipeline_model.V1Pipeline { + return o.Payload +} + +func (o *PipelineServiceCreatePipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.V1Pipeline) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceCreatePipelineDefault creates a PipelineServiceCreatePipelineDefault with default headers values +func NewPipelineServiceCreatePipelineDefault(code int) *PipelineServiceCreatePipelineDefault { + return &PipelineServiceCreatePipelineDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceCreatePipelineDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceCreatePipelineDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service create pipeline default response has a 2xx status code +func (o *PipelineServiceCreatePipelineDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service create pipeline default response has a 3xx status code +func (o *PipelineServiceCreatePipelineDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service create pipeline default response has a 4xx status code +func (o *PipelineServiceCreatePipelineDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service create pipeline default response has a 5xx status code +func (o *PipelineServiceCreatePipelineDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service create pipeline default response a status code equal to that given +func (o *PipelineServiceCreatePipelineDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service create pipeline default response +func (o *PipelineServiceCreatePipelineDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceCreatePipelineDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipelines][%d] PipelineService_CreatePipeline default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceCreatePipelineDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/pipelines][%d] PipelineService_CreatePipeline default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceCreatePipelineDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceCreatePipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_parameters.go new file mode 100644 index 0000000000..4c338e0288 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// NewPipelineServiceCreatePipelineVersionParams creates a new PipelineServiceCreatePipelineVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceCreatePipelineVersionParams() *PipelineServiceCreatePipelineVersionParams { + return &PipelineServiceCreatePipelineVersionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceCreatePipelineVersionParamsWithTimeout creates a new PipelineServiceCreatePipelineVersionParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceCreatePipelineVersionParamsWithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineVersionParams { + return &PipelineServiceCreatePipelineVersionParams{ + timeout: timeout, + } +} + +// NewPipelineServiceCreatePipelineVersionParamsWithContext creates a new PipelineServiceCreatePipelineVersionParams object +// with the ability to set a context for a request. +func NewPipelineServiceCreatePipelineVersionParamsWithContext(ctx context.Context) *PipelineServiceCreatePipelineVersionParams { + return &PipelineServiceCreatePipelineVersionParams{ + Context: ctx, + } +} + +// NewPipelineServiceCreatePipelineVersionParamsWithHTTPClient creates a new PipelineServiceCreatePipelineVersionParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceCreatePipelineVersionParamsWithHTTPClient(client *http.Client) *PipelineServiceCreatePipelineVersionParams { + return &PipelineServiceCreatePipelineVersionParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceCreatePipelineVersionParams contains all the parameters to send to the API endpoint + + for the pipeline service create pipeline version operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceCreatePipelineVersionParams struct { + + /* Version. + + ResourceReference inside PipelineVersion specifies the pipeline that this + version belongs to. + */ + Version *pipeline_model.V1PipelineVersion + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service create pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineVersionParams) WithDefaults() *PipelineServiceCreatePipelineVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service create pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineVersionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) WithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineVersionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) WithContext(ctx context.Context) *PipelineServiceCreatePipelineVersionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) WithHTTPClient(client *http.Client) *PipelineServiceCreatePipelineVersionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithVersion adds the version to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) WithVersion(version *pipeline_model.V1PipelineVersion) *PipelineServiceCreatePipelineVersionParams { + o.SetVersion(version) + return o +} + +// SetVersion adds the version to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) SetVersion(version *pipeline_model.V1PipelineVersion) { + o.Version = version +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceCreatePipelineVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Version != nil { + if err := r.SetBodyParam(o.Version); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_responses.go new file mode 100644 index 0000000000..2e75acdc5d --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceCreatePipelineVersionReader is a Reader for the PipelineServiceCreatePipelineVersion structure. +type PipelineServiceCreatePipelineVersionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceCreatePipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceCreatePipelineVersionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceCreatePipelineVersionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceCreatePipelineVersionOK creates a PipelineServiceCreatePipelineVersionOK with default headers values +func NewPipelineServiceCreatePipelineVersionOK() *PipelineServiceCreatePipelineVersionOK { + return &PipelineServiceCreatePipelineVersionOK{} +} + +/* +PipelineServiceCreatePipelineVersionOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceCreatePipelineVersionOK struct { + Payload *pipeline_model.V1PipelineVersion +} + +// IsSuccess returns true when this pipeline service create pipeline version o k response has a 2xx status code +func (o *PipelineServiceCreatePipelineVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service create pipeline version o k response has a 3xx status code +func (o *PipelineServiceCreatePipelineVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service create pipeline version o k response has a 4xx status code +func (o *PipelineServiceCreatePipelineVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service create pipeline version o k response has a 5xx status code +func (o *PipelineServiceCreatePipelineVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service create pipeline version o k response a status code equal to that given +func (o *PipelineServiceCreatePipelineVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service create pipeline version o k response +func (o *PipelineServiceCreatePipelineVersionOK) Code() int { + return 200 +} + +func (o *PipelineServiceCreatePipelineVersionOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipeline_versions][%d] pipelineServiceCreatePipelineVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceCreatePipelineVersionOK) String() string { + return fmt.Sprintf("[POST /apis/v1/pipeline_versions][%d] pipelineServiceCreatePipelineVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceCreatePipelineVersionOK) GetPayload() *pipeline_model.V1PipelineVersion { + return o.Payload +} + +func (o *PipelineServiceCreatePipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.V1PipelineVersion) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceCreatePipelineVersionDefault creates a PipelineServiceCreatePipelineVersionDefault with default headers values +func NewPipelineServiceCreatePipelineVersionDefault(code int) *PipelineServiceCreatePipelineVersionDefault { + return &PipelineServiceCreatePipelineVersionDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceCreatePipelineVersionDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceCreatePipelineVersionDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service create pipeline version default response has a 2xx status code +func (o *PipelineServiceCreatePipelineVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service create pipeline version default response has a 3xx status code +func (o *PipelineServiceCreatePipelineVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service create pipeline version default response has a 4xx status code +func (o *PipelineServiceCreatePipelineVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service create pipeline version default response has a 5xx status code +func (o *PipelineServiceCreatePipelineVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service create pipeline version default response a status code equal to that given +func (o *PipelineServiceCreatePipelineVersionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service create pipeline version default response +func (o *PipelineServiceCreatePipelineVersionDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceCreatePipelineVersionDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipeline_versions][%d] PipelineService_CreatePipelineVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceCreatePipelineVersionDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/pipeline_versions][%d] PipelineService_CreatePipelineVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceCreatePipelineVersionDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceCreatePipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_parameters.go new file mode 100644 index 0000000000..7a2f5a22f1 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPipelineServiceDeletePipelineParams creates a new PipelineServiceDeletePipelineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceDeletePipelineParams() *PipelineServiceDeletePipelineParams { + return &PipelineServiceDeletePipelineParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceDeletePipelineParamsWithTimeout creates a new PipelineServiceDeletePipelineParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceDeletePipelineParamsWithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineParams { + return &PipelineServiceDeletePipelineParams{ + timeout: timeout, + } +} + +// NewPipelineServiceDeletePipelineParamsWithContext creates a new PipelineServiceDeletePipelineParams object +// with the ability to set a context for a request. +func NewPipelineServiceDeletePipelineParamsWithContext(ctx context.Context) *PipelineServiceDeletePipelineParams { + return &PipelineServiceDeletePipelineParams{ + Context: ctx, + } +} + +// NewPipelineServiceDeletePipelineParamsWithHTTPClient creates a new PipelineServiceDeletePipelineParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceDeletePipelineParamsWithHTTPClient(client *http.Client) *PipelineServiceDeletePipelineParams { + return &PipelineServiceDeletePipelineParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceDeletePipelineParams contains all the parameters to send to the API endpoint + + for the pipeline service delete pipeline operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceDeletePipelineParams struct { + + /* ID. + + The ID of the pipeline to be deleted. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service delete pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineParams) WithDefaults() *PipelineServiceDeletePipelineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service delete pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service delete pipeline params +func (o *PipelineServiceDeletePipelineParams) WithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service delete pipeline params +func (o *PipelineServiceDeletePipelineParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service delete pipeline params +func (o *PipelineServiceDeletePipelineParams) WithContext(ctx context.Context) *PipelineServiceDeletePipelineParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service delete pipeline params +func (o *PipelineServiceDeletePipelineParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service delete pipeline params +func (o *PipelineServiceDeletePipelineParams) WithHTTPClient(client *http.Client) *PipelineServiceDeletePipelineParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service delete pipeline params +func (o *PipelineServiceDeletePipelineParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the pipeline service delete pipeline params +func (o *PipelineServiceDeletePipelineParams) WithID(id string) *PipelineServiceDeletePipelineParams { + o.SetID(id) + return o +} + +// SetID adds the id to the pipeline service delete pipeline params +func (o *PipelineServiceDeletePipelineParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceDeletePipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_responses.go new file mode 100644 index 0000000000..73cb6aa906 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceDeletePipelineReader is a Reader for the PipelineServiceDeletePipeline structure. +type PipelineServiceDeletePipelineReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceDeletePipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceDeletePipelineOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceDeletePipelineDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceDeletePipelineOK creates a PipelineServiceDeletePipelineOK with default headers values +func NewPipelineServiceDeletePipelineOK() *PipelineServiceDeletePipelineOK { + return &PipelineServiceDeletePipelineOK{} +} + +/* +PipelineServiceDeletePipelineOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceDeletePipelineOK struct { + Payload interface{} +} + +// IsSuccess returns true when this pipeline service delete pipeline o k response has a 2xx status code +func (o *PipelineServiceDeletePipelineOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service delete pipeline o k response has a 3xx status code +func (o *PipelineServiceDeletePipelineOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service delete pipeline o k response has a 4xx status code +func (o *PipelineServiceDeletePipelineOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service delete pipeline o k response has a 5xx status code +func (o *PipelineServiceDeletePipelineOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service delete pipeline o k response a status code equal to that given +func (o *PipelineServiceDeletePipelineOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service delete pipeline o k response +func (o *PipelineServiceDeletePipelineOK) Code() int { + return 200 +} + +func (o *PipelineServiceDeletePipelineOK) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/pipelines/{id}][%d] pipelineServiceDeletePipelineOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceDeletePipelineOK) String() string { + return fmt.Sprintf("[DELETE /apis/v1/pipelines/{id}][%d] pipelineServiceDeletePipelineOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceDeletePipelineOK) GetPayload() interface{} { + return o.Payload +} + +func (o *PipelineServiceDeletePipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceDeletePipelineDefault creates a PipelineServiceDeletePipelineDefault with default headers values +func NewPipelineServiceDeletePipelineDefault(code int) *PipelineServiceDeletePipelineDefault { + return &PipelineServiceDeletePipelineDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceDeletePipelineDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceDeletePipelineDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service delete pipeline default response has a 2xx status code +func (o *PipelineServiceDeletePipelineDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service delete pipeline default response has a 3xx status code +func (o *PipelineServiceDeletePipelineDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service delete pipeline default response has a 4xx status code +func (o *PipelineServiceDeletePipelineDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service delete pipeline default response has a 5xx status code +func (o *PipelineServiceDeletePipelineDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service delete pipeline default response a status code equal to that given +func (o *PipelineServiceDeletePipelineDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service delete pipeline default response +func (o *PipelineServiceDeletePipelineDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceDeletePipelineDefault) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/pipelines/{id}][%d] PipelineService_DeletePipeline default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceDeletePipelineDefault) String() string { + return fmt.Sprintf("[DELETE /apis/v1/pipelines/{id}][%d] PipelineService_DeletePipeline default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceDeletePipelineDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceDeletePipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_parameters.go new file mode 100644 index 0000000000..01224a06c1 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPipelineServiceDeletePipelineVersionParams creates a new PipelineServiceDeletePipelineVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceDeletePipelineVersionParams() *PipelineServiceDeletePipelineVersionParams { + return &PipelineServiceDeletePipelineVersionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceDeletePipelineVersionParamsWithTimeout creates a new PipelineServiceDeletePipelineVersionParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceDeletePipelineVersionParamsWithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineVersionParams { + return &PipelineServiceDeletePipelineVersionParams{ + timeout: timeout, + } +} + +// NewPipelineServiceDeletePipelineVersionParamsWithContext creates a new PipelineServiceDeletePipelineVersionParams object +// with the ability to set a context for a request. +func NewPipelineServiceDeletePipelineVersionParamsWithContext(ctx context.Context) *PipelineServiceDeletePipelineVersionParams { + return &PipelineServiceDeletePipelineVersionParams{ + Context: ctx, + } +} + +// NewPipelineServiceDeletePipelineVersionParamsWithHTTPClient creates a new PipelineServiceDeletePipelineVersionParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceDeletePipelineVersionParamsWithHTTPClient(client *http.Client) *PipelineServiceDeletePipelineVersionParams { + return &PipelineServiceDeletePipelineVersionParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceDeletePipelineVersionParams contains all the parameters to send to the API endpoint + + for the pipeline service delete pipeline version operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceDeletePipelineVersionParams struct { + + /* VersionID. + + The ID of the pipeline version to be deleted. + */ + VersionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service delete pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineVersionParams) WithDefaults() *PipelineServiceDeletePipelineVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service delete pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineVersionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service delete pipeline version params +func (o *PipelineServiceDeletePipelineVersionParams) WithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineVersionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service delete pipeline version params +func (o *PipelineServiceDeletePipelineVersionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service delete pipeline version params +func (o *PipelineServiceDeletePipelineVersionParams) WithContext(ctx context.Context) *PipelineServiceDeletePipelineVersionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service delete pipeline version params +func (o *PipelineServiceDeletePipelineVersionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service delete pipeline version params +func (o *PipelineServiceDeletePipelineVersionParams) WithHTTPClient(client *http.Client) *PipelineServiceDeletePipelineVersionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service delete pipeline version params +func (o *PipelineServiceDeletePipelineVersionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithVersionID adds the versionID to the pipeline service delete pipeline version params +func (o *PipelineServiceDeletePipelineVersionParams) WithVersionID(versionID string) *PipelineServiceDeletePipelineVersionParams { + o.SetVersionID(versionID) + return o +} + +// SetVersionID adds the versionId to the pipeline service delete pipeline version params +func (o *PipelineServiceDeletePipelineVersionParams) SetVersionID(versionID string) { + o.VersionID = versionID +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceDeletePipelineVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param version_id + if err := r.SetPathParam("version_id", o.VersionID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_responses.go new file mode 100644 index 0000000000..60a07f9704 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceDeletePipelineVersionReader is a Reader for the PipelineServiceDeletePipelineVersion structure. +type PipelineServiceDeletePipelineVersionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceDeletePipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceDeletePipelineVersionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceDeletePipelineVersionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceDeletePipelineVersionOK creates a PipelineServiceDeletePipelineVersionOK with default headers values +func NewPipelineServiceDeletePipelineVersionOK() *PipelineServiceDeletePipelineVersionOK { + return &PipelineServiceDeletePipelineVersionOK{} +} + +/* +PipelineServiceDeletePipelineVersionOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceDeletePipelineVersionOK struct { + Payload interface{} +} + +// IsSuccess returns true when this pipeline service delete pipeline version o k response has a 2xx status code +func (o *PipelineServiceDeletePipelineVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service delete pipeline version o k response has a 3xx status code +func (o *PipelineServiceDeletePipelineVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service delete pipeline version o k response has a 4xx status code +func (o *PipelineServiceDeletePipelineVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service delete pipeline version o k response has a 5xx status code +func (o *PipelineServiceDeletePipelineVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service delete pipeline version o k response a status code equal to that given +func (o *PipelineServiceDeletePipelineVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service delete pipeline version o k response +func (o *PipelineServiceDeletePipelineVersionOK) Code() int { + return 200 +} + +func (o *PipelineServiceDeletePipelineVersionOK) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/pipeline_versions/{version_id}][%d] pipelineServiceDeletePipelineVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceDeletePipelineVersionOK) String() string { + return fmt.Sprintf("[DELETE /apis/v1/pipeline_versions/{version_id}][%d] pipelineServiceDeletePipelineVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceDeletePipelineVersionOK) GetPayload() interface{} { + return o.Payload +} + +func (o *PipelineServiceDeletePipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceDeletePipelineVersionDefault creates a PipelineServiceDeletePipelineVersionDefault with default headers values +func NewPipelineServiceDeletePipelineVersionDefault(code int) *PipelineServiceDeletePipelineVersionDefault { + return &PipelineServiceDeletePipelineVersionDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceDeletePipelineVersionDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceDeletePipelineVersionDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service delete pipeline version default response has a 2xx status code +func (o *PipelineServiceDeletePipelineVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service delete pipeline version default response has a 3xx status code +func (o *PipelineServiceDeletePipelineVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service delete pipeline version default response has a 4xx status code +func (o *PipelineServiceDeletePipelineVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service delete pipeline version default response has a 5xx status code +func (o *PipelineServiceDeletePipelineVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service delete pipeline version default response a status code equal to that given +func (o *PipelineServiceDeletePipelineVersionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service delete pipeline version default response +func (o *PipelineServiceDeletePipelineVersionDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceDeletePipelineVersionDefault) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/pipeline_versions/{version_id}][%d] PipelineService_DeletePipelineVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceDeletePipelineVersionDefault) String() string { + return fmt.Sprintf("[DELETE /apis/v1/pipeline_versions/{version_id}][%d] PipelineService_DeletePipelineVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceDeletePipelineVersionDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceDeletePipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_parameters.go new file mode 100644 index 0000000000..c6e0b7182b --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPipelineServiceGetPipelineParams creates a new PipelineServiceGetPipelineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceGetPipelineParams() *PipelineServiceGetPipelineParams { + return &PipelineServiceGetPipelineParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceGetPipelineParamsWithTimeout creates a new PipelineServiceGetPipelineParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceGetPipelineParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineParams { + return &PipelineServiceGetPipelineParams{ + timeout: timeout, + } +} + +// NewPipelineServiceGetPipelineParamsWithContext creates a new PipelineServiceGetPipelineParams object +// with the ability to set a context for a request. +func NewPipelineServiceGetPipelineParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineParams { + return &PipelineServiceGetPipelineParams{ + Context: ctx, + } +} + +// NewPipelineServiceGetPipelineParamsWithHTTPClient creates a new PipelineServiceGetPipelineParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceGetPipelineParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineParams { + return &PipelineServiceGetPipelineParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceGetPipelineParams contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceGetPipelineParams struct { + + /* ID. + + The ID of the pipeline to be retrieved. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service get pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineParams) WithDefaults() *PipelineServiceGetPipelineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service get pipeline params +func (o *PipelineServiceGetPipelineParams) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service get pipeline params +func (o *PipelineServiceGetPipelineParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service get pipeline params +func (o *PipelineServiceGetPipelineParams) WithContext(ctx context.Context) *PipelineServiceGetPipelineParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service get pipeline params +func (o *PipelineServiceGetPipelineParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service get pipeline params +func (o *PipelineServiceGetPipelineParams) WithHTTPClient(client *http.Client) *PipelineServiceGetPipelineParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service get pipeline params +func (o *PipelineServiceGetPipelineParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the pipeline service get pipeline params +func (o *PipelineServiceGetPipelineParams) WithID(id string) *PipelineServiceGetPipelineParams { + o.SetID(id) + return o +} + +// SetID adds the id to the pipeline service get pipeline params +func (o *PipelineServiceGetPipelineParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceGetPipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_responses.go new file mode 100644 index 0000000000..9e04db3b4e --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceGetPipelineReader is a Reader for the PipelineServiceGetPipeline structure. +type PipelineServiceGetPipelineReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceGetPipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceGetPipelineOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceGetPipelineDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceGetPipelineOK creates a PipelineServiceGetPipelineOK with default headers values +func NewPipelineServiceGetPipelineOK() *PipelineServiceGetPipelineOK { + return &PipelineServiceGetPipelineOK{} +} + +/* +PipelineServiceGetPipelineOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceGetPipelineOK struct { + Payload *pipeline_model.V1Pipeline +} + +// IsSuccess returns true when this pipeline service get pipeline o k response has a 2xx status code +func (o *PipelineServiceGetPipelineOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline o k response has a 3xx status code +func (o *PipelineServiceGetPipelineOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline o k response has a 4xx status code +func (o *PipelineServiceGetPipelineOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline o k response has a 5xx status code +func (o *PipelineServiceGetPipelineOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline o k response a status code equal to that given +func (o *PipelineServiceGetPipelineOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline o k response +func (o *PipelineServiceGetPipelineOK) Code() int { + return 200 +} + +func (o *PipelineServiceGetPipelineOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipelines/{id}][%d] pipelineServiceGetPipelineOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceGetPipelineOK) String() string { + return fmt.Sprintf("[GET /apis/v1/pipelines/{id}][%d] pipelineServiceGetPipelineOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceGetPipelineOK) GetPayload() *pipeline_model.V1Pipeline { + return o.Payload +} + +func (o *PipelineServiceGetPipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.V1Pipeline) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceGetPipelineDefault creates a PipelineServiceGetPipelineDefault with default headers values +func NewPipelineServiceGetPipelineDefault(code int) *PipelineServiceGetPipelineDefault { + return &PipelineServiceGetPipelineDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceGetPipelineDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceGetPipelineDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline default response has a 2xx status code +func (o *PipelineServiceGetPipelineDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline default response has a 3xx status code +func (o *PipelineServiceGetPipelineDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline default response has a 4xx status code +func (o *PipelineServiceGetPipelineDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline default response has a 5xx status code +func (o *PipelineServiceGetPipelineDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline default response a status code equal to that given +func (o *PipelineServiceGetPipelineDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service get pipeline default response +func (o *PipelineServiceGetPipelineDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceGetPipelineDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipelines/{id}][%d] PipelineService_GetPipeline default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceGetPipelineDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/pipelines/{id}][%d] PipelineService_GetPipeline default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceGetPipelineDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceGetPipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_parameters.go new file mode 100644 index 0000000000..21c24493ae --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPipelineServiceGetPipelineVersionParams creates a new PipelineServiceGetPipelineVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceGetPipelineVersionParams() *PipelineServiceGetPipelineVersionParams { + return &PipelineServiceGetPipelineVersionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceGetPipelineVersionParamsWithTimeout creates a new PipelineServiceGetPipelineVersionParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceGetPipelineVersionParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionParams { + return &PipelineServiceGetPipelineVersionParams{ + timeout: timeout, + } +} + +// NewPipelineServiceGetPipelineVersionParamsWithContext creates a new PipelineServiceGetPipelineVersionParams object +// with the ability to set a context for a request. +func NewPipelineServiceGetPipelineVersionParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineVersionParams { + return &PipelineServiceGetPipelineVersionParams{ + Context: ctx, + } +} + +// NewPipelineServiceGetPipelineVersionParamsWithHTTPClient creates a new PipelineServiceGetPipelineVersionParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceGetPipelineVersionParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineVersionParams { + return &PipelineServiceGetPipelineVersionParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceGetPipelineVersionParams contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline version operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceGetPipelineVersionParams struct { + + /* VersionID. + + The ID of the pipeline version to be retrieved. + */ + VersionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service get pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionParams) WithDefaults() *PipelineServiceGetPipelineVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service get pipeline version params +func (o *PipelineServiceGetPipelineVersionParams) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service get pipeline version params +func (o *PipelineServiceGetPipelineVersionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service get pipeline version params +func (o *PipelineServiceGetPipelineVersionParams) WithContext(ctx context.Context) *PipelineServiceGetPipelineVersionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service get pipeline version params +func (o *PipelineServiceGetPipelineVersionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service get pipeline version params +func (o *PipelineServiceGetPipelineVersionParams) WithHTTPClient(client *http.Client) *PipelineServiceGetPipelineVersionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service get pipeline version params +func (o *PipelineServiceGetPipelineVersionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithVersionID adds the versionID to the pipeline service get pipeline version params +func (o *PipelineServiceGetPipelineVersionParams) WithVersionID(versionID string) *PipelineServiceGetPipelineVersionParams { + o.SetVersionID(versionID) + return o +} + +// SetVersionID adds the versionId to the pipeline service get pipeline version params +func (o *PipelineServiceGetPipelineVersionParams) SetVersionID(versionID string) { + o.VersionID = versionID +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceGetPipelineVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param version_id + if err := r.SetPathParam("version_id", o.VersionID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_responses.go new file mode 100644 index 0000000000..4f29099baa --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceGetPipelineVersionReader is a Reader for the PipelineServiceGetPipelineVersion structure. +type PipelineServiceGetPipelineVersionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceGetPipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceGetPipelineVersionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceGetPipelineVersionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceGetPipelineVersionOK creates a PipelineServiceGetPipelineVersionOK with default headers values +func NewPipelineServiceGetPipelineVersionOK() *PipelineServiceGetPipelineVersionOK { + return &PipelineServiceGetPipelineVersionOK{} +} + +/* +PipelineServiceGetPipelineVersionOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceGetPipelineVersionOK struct { + Payload *pipeline_model.V1PipelineVersion +} + +// IsSuccess returns true when this pipeline service get pipeline version o k response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline version o k response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline version o k response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline version o k response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline version o k response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline version o k response +func (o *PipelineServiceGetPipelineVersionOK) Code() int { + return 200 +} + +func (o *PipelineServiceGetPipelineVersionOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}][%d] pipelineServiceGetPipelineVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceGetPipelineVersionOK) String() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}][%d] pipelineServiceGetPipelineVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceGetPipelineVersionOK) GetPayload() *pipeline_model.V1PipelineVersion { + return o.Payload +} + +func (o *PipelineServiceGetPipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.V1PipelineVersion) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceGetPipelineVersionDefault creates a PipelineServiceGetPipelineVersionDefault with default headers values +func NewPipelineServiceGetPipelineVersionDefault(code int) *PipelineServiceGetPipelineVersionDefault { + return &PipelineServiceGetPipelineVersionDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceGetPipelineVersionDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceGetPipelineVersionDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline version default response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline version default response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline version default response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline version default response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline version default response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service get pipeline version default response +func (o *PipelineServiceGetPipelineVersionDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceGetPipelineVersionDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}][%d] PipelineService_GetPipelineVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceGetPipelineVersionDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}][%d] PipelineService_GetPipelineVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceGetPipelineVersionDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceGetPipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_parameters.go new file mode 100644 index 0000000000..ad434eefd7 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPipelineServiceGetPipelineVersionTemplateParams creates a new PipelineServiceGetPipelineVersionTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceGetPipelineVersionTemplateParams() *PipelineServiceGetPipelineVersionTemplateParams { + return &PipelineServiceGetPipelineVersionTemplateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceGetPipelineVersionTemplateParamsWithTimeout creates a new PipelineServiceGetPipelineVersionTemplateParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceGetPipelineVersionTemplateParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionTemplateParams { + return &PipelineServiceGetPipelineVersionTemplateParams{ + timeout: timeout, + } +} + +// NewPipelineServiceGetPipelineVersionTemplateParamsWithContext creates a new PipelineServiceGetPipelineVersionTemplateParams object +// with the ability to set a context for a request. +func NewPipelineServiceGetPipelineVersionTemplateParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineVersionTemplateParams { + return &PipelineServiceGetPipelineVersionTemplateParams{ + Context: ctx, + } +} + +// NewPipelineServiceGetPipelineVersionTemplateParamsWithHTTPClient creates a new PipelineServiceGetPipelineVersionTemplateParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceGetPipelineVersionTemplateParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineVersionTemplateParams { + return &PipelineServiceGetPipelineVersionTemplateParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceGetPipelineVersionTemplateParams contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline version template operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceGetPipelineVersionTemplateParams struct { + + /* VersionID. + + The ID of the pipeline version whose template is to be retrieved. + */ + VersionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service get pipeline version template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionTemplateParams) WithDefaults() *PipelineServiceGetPipelineVersionTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline version template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionTemplateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service get pipeline version template params +func (o *PipelineServiceGetPipelineVersionTemplateParams) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionTemplateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service get pipeline version template params +func (o *PipelineServiceGetPipelineVersionTemplateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service get pipeline version template params +func (o *PipelineServiceGetPipelineVersionTemplateParams) WithContext(ctx context.Context) *PipelineServiceGetPipelineVersionTemplateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service get pipeline version template params +func (o *PipelineServiceGetPipelineVersionTemplateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service get pipeline version template params +func (o *PipelineServiceGetPipelineVersionTemplateParams) WithHTTPClient(client *http.Client) *PipelineServiceGetPipelineVersionTemplateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service get pipeline version template params +func (o *PipelineServiceGetPipelineVersionTemplateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithVersionID adds the versionID to the pipeline service get pipeline version template params +func (o *PipelineServiceGetPipelineVersionTemplateParams) WithVersionID(versionID string) *PipelineServiceGetPipelineVersionTemplateParams { + o.SetVersionID(versionID) + return o +} + +// SetVersionID adds the versionId to the pipeline service get pipeline version template params +func (o *PipelineServiceGetPipelineVersionTemplateParams) SetVersionID(versionID string) { + o.VersionID = versionID +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceGetPipelineVersionTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param version_id + if err := r.SetPathParam("version_id", o.VersionID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_responses.go new file mode 100644 index 0000000000..5fcc8855d9 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceGetPipelineVersionTemplateReader is a Reader for the PipelineServiceGetPipelineVersionTemplate structure. +type PipelineServiceGetPipelineVersionTemplateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceGetPipelineVersionTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceGetPipelineVersionTemplateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceGetPipelineVersionTemplateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceGetPipelineVersionTemplateOK creates a PipelineServiceGetPipelineVersionTemplateOK with default headers values +func NewPipelineServiceGetPipelineVersionTemplateOK() *PipelineServiceGetPipelineVersionTemplateOK { + return &PipelineServiceGetPipelineVersionTemplateOK{} +} + +/* +PipelineServiceGetPipelineVersionTemplateOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceGetPipelineVersionTemplateOK struct { + Payload *pipeline_model.V1GetTemplateResponse +} + +// IsSuccess returns true when this pipeline service get pipeline version template o k response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline version template o k response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline version template o k response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline version template o k response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline version template o k response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline version template o k response +func (o *PipelineServiceGetPipelineVersionTemplateOK) Code() int { + return 200 +} + +func (o *PipelineServiceGetPipelineVersionTemplateOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}/templates][%d] pipelineServiceGetPipelineVersionTemplateOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceGetPipelineVersionTemplateOK) String() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}/templates][%d] pipelineServiceGetPipelineVersionTemplateOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceGetPipelineVersionTemplateOK) GetPayload() *pipeline_model.V1GetTemplateResponse { + return o.Payload +} + +func (o *PipelineServiceGetPipelineVersionTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.V1GetTemplateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceGetPipelineVersionTemplateDefault creates a PipelineServiceGetPipelineVersionTemplateDefault with default headers values +func NewPipelineServiceGetPipelineVersionTemplateDefault(code int) *PipelineServiceGetPipelineVersionTemplateDefault { + return &PipelineServiceGetPipelineVersionTemplateDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceGetPipelineVersionTemplateDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceGetPipelineVersionTemplateDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline version template default response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline version template default response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline version template default response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline version template default response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline version template default response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service get pipeline version template default response +func (o *PipelineServiceGetPipelineVersionTemplateDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceGetPipelineVersionTemplateDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}/templates][%d] PipelineService_GetPipelineVersionTemplate default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceGetPipelineVersionTemplateDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions/{version_id}/templates][%d] PipelineService_GetPipelineVersionTemplate default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceGetPipelineVersionTemplateDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceGetPipelineVersionTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_parameters.go new file mode 100644 index 0000000000..c6df8fca73 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPipelineServiceGetTemplateParams creates a new PipelineServiceGetTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceGetTemplateParams() *PipelineServiceGetTemplateParams { + return &PipelineServiceGetTemplateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceGetTemplateParamsWithTimeout creates a new PipelineServiceGetTemplateParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceGetTemplateParamsWithTimeout(timeout time.Duration) *PipelineServiceGetTemplateParams { + return &PipelineServiceGetTemplateParams{ + timeout: timeout, + } +} + +// NewPipelineServiceGetTemplateParamsWithContext creates a new PipelineServiceGetTemplateParams object +// with the ability to set a context for a request. +func NewPipelineServiceGetTemplateParamsWithContext(ctx context.Context) *PipelineServiceGetTemplateParams { + return &PipelineServiceGetTemplateParams{ + Context: ctx, + } +} + +// NewPipelineServiceGetTemplateParamsWithHTTPClient creates a new PipelineServiceGetTemplateParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceGetTemplateParamsWithHTTPClient(client *http.Client) *PipelineServiceGetTemplateParams { + return &PipelineServiceGetTemplateParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceGetTemplateParams contains all the parameters to send to the API endpoint + + for the pipeline service get template operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceGetTemplateParams struct { + + /* ID. + + The ID of the pipeline whose template is to be retrieved. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service get template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetTemplateParams) WithDefaults() *PipelineServiceGetTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetTemplateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service get template params +func (o *PipelineServiceGetTemplateParams) WithTimeout(timeout time.Duration) *PipelineServiceGetTemplateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service get template params +func (o *PipelineServiceGetTemplateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service get template params +func (o *PipelineServiceGetTemplateParams) WithContext(ctx context.Context) *PipelineServiceGetTemplateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service get template params +func (o *PipelineServiceGetTemplateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service get template params +func (o *PipelineServiceGetTemplateParams) WithHTTPClient(client *http.Client) *PipelineServiceGetTemplateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service get template params +func (o *PipelineServiceGetTemplateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the pipeline service get template params +func (o *PipelineServiceGetTemplateParams) WithID(id string) *PipelineServiceGetTemplateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the pipeline service get template params +func (o *PipelineServiceGetTemplateParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceGetTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_responses.go new file mode 100644 index 0000000000..925ae6cb5c --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceGetTemplateReader is a Reader for the PipelineServiceGetTemplate structure. +type PipelineServiceGetTemplateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceGetTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceGetTemplateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceGetTemplateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceGetTemplateOK creates a PipelineServiceGetTemplateOK with default headers values +func NewPipelineServiceGetTemplateOK() *PipelineServiceGetTemplateOK { + return &PipelineServiceGetTemplateOK{} +} + +/* +PipelineServiceGetTemplateOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceGetTemplateOK struct { + Payload *pipeline_model.V1GetTemplateResponse +} + +// IsSuccess returns true when this pipeline service get template o k response has a 2xx status code +func (o *PipelineServiceGetTemplateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get template o k response has a 3xx status code +func (o *PipelineServiceGetTemplateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get template o k response has a 4xx status code +func (o *PipelineServiceGetTemplateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get template o k response has a 5xx status code +func (o *PipelineServiceGetTemplateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get template o k response a status code equal to that given +func (o *PipelineServiceGetTemplateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get template o k response +func (o *PipelineServiceGetTemplateOK) Code() int { + return 200 +} + +func (o *PipelineServiceGetTemplateOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipelines/{id}/templates][%d] pipelineServiceGetTemplateOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceGetTemplateOK) String() string { + return fmt.Sprintf("[GET /apis/v1/pipelines/{id}/templates][%d] pipelineServiceGetTemplateOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceGetTemplateOK) GetPayload() *pipeline_model.V1GetTemplateResponse { + return o.Payload +} + +func (o *PipelineServiceGetTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.V1GetTemplateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceGetTemplateDefault creates a PipelineServiceGetTemplateDefault with default headers values +func NewPipelineServiceGetTemplateDefault(code int) *PipelineServiceGetTemplateDefault { + return &PipelineServiceGetTemplateDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceGetTemplateDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceGetTemplateDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get template default response has a 2xx status code +func (o *PipelineServiceGetTemplateDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get template default response has a 3xx status code +func (o *PipelineServiceGetTemplateDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get template default response has a 4xx status code +func (o *PipelineServiceGetTemplateDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get template default response has a 5xx status code +func (o *PipelineServiceGetTemplateDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get template default response a status code equal to that given +func (o *PipelineServiceGetTemplateDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service get template default response +func (o *PipelineServiceGetTemplateDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceGetTemplateDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipelines/{id}/templates][%d] PipelineService_GetTemplate default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceGetTemplateDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/pipelines/{id}/templates][%d] PipelineService_GetTemplate default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceGetTemplateDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceGetTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_parameters.go new file mode 100644 index 0000000000..d951ebddc5 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_parameters.go @@ -0,0 +1,355 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewPipelineServiceListPipelineVersionsParams creates a new PipelineServiceListPipelineVersionsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceListPipelineVersionsParams() *PipelineServiceListPipelineVersionsParams { + return &PipelineServiceListPipelineVersionsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceListPipelineVersionsParamsWithTimeout creates a new PipelineServiceListPipelineVersionsParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceListPipelineVersionsParamsWithTimeout(timeout time.Duration) *PipelineServiceListPipelineVersionsParams { + return &PipelineServiceListPipelineVersionsParams{ + timeout: timeout, + } +} + +// NewPipelineServiceListPipelineVersionsParamsWithContext creates a new PipelineServiceListPipelineVersionsParams object +// with the ability to set a context for a request. +func NewPipelineServiceListPipelineVersionsParamsWithContext(ctx context.Context) *PipelineServiceListPipelineVersionsParams { + return &PipelineServiceListPipelineVersionsParams{ + Context: ctx, + } +} + +// NewPipelineServiceListPipelineVersionsParamsWithHTTPClient creates a new PipelineServiceListPipelineVersionsParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceListPipelineVersionsParamsWithHTTPClient(client *http.Client) *PipelineServiceListPipelineVersionsParams { + return &PipelineServiceListPipelineVersionsParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceListPipelineVersionsParams contains all the parameters to send to the API endpoint + + for the pipeline service list pipeline versions operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceListPipelineVersionsParams struct { + + /* Filter. + + A base-64 encoded, JSON-serialized Filter protocol buffer (see + filter.proto). + */ + Filter *string + + /* PageSize. + + 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. + + Format: int32 + */ + PageSize *int32 + + /* PageToken. + + 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. + */ + PageToken *string + + /* ResourceKeyID. + + The ID of the resource that referred to. + */ + ResourceKeyID *string + + /* ResourceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" + */ + ResourceKeyType *string + + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + Ascending by default. + */ + SortBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service list pipeline versions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelineVersionsParams) WithDefaults() *PipelineServiceListPipelineVersionsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service list pipeline versions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelineVersionsParams) SetDefaults() { + var ( + resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := PipelineServiceListPipelineVersionsParams{ + ResourceKeyType: &resourceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) WithTimeout(timeout time.Duration) *PipelineServiceListPipelineVersionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) WithContext(ctx context.Context) *PipelineServiceListPipelineVersionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) WithHTTPClient(client *http.Client) *PipelineServiceListPipelineVersionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) WithFilter(filter *string) *PipelineServiceListPipelineVersionsParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithPageSize adds the pageSize to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) WithPageSize(pageSize *int32) *PipelineServiceListPipelineVersionsParams { + o.SetPageSize(pageSize) + return o +} + +// SetPageSize adds the pageSize to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) SetPageSize(pageSize *int32) { + o.PageSize = pageSize +} + +// WithPageToken adds the pageToken to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) WithPageToken(pageToken *string) *PipelineServiceListPipelineVersionsParams { + o.SetPageToken(pageToken) + return o +} + +// SetPageToken adds the pageToken to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) SetPageToken(pageToken *string) { + o.PageToken = pageToken +} + +// WithResourceKeyID adds the resourceKeyID to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) WithResourceKeyID(resourceKeyID *string) *PipelineServiceListPipelineVersionsParams { + o.SetResourceKeyID(resourceKeyID) + return o +} + +// SetResourceKeyID adds the resourceKeyId to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) SetResourceKeyID(resourceKeyID *string) { + o.ResourceKeyID = resourceKeyID +} + +// WithResourceKeyType adds the resourceKeyType to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) WithResourceKeyType(resourceKeyType *string) *PipelineServiceListPipelineVersionsParams { + o.SetResourceKeyType(resourceKeyType) + return o +} + +// SetResourceKeyType adds the resourceKeyType to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) SetResourceKeyType(resourceKeyType *string) { + o.ResourceKeyType = resourceKeyType +} + +// WithSortBy adds the sortBy to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) WithSortBy(sortBy *string) *PipelineServiceListPipelineVersionsParams { + o.SetSortBy(sortBy) + return o +} + +// SetSortBy adds the sortBy to the pipeline service list pipeline versions params +func (o *PipelineServiceListPipelineVersionsParams) SetSortBy(sortBy *string) { + o.SortBy = sortBy +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceListPipelineVersionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.PageSize != nil { + + // query param page_size + var qrPageSize int32 + + if o.PageSize != nil { + qrPageSize = *o.PageSize + } + qPageSize := swag.FormatInt32(qrPageSize) + if qPageSize != "" { + + if err := r.SetQueryParam("page_size", qPageSize); err != nil { + return err + } + } + } + + if o.PageToken != nil { + + // query param page_token + var qrPageToken string + + if o.PageToken != nil { + qrPageToken = *o.PageToken + } + qPageToken := qrPageToken + if qPageToken != "" { + + if err := r.SetQueryParam("page_token", qPageToken); err != nil { + return err + } + } + } + + if o.ResourceKeyID != nil { + + // query param resource_key.id + var qrResourceKeyID string + + if o.ResourceKeyID != nil { + qrResourceKeyID = *o.ResourceKeyID + } + qResourceKeyID := qrResourceKeyID + if qResourceKeyID != "" { + + if err := r.SetQueryParam("resource_key.id", qResourceKeyID); err != nil { + return err + } + } + } + + if o.ResourceKeyType != nil { + + // query param resource_key.type + var qrResourceKeyType string + + if o.ResourceKeyType != nil { + qrResourceKeyType = *o.ResourceKeyType + } + qResourceKeyType := qrResourceKeyType + if qResourceKeyType != "" { + + if err := r.SetQueryParam("resource_key.type", qResourceKeyType); err != nil { + return err + } + } + } + + if o.SortBy != nil { + + // query param sort_by + var qrSortBy string + + if o.SortBy != nil { + qrSortBy = *o.SortBy + } + qSortBy := qrSortBy + if qSortBy != "" { + + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_responses.go new file mode 100644 index 0000000000..e50d61889d --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceListPipelineVersionsReader is a Reader for the PipelineServiceListPipelineVersions structure. +type PipelineServiceListPipelineVersionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceListPipelineVersionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceListPipelineVersionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceListPipelineVersionsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceListPipelineVersionsOK creates a PipelineServiceListPipelineVersionsOK with default headers values +func NewPipelineServiceListPipelineVersionsOK() *PipelineServiceListPipelineVersionsOK { + return &PipelineServiceListPipelineVersionsOK{} +} + +/* +PipelineServiceListPipelineVersionsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceListPipelineVersionsOK struct { + Payload *pipeline_model.V1ListPipelineVersionsResponse +} + +// IsSuccess returns true when this pipeline service list pipeline versions o k response has a 2xx status code +func (o *PipelineServiceListPipelineVersionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service list pipeline versions o k response has a 3xx status code +func (o *PipelineServiceListPipelineVersionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service list pipeline versions o k response has a 4xx status code +func (o *PipelineServiceListPipelineVersionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service list pipeline versions o k response has a 5xx status code +func (o *PipelineServiceListPipelineVersionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service list pipeline versions o k response a status code equal to that given +func (o *PipelineServiceListPipelineVersionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service list pipeline versions o k response +func (o *PipelineServiceListPipelineVersionsOK) Code() int { + return 200 +} + +func (o *PipelineServiceListPipelineVersionsOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions][%d] pipelineServiceListPipelineVersionsOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceListPipelineVersionsOK) String() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions][%d] pipelineServiceListPipelineVersionsOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceListPipelineVersionsOK) GetPayload() *pipeline_model.V1ListPipelineVersionsResponse { + return o.Payload +} + +func (o *PipelineServiceListPipelineVersionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.V1ListPipelineVersionsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceListPipelineVersionsDefault creates a PipelineServiceListPipelineVersionsDefault with default headers values +func NewPipelineServiceListPipelineVersionsDefault(code int) *PipelineServiceListPipelineVersionsDefault { + return &PipelineServiceListPipelineVersionsDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceListPipelineVersionsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceListPipelineVersionsDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service list pipeline versions default response has a 2xx status code +func (o *PipelineServiceListPipelineVersionsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service list pipeline versions default response has a 3xx status code +func (o *PipelineServiceListPipelineVersionsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service list pipeline versions default response has a 4xx status code +func (o *PipelineServiceListPipelineVersionsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service list pipeline versions default response has a 5xx status code +func (o *PipelineServiceListPipelineVersionsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service list pipeline versions default response a status code equal to that given +func (o *PipelineServiceListPipelineVersionsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service list pipeline versions default response +func (o *PipelineServiceListPipelineVersionsDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceListPipelineVersionsDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions][%d] PipelineService_ListPipelineVersions default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceListPipelineVersionsDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/pipeline_versions][%d] PipelineService_ListPipelineVersions default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceListPipelineVersionsDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceListPipelineVersionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_parameters.go new file mode 100644 index 0000000000..41dfe3e29f --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_parameters.go @@ -0,0 +1,355 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewPipelineServiceListPipelinesParams creates a new PipelineServiceListPipelinesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceListPipelinesParams() *PipelineServiceListPipelinesParams { + return &PipelineServiceListPipelinesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceListPipelinesParamsWithTimeout creates a new PipelineServiceListPipelinesParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceListPipelinesParamsWithTimeout(timeout time.Duration) *PipelineServiceListPipelinesParams { + return &PipelineServiceListPipelinesParams{ + timeout: timeout, + } +} + +// NewPipelineServiceListPipelinesParamsWithContext creates a new PipelineServiceListPipelinesParams object +// with the ability to set a context for a request. +func NewPipelineServiceListPipelinesParamsWithContext(ctx context.Context) *PipelineServiceListPipelinesParams { + return &PipelineServiceListPipelinesParams{ + Context: ctx, + } +} + +// NewPipelineServiceListPipelinesParamsWithHTTPClient creates a new PipelineServiceListPipelinesParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceListPipelinesParamsWithHTTPClient(client *http.Client) *PipelineServiceListPipelinesParams { + return &PipelineServiceListPipelinesParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceListPipelinesParams contains all the parameters to send to the API endpoint + + for the pipeline service list pipelines operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceListPipelinesParams struct { + + /* Filter. + + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). + */ + Filter *string + + /* PageSize. + + 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. + + Format: int32 + */ + PageSize *int32 + + /* PageToken. + + 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. + */ + PageToken *string + + /* ResourceReferenceKeyID. + + The ID of the resource that referred to. + */ + ResourceReferenceKeyID *string + + /* ResourceReferenceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" + */ + ResourceReferenceKeyType *string + + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + Ascending by default. + */ + SortBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service list pipelines params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelinesParams) WithDefaults() *PipelineServiceListPipelinesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service list pipelines params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelinesParams) SetDefaults() { + var ( + resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := PipelineServiceListPipelinesParams{ + ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) WithTimeout(timeout time.Duration) *PipelineServiceListPipelinesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) WithContext(ctx context.Context) *PipelineServiceListPipelinesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) WithHTTPClient(client *http.Client) *PipelineServiceListPipelinesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) WithFilter(filter *string) *PipelineServiceListPipelinesParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithPageSize adds the pageSize to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) WithPageSize(pageSize *int32) *PipelineServiceListPipelinesParams { + o.SetPageSize(pageSize) + return o +} + +// SetPageSize adds the pageSize to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) SetPageSize(pageSize *int32) { + o.PageSize = pageSize +} + +// WithPageToken adds the pageToken to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) WithPageToken(pageToken *string) *PipelineServiceListPipelinesParams { + o.SetPageToken(pageToken) + return o +} + +// SetPageToken adds the pageToken to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) SetPageToken(pageToken *string) { + o.PageToken = pageToken +} + +// WithResourceReferenceKeyID adds the resourceReferenceKeyID to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) WithResourceReferenceKeyID(resourceReferenceKeyID *string) *PipelineServiceListPipelinesParams { + o.SetResourceReferenceKeyID(resourceReferenceKeyID) + return o +} + +// SetResourceReferenceKeyID adds the resourceReferenceKeyId to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) SetResourceReferenceKeyID(resourceReferenceKeyID *string) { + o.ResourceReferenceKeyID = resourceReferenceKeyID +} + +// WithResourceReferenceKeyType adds the resourceReferenceKeyType to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) WithResourceReferenceKeyType(resourceReferenceKeyType *string) *PipelineServiceListPipelinesParams { + o.SetResourceReferenceKeyType(resourceReferenceKeyType) + return o +} + +// SetResourceReferenceKeyType adds the resourceReferenceKeyType to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) SetResourceReferenceKeyType(resourceReferenceKeyType *string) { + o.ResourceReferenceKeyType = resourceReferenceKeyType +} + +// WithSortBy adds the sortBy to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) WithSortBy(sortBy *string) *PipelineServiceListPipelinesParams { + o.SetSortBy(sortBy) + return o +} + +// SetSortBy adds the sortBy to the pipeline service list pipelines params +func (o *PipelineServiceListPipelinesParams) SetSortBy(sortBy *string) { + o.SortBy = sortBy +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceListPipelinesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.PageSize != nil { + + // query param page_size + var qrPageSize int32 + + if o.PageSize != nil { + qrPageSize = *o.PageSize + } + qPageSize := swag.FormatInt32(qrPageSize) + if qPageSize != "" { + + if err := r.SetQueryParam("page_size", qPageSize); err != nil { + return err + } + } + } + + if o.PageToken != nil { + + // query param page_token + var qrPageToken string + + if o.PageToken != nil { + qrPageToken = *o.PageToken + } + qPageToken := qrPageToken + if qPageToken != "" { + + if err := r.SetQueryParam("page_token", qPageToken); err != nil { + return err + } + } + } + + if o.ResourceReferenceKeyID != nil { + + // query param resource_reference_key.id + var qrResourceReferenceKeyID string + + if o.ResourceReferenceKeyID != nil { + qrResourceReferenceKeyID = *o.ResourceReferenceKeyID + } + qResourceReferenceKeyID := qrResourceReferenceKeyID + if qResourceReferenceKeyID != "" { + + if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { + return err + } + } + } + + if o.ResourceReferenceKeyType != nil { + + // query param resource_reference_key.type + var qrResourceReferenceKeyType string + + if o.ResourceReferenceKeyType != nil { + qrResourceReferenceKeyType = *o.ResourceReferenceKeyType + } + qResourceReferenceKeyType := qrResourceReferenceKeyType + if qResourceReferenceKeyType != "" { + + if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { + return err + } + } + } + + if o.SortBy != nil { + + // query param sort_by + var qrSortBy string + + if o.SortBy != nil { + qrSortBy = *o.SortBy + } + qSortBy := qrSortBy + if qSortBy != "" { + + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_responses.go new file mode 100644 index 0000000000..8ac4955ca5 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceListPipelinesReader is a Reader for the PipelineServiceListPipelines structure. +type PipelineServiceListPipelinesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceListPipelinesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceListPipelinesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceListPipelinesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceListPipelinesOK creates a PipelineServiceListPipelinesOK with default headers values +func NewPipelineServiceListPipelinesOK() *PipelineServiceListPipelinesOK { + return &PipelineServiceListPipelinesOK{} +} + +/* +PipelineServiceListPipelinesOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceListPipelinesOK struct { + Payload *pipeline_model.V1ListPipelinesResponse +} + +// IsSuccess returns true when this pipeline service list pipelines o k response has a 2xx status code +func (o *PipelineServiceListPipelinesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service list pipelines o k response has a 3xx status code +func (o *PipelineServiceListPipelinesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service list pipelines o k response has a 4xx status code +func (o *PipelineServiceListPipelinesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service list pipelines o k response has a 5xx status code +func (o *PipelineServiceListPipelinesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service list pipelines o k response a status code equal to that given +func (o *PipelineServiceListPipelinesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service list pipelines o k response +func (o *PipelineServiceListPipelinesOK) Code() int { + return 200 +} + +func (o *PipelineServiceListPipelinesOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipelines][%d] pipelineServiceListPipelinesOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceListPipelinesOK) String() string { + return fmt.Sprintf("[GET /apis/v1/pipelines][%d] pipelineServiceListPipelinesOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceListPipelinesOK) GetPayload() *pipeline_model.V1ListPipelinesResponse { + return o.Payload +} + +func (o *PipelineServiceListPipelinesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.V1ListPipelinesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceListPipelinesDefault creates a PipelineServiceListPipelinesDefault with default headers values +func NewPipelineServiceListPipelinesDefault(code int) *PipelineServiceListPipelinesDefault { + return &PipelineServiceListPipelinesDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceListPipelinesDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceListPipelinesDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service list pipelines default response has a 2xx status code +func (o *PipelineServiceListPipelinesDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service list pipelines default response has a 3xx status code +func (o *PipelineServiceListPipelinesDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service list pipelines default response has a 4xx status code +func (o *PipelineServiceListPipelinesDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service list pipelines default response has a 5xx status code +func (o *PipelineServiceListPipelinesDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service list pipelines default response a status code equal to that given +func (o *PipelineServiceListPipelinesDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service list pipelines default response +func (o *PipelineServiceListPipelinesDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceListPipelinesDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/pipelines][%d] PipelineService_ListPipelines default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceListPipelinesDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/pipelines][%d] PipelineService_ListPipelines default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceListPipelinesDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceListPipelinesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_parameters.go new file mode 100644 index 0000000000..d5997af681 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPipelineServiceUpdatePipelineDefaultVersionParams creates a new PipelineServiceUpdatePipelineDefaultVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceUpdatePipelineDefaultVersionParams() *PipelineServiceUpdatePipelineDefaultVersionParams { + return &PipelineServiceUpdatePipelineDefaultVersionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceUpdatePipelineDefaultVersionParamsWithTimeout creates a new PipelineServiceUpdatePipelineDefaultVersionParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceUpdatePipelineDefaultVersionParamsWithTimeout(timeout time.Duration) *PipelineServiceUpdatePipelineDefaultVersionParams { + return &PipelineServiceUpdatePipelineDefaultVersionParams{ + timeout: timeout, + } +} + +// NewPipelineServiceUpdatePipelineDefaultVersionParamsWithContext creates a new PipelineServiceUpdatePipelineDefaultVersionParams object +// with the ability to set a context for a request. +func NewPipelineServiceUpdatePipelineDefaultVersionParamsWithContext(ctx context.Context) *PipelineServiceUpdatePipelineDefaultVersionParams { + return &PipelineServiceUpdatePipelineDefaultVersionParams{ + Context: ctx, + } +} + +// NewPipelineServiceUpdatePipelineDefaultVersionParamsWithHTTPClient creates a new PipelineServiceUpdatePipelineDefaultVersionParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceUpdatePipelineDefaultVersionParamsWithHTTPClient(client *http.Client) *PipelineServiceUpdatePipelineDefaultVersionParams { + return &PipelineServiceUpdatePipelineDefaultVersionParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceUpdatePipelineDefaultVersionParams contains all the parameters to send to the API endpoint + + for the pipeline service update pipeline default version operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceUpdatePipelineDefaultVersionParams struct { + + /* PipelineID. + + The ID of the pipeline to be updated. + */ + PipelineID string + + /* VersionID. + + The ID of the default version. + */ + VersionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service update pipeline default version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) WithDefaults() *PipelineServiceUpdatePipelineDefaultVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service update pipeline default version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) WithTimeout(timeout time.Duration) *PipelineServiceUpdatePipelineDefaultVersionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) WithContext(ctx context.Context) *PipelineServiceUpdatePipelineDefaultVersionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) WithHTTPClient(client *http.Client) *PipelineServiceUpdatePipelineDefaultVersionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPipelineID adds the pipelineID to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) WithPipelineID(pipelineID string) *PipelineServiceUpdatePipelineDefaultVersionParams { + o.SetPipelineID(pipelineID) + return o +} + +// SetPipelineID adds the pipelineId to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) SetPipelineID(pipelineID string) { + o.PipelineID = pipelineID +} + +// WithVersionID adds the versionID to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) WithVersionID(versionID string) *PipelineServiceUpdatePipelineDefaultVersionParams { + o.SetVersionID(versionID) + return o +} + +// SetVersionID adds the versionId to the pipeline service update pipeline default version params +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) SetVersionID(versionID string) { + o.VersionID = versionID +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceUpdatePipelineDefaultVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param pipeline_id + if err := r.SetPathParam("pipeline_id", o.PipelineID); err != nil { + return err + } + + // path param version_id + if err := r.SetPathParam("version_id", o.VersionID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_responses.go new file mode 100644 index 0000000000..b98f8fa282 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" +) + +// PipelineServiceUpdatePipelineDefaultVersionReader is a Reader for the PipelineServiceUpdatePipelineDefaultVersion structure. +type PipelineServiceUpdatePipelineDefaultVersionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceUpdatePipelineDefaultVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceUpdatePipelineDefaultVersionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceUpdatePipelineDefaultVersionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceUpdatePipelineDefaultVersionOK creates a PipelineServiceUpdatePipelineDefaultVersionOK with default headers values +func NewPipelineServiceUpdatePipelineDefaultVersionOK() *PipelineServiceUpdatePipelineDefaultVersionOK { + return &PipelineServiceUpdatePipelineDefaultVersionOK{} +} + +/* +PipelineServiceUpdatePipelineDefaultVersionOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type PipelineServiceUpdatePipelineDefaultVersionOK struct { + Payload interface{} +} + +// IsSuccess returns true when this pipeline service update pipeline default version o k response has a 2xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service update pipeline default version o k response has a 3xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service update pipeline default version o k response has a 4xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service update pipeline default version o k response has a 5xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service update pipeline default version o k response a status code equal to that given +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service update pipeline default version o k response +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) Code() int { + return 200 +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/{pipeline_id}/default_version/{version_id}][%d] pipelineServiceUpdatePipelineDefaultVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) String() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/{pipeline_id}/default_version/{version_id}][%d] pipelineServiceUpdatePipelineDefaultVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) GetPayload() interface{} { + return o.Payload +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceUpdatePipelineDefaultVersionDefault creates a PipelineServiceUpdatePipelineDefaultVersionDefault with default headers values +func NewPipelineServiceUpdatePipelineDefaultVersionDefault(code int) *PipelineServiceUpdatePipelineDefaultVersionDefault { + return &PipelineServiceUpdatePipelineDefaultVersionDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceUpdatePipelineDefaultVersionDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceUpdatePipelineDefaultVersionDefault struct { + _statusCode int + + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service update pipeline default version default response has a 2xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service update pipeline default version default response has a 3xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service update pipeline default version default response has a 4xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service update pipeline default version default response has a 5xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service update pipeline default version default response a status code equal to that given +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service update pipeline default version default response +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/{pipeline_id}/default_version/{version_id}][%d] PipelineService_UpdatePipelineDefaultVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/{pipeline_id}/default_version/{version_id}][%d] PipelineService_UpdatePipelineDefaultVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_parameters.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_parameters.go deleted file mode 100644 index 9aa93ed2a9..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_parameters.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewUpdatePipelineDefaultVersionParams creates a new UpdatePipelineDefaultVersionParams object -// with the default values initialized. -func NewUpdatePipelineDefaultVersionParams() *UpdatePipelineDefaultVersionParams { - var () - return &UpdatePipelineDefaultVersionParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewUpdatePipelineDefaultVersionParamsWithTimeout creates a new UpdatePipelineDefaultVersionParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewUpdatePipelineDefaultVersionParamsWithTimeout(timeout time.Duration) *UpdatePipelineDefaultVersionParams { - var () - return &UpdatePipelineDefaultVersionParams{ - - timeout: timeout, - } -} - -// NewUpdatePipelineDefaultVersionParamsWithContext creates a new UpdatePipelineDefaultVersionParams object -// with the default values initialized, and the ability to set a context for a request -func NewUpdatePipelineDefaultVersionParamsWithContext(ctx context.Context) *UpdatePipelineDefaultVersionParams { - var () - return &UpdatePipelineDefaultVersionParams{ - - Context: ctx, - } -} - -// NewUpdatePipelineDefaultVersionParamsWithHTTPClient creates a new UpdatePipelineDefaultVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewUpdatePipelineDefaultVersionParamsWithHTTPClient(client *http.Client) *UpdatePipelineDefaultVersionParams { - var () - return &UpdatePipelineDefaultVersionParams{ - HTTPClient: client, - } -} - -/*UpdatePipelineDefaultVersionParams contains all the parameters to send to the API endpoint -for the update pipeline default version operation typically these are written to a http.Request -*/ -type UpdatePipelineDefaultVersionParams struct { - - /*PipelineID - The ID of the pipeline to be updated. - - */ - PipelineID string - /*VersionID - The ID of the default version. - - */ - VersionID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) WithTimeout(timeout time.Duration) *UpdatePipelineDefaultVersionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) WithContext(ctx context.Context) *UpdatePipelineDefaultVersionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) WithHTTPClient(client *http.Client) *UpdatePipelineDefaultVersionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithPipelineID adds the pipelineID to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) WithPipelineID(pipelineID string) *UpdatePipelineDefaultVersionParams { - o.SetPipelineID(pipelineID) - return o -} - -// SetPipelineID adds the pipelineId to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) SetPipelineID(pipelineID string) { - o.PipelineID = pipelineID -} - -// WithVersionID adds the versionID to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) WithVersionID(versionID string) *UpdatePipelineDefaultVersionParams { - o.SetVersionID(versionID) - return o -} - -// SetVersionID adds the versionId to the update pipeline default version params -func (o *UpdatePipelineDefaultVersionParams) SetVersionID(versionID string) { - o.VersionID = versionID -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdatePipelineDefaultVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param pipeline_id - if err := r.SetPathParam("pipeline_id", o.PipelineID); err != nil { - return err - } - - // path param version_id - if err := r.SetPathParam("version_id", o.VersionID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_responses.go b/backend/api/v1/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_responses.go deleted file mode 100644 index 48455ce9c8..0000000000 --- a/backend/api/v1/go_http_client/pipeline_client/pipeline_service/update_pipeline_default_version_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_model" -) - -// UpdatePipelineDefaultVersionReader is a Reader for the UpdatePipelineDefaultVersion structure. -type UpdatePipelineDefaultVersionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdatePipelineDefaultVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewUpdatePipelineDefaultVersionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewUpdatePipelineDefaultVersionDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUpdatePipelineDefaultVersionOK creates a UpdatePipelineDefaultVersionOK with default headers values -func NewUpdatePipelineDefaultVersionOK() *UpdatePipelineDefaultVersionOK { - return &UpdatePipelineDefaultVersionOK{} -} - -/*UpdatePipelineDefaultVersionOK handles this case with default header values. - -A successful response. -*/ -type UpdatePipelineDefaultVersionOK struct { - Payload interface{} -} - -func (o *UpdatePipelineDefaultVersionOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipelines/{pipeline_id}/default_version/{version_id}][%d] updatePipelineDefaultVersionOK %+v", 200, o.Payload) -} - -func (o *UpdatePipelineDefaultVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdatePipelineDefaultVersionDefault creates a UpdatePipelineDefaultVersionDefault with default headers values -func NewUpdatePipelineDefaultVersionDefault(code int) *UpdatePipelineDefaultVersionDefault { - return &UpdatePipelineDefaultVersionDefault{ - _statusCode: code, - } -} - -/*UpdatePipelineDefaultVersionDefault handles this case with default header values. - -UpdatePipelineDefaultVersionDefault update pipeline default version default -*/ -type UpdatePipelineDefaultVersionDefault struct { - _statusCode int - - Payload *pipeline_model.V1Status -} - -// Code gets the status code for the update pipeline default version default response -func (o *UpdatePipelineDefaultVersionDefault) Code() int { - return o._statusCode -} - -func (o *UpdatePipelineDefaultVersionDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipelines/{pipeline_id}/default_version/{version_id}][%d] UpdatePipelineDefaultVersion default %+v", o._statusCode, o.Payload) -} - -func (o *UpdatePipelineDefaultVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_model/googlerpc_status.go b/backend/api/v1/go_http_client/pipeline_model/googlerpc_status.go new file mode 100644 index 0000000000..b0caebea7f --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_model/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_model/protobuf_any.go b/backend/api/v1/go_http_client/pipeline_model/protobuf_any.go index 10ecc3fe5a..411270ceb1 100644 --- a/backend/api/v1/go_http_client/pipeline_model/protobuf_any.go +++ b/backend/api/v1/go_http_client/pipeline_model/protobuf_any.go @@ -6,9 +6,9 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +20,45 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// 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 := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// 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 := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(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 @@ -66,34 +66,34 @@ import ( // 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; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@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" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -124,35 +124,16 @@ type ProtobufAny struct { // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` - - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + AtType string `json:"@type,omitempty"` } // Validate validates this protobuf any func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { - - if swag.IsZero(m.Value) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_get_template_response.go b/backend/api/v1/go_http_client/pipeline_model/v1_get_template_response.go index d4fe75544d..26d4f9b0b1 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_get_template_response.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_get_template_response.go @@ -6,12 +6,14 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1GetTemplateResponse v1 get template response +// // swagger:model v1GetTemplateResponse type V1GetTemplateResponse struct { @@ -25,6 +27,11 @@ func (m *V1GetTemplateResponse) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 get template response based on context it is used +func (m *V1GetTemplateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1GetTemplateResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_list_pipeline_versions_response.go b/backend/api/v1/go_http_client/pipeline_model/v1_list_pipeline_versions_response.go index 1a9ad3efc9..2902fc1540 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_list_pipeline_versions_response.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_list_pipeline_versions_response.go @@ -6,15 +6,16 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ListPipelineVersionsResponse v1 list pipeline versions response +// // swagger:model v1ListPipelineVersionsResponse type V1ListPipelineVersionsResponse struct { @@ -43,7 +44,6 @@ func (m *V1ListPipelineVersionsResponse) Validate(formats strfmt.Registry) error } func (m *V1ListPipelineVersionsResponse) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(m.Versions) { // not required return nil } @@ -57,6 +57,42 @@ func (m *V1ListPipelineVersionsResponse) validateVersions(formats strfmt.Registr if err := m.Versions[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("versions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("versions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 list pipeline versions response based on the context it is used +func (m *V1ListPipelineVersionsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateVersions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListPipelineVersionsResponse) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Versions); i++ { + + if m.Versions[i] != nil { + if err := m.Versions[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("versions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("versions" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_list_pipelines_response.go b/backend/api/v1/go_http_client/pipeline_model/v1_list_pipelines_response.go index cfe262b139..be51675a35 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_list_pipelines_response.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_list_pipelines_response.go @@ -6,15 +6,16 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ListPipelinesResponse v1 list pipelines response +// // swagger:model v1ListPipelinesResponse type V1ListPipelinesResponse struct { @@ -43,7 +44,6 @@ func (m *V1ListPipelinesResponse) Validate(formats strfmt.Registry) error { } func (m *V1ListPipelinesResponse) validatePipelines(formats strfmt.Registry) error { - if swag.IsZero(m.Pipelines) { // not required return nil } @@ -57,6 +57,42 @@ func (m *V1ListPipelinesResponse) validatePipelines(formats strfmt.Registry) err if err := m.Pipelines[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipelines" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipelines" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 list pipelines response based on the context it is used +func (m *V1ListPipelinesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePipelines(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListPipelinesResponse) contextValidatePipelines(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Pipelines); i++ { + + if m.Pipelines[i] != nil { + if err := m.Pipelines[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipelines" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipelines" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_parameter.go b/backend/api/v1/go_http_client/pipeline_model/v1_parameter.go index bf8df6f67b..af6d0c7b10 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_parameter.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_parameter.go @@ -6,12 +6,14 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1Parameter v1 parameter +// // swagger:model v1Parameter type V1Parameter struct { @@ -27,6 +29,11 @@ func (m *V1Parameter) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 parameter based on context it is used +func (m *V1Parameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1Parameter) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_pipeline.go b/backend/api/v1/go_http_client/pipeline_model/v1_pipeline.go index 8bb34f4711..ca20571802 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_pipeline.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_pipeline.go @@ -6,16 +6,17 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V1Pipeline v1 pipeline +// // swagger:model v1Pipeline type V1Pipeline struct { @@ -93,7 +94,6 @@ func (m *V1Pipeline) Validate(formats strfmt.Registry) error { } func (m *V1Pipeline) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -106,7 +106,6 @@ func (m *V1Pipeline) validateCreatedAt(formats strfmt.Registry) error { } func (m *V1Pipeline) validateDefaultVersion(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultVersion) { // not required return nil } @@ -115,6 +114,8 @@ func (m *V1Pipeline) validateDefaultVersion(formats strfmt.Registry) error { if err := m.DefaultVersion.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("default_version") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("default_version") } return err } @@ -124,7 +125,6 @@ func (m *V1Pipeline) validateDefaultVersion(formats strfmt.Registry) error { } func (m *V1Pipeline) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -138,6 +138,8 @@ func (m *V1Pipeline) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -149,7 +151,6 @@ func (m *V1Pipeline) validateParameters(formats strfmt.Registry) error { } func (m *V1Pipeline) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -163,6 +164,8 @@ func (m *V1Pipeline) validateResourceReferences(formats strfmt.Registry) error { if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } @@ -174,7 +177,6 @@ func (m *V1Pipeline) validateResourceReferences(formats strfmt.Registry) error { } func (m *V1Pipeline) validateURL(formats strfmt.Registry) error { - if swag.IsZero(m.URL) { // not required return nil } @@ -183,6 +185,106 @@ func (m *V1Pipeline) validateURL(formats strfmt.Registry) error { if err := m.URL.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("url") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 pipeline based on the context it is used +func (m *V1Pipeline) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDefaultVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Pipeline) contextValidateDefaultVersion(ctx context.Context, formats strfmt.Registry) error { + + if m.DefaultVersion != nil { + if err := m.DefaultVersion.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("default_version") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("default_version") + } + return err + } + } + + return nil +} + +func (m *V1Pipeline) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Pipeline) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Pipeline) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if m.URL != nil { + if err := m.URL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("url") } return err } diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_pipeline_version.go b/backend/api/v1/go_http_client/pipeline_model/v1_pipeline_version.go index 60240a9ac4..4609088d12 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_pipeline_version.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_pipeline_version.go @@ -6,16 +6,17 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V1PipelineVersion v1 pipeline version +// // swagger:model v1PipelineVersion type V1PipelineVersion struct { @@ -75,7 +76,6 @@ func (m *V1PipelineVersion) Validate(formats strfmt.Registry) error { } func (m *V1PipelineVersion) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -88,7 +88,6 @@ func (m *V1PipelineVersion) validateCreatedAt(formats strfmt.Registry) error { } func (m *V1PipelineVersion) validatePackageURL(formats strfmt.Registry) error { - if swag.IsZero(m.PackageURL) { // not required return nil } @@ -97,6 +96,8 @@ func (m *V1PipelineVersion) validatePackageURL(formats strfmt.Registry) error { if err := m.PackageURL.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") } return err } @@ -106,7 +107,6 @@ func (m *V1PipelineVersion) validatePackageURL(formats strfmt.Registry) error { } func (m *V1PipelineVersion) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -120,6 +120,8 @@ func (m *V1PipelineVersion) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -131,7 +133,6 @@ func (m *V1PipelineVersion) validateParameters(formats strfmt.Registry) error { } func (m *V1PipelineVersion) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -145,6 +146,86 @@ func (m *V1PipelineVersion) validateResourceReferences(formats strfmt.Registry) if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 pipeline version based on the context it is used +func (m *V1PipelineVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePackageURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PipelineVersion) contextValidatePackageURL(ctx context.Context, formats strfmt.Registry) error { + + if m.PackageURL != nil { + if err := m.PackageURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") + } + return err + } + } + + return nil +} + +func (m *V1PipelineVersion) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PipelineVersion) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_relationship.go b/backend/api/v1/go_http_client/pipeline_model/v1_relationship.go index c7d322a2a0..40e699c28e 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_relationship.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_relationship.go @@ -6,18 +6,28 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1Relationship v1 relationship +// // swagger:model v1Relationship type V1Relationship string +func NewV1Relationship(value V1Relationship) *V1Relationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1Relationship. +func (m V1Relationship) Pointer() *V1Relationship { + return &m +} + const ( // V1RelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m V1Relationship) validateV1RelationshipEnum(path, location string, value V1Relationship) error { - if err := validate.Enum(path, location, value, v1RelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1RelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m V1Relationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 relationship based on context it is used +func (m V1Relationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_resource_key.go b/backend/api/v1/go_http_client/pipeline_model/v1_resource_key.go index 57bba24b9a..32da1d1ff8 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_resource_key.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_resource_key.go @@ -6,13 +6,15 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceKey v1 resource key +// // swagger:model v1ResourceKey type V1ResourceKey struct { @@ -20,7 +22,7 @@ type V1ResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type V1ResourceType `json:"type,omitempty"` + Type *V1ResourceType `json:"type,omitempty"` } // Validate validates this v1 resource key @@ -38,16 +40,49 @@ func (m *V1ResourceKey) Validate(formats strfmt.Registry) error { } func (m *V1ResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource key based on the context it is used +func (m *V1ResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_resource_reference.go b/backend/api/v1/go_http_client/pipeline_model/v1_resource_reference.go index e8ba495ccf..d0f69fa96f 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_resource_reference.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_resource_reference.go @@ -6,13 +6,15 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceReference v1 resource reference +// // swagger:model v1ResourceReference type V1ResourceReference struct { @@ -23,7 +25,7 @@ type V1ResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship V1Relationship `json:"relationship,omitempty"` + Relationship *V1Relationship `json:"relationship,omitempty"` } // Validate validates this v1 resource reference @@ -45,7 +47,6 @@ func (m *V1ResourceReference) Validate(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,69 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource reference based on the context it is used +func (m *V1ResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *V1ResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_resource_type.go b/backend/api/v1/go_http_client/pipeline_model/v1_resource_type.go index 3224b965b2..554e7b652d 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_resource_type.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_resource_type.go @@ -6,18 +6,28 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1ResourceType v1 resource type +// // swagger:model v1ResourceType type V1ResourceType string +func NewV1ResourceType(value V1ResourceType) *V1ResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1ResourceType. +func (m V1ResourceType) Pointer() *V1ResourceType { + return &m +} + const ( // V1ResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m V1ResourceType) validateV1ResourceTypeEnum(path, location string, value V1ResourceType) error { - if err := validate.Enum(path, location, value, v1ResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1ResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m V1ResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 resource type based on context it is used +func (m V1ResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_status.go b/backend/api/v1/go_http_client/pipeline_model/v1_status.go deleted file mode 100644 index a760caca12..0000000000 --- a/backend/api/v1/go_http_client/pipeline_model/v1_status.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// V1Status v1 status -// swagger:model v1Status -type V1Status struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` -} - -// Validate validates this v1 status -func (m *V1Status) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1Status) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1Status) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1Status) UnmarshalBinary(b []byte) error { - var res V1Status - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_model/v1_url.go b/backend/api/v1/go_http_client/pipeline_model/v1_url.go index 619b777281..9ca220eaba 100644 --- a/backend/api/v1/go_http_client/pipeline_model/v1_url.go +++ b/backend/api/v1/go_http_client/pipeline_model/v1_url.go @@ -6,12 +6,14 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1URL v1 Url +// // swagger:model v1Url type V1URL struct { @@ -24,6 +26,11 @@ func (m *V1URL) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 Url based on context it is used +func (m *V1URL) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1URL) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_client.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_client.go index 1b46250f62..1475a144db 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_client.go +++ b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_client.go @@ -8,8 +8,7 @@ package pipeline_upload_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service" ) @@ -27,7 +26,7 @@ const ( ) // DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http", "https"} +var DefaultSchemes = []string{"http"} // NewHTTPClient creates a new pipeline upload HTTP client. func NewHTTPClient(formats strfmt.Registry) *PipelineUpload { @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PipelineUp cli := new(PipelineUpload) cli.Transport = transport - cli.PipelineUploadService = pipeline_upload_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // PipelineUpload is a client for pipeline upload type PipelineUpload struct { - PipelineUploadService *pipeline_upload_service.Client + PipelineUploadService pipeline_upload_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type PipelineUpload struct { // SetTransport changes the transport on the client and all its subresources func (c *PipelineUpload) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.PipelineUploadService.SetTransport(transport) - } diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_parameters.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_parameters.go new file mode 100644 index 0000000000..b23af2d393 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_parameters.go @@ -0,0 +1,212 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_upload_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPipelineServiceUploadPipelineParams creates a new PipelineServiceUploadPipelineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceUploadPipelineParams() *PipelineServiceUploadPipelineParams { + return &PipelineServiceUploadPipelineParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceUploadPipelineParamsWithTimeout creates a new PipelineServiceUploadPipelineParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceUploadPipelineParamsWithTimeout(timeout time.Duration) *PipelineServiceUploadPipelineParams { + return &PipelineServiceUploadPipelineParams{ + timeout: timeout, + } +} + +// NewPipelineServiceUploadPipelineParamsWithContext creates a new PipelineServiceUploadPipelineParams object +// with the ability to set a context for a request. +func NewPipelineServiceUploadPipelineParamsWithContext(ctx context.Context) *PipelineServiceUploadPipelineParams { + return &PipelineServiceUploadPipelineParams{ + Context: ctx, + } +} + +// NewPipelineServiceUploadPipelineParamsWithHTTPClient creates a new PipelineServiceUploadPipelineParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceUploadPipelineParamsWithHTTPClient(client *http.Client) *PipelineServiceUploadPipelineParams { + return &PipelineServiceUploadPipelineParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceUploadPipelineParams contains all the parameters to send to the API endpoint + + for the pipeline service upload pipeline operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceUploadPipelineParams struct { + + // Description. + Description *string + + // Name. + Name *string + + /* Uploadfile. + + The pipeline to upload. Maximum size of 32MB is supported. + */ + Uploadfile runtime.NamedReadCloser + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service upload pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceUploadPipelineParams) WithDefaults() *PipelineServiceUploadPipelineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service upload pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceUploadPipelineParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) WithTimeout(timeout time.Duration) *PipelineServiceUploadPipelineParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) WithContext(ctx context.Context) *PipelineServiceUploadPipelineParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) WithHTTPClient(client *http.Client) *PipelineServiceUploadPipelineParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDescription adds the description to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) WithDescription(description *string) *PipelineServiceUploadPipelineParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) SetDescription(description *string) { + o.Description = description +} + +// WithName adds the name to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) WithName(name *string) *PipelineServiceUploadPipelineParams { + o.SetName(name) + return o +} + +// SetName adds the name to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) SetName(name *string) { + o.Name = name +} + +// WithUploadfile adds the uploadfile to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) WithUploadfile(uploadfile runtime.NamedReadCloser) *PipelineServiceUploadPipelineParams { + o.SetUploadfile(uploadfile) + return o +} + +// SetUploadfile adds the uploadfile to the pipeline service upload pipeline params +func (o *PipelineServiceUploadPipelineParams) SetUploadfile(uploadfile runtime.NamedReadCloser) { + o.Uploadfile = uploadfile +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceUploadPipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + // form file param uploadfile + if err := r.SetFileParam("uploadfile", o.Uploadfile); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_responses.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_responses.go new file mode 100644 index 0000000000..54025c1852 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_upload_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_upload_model" +) + +// PipelineServiceUploadPipelineReader is a Reader for the PipelineServiceUploadPipeline structure. +type PipelineServiceUploadPipelineReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceUploadPipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceUploadPipelineOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceUploadPipelineDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceUploadPipelineOK creates a PipelineServiceUploadPipelineOK with default headers values +func NewPipelineServiceUploadPipelineOK() *PipelineServiceUploadPipelineOK { + return &PipelineServiceUploadPipelineOK{} +} + +/* +PipelineServiceUploadPipelineOK describes a response with status code 200, with default header values. + +PipelineServiceUploadPipelineOK pipeline service upload pipeline o k +*/ +type PipelineServiceUploadPipelineOK struct { + Payload *pipeline_upload_model.V1Pipeline +} + +// IsSuccess returns true when this pipeline service upload pipeline o k response has a 2xx status code +func (o *PipelineServiceUploadPipelineOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service upload pipeline o k response has a 3xx status code +func (o *PipelineServiceUploadPipelineOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service upload pipeline o k response has a 4xx status code +func (o *PipelineServiceUploadPipelineOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service upload pipeline o k response has a 5xx status code +func (o *PipelineServiceUploadPipelineOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service upload pipeline o k response a status code equal to that given +func (o *PipelineServiceUploadPipelineOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service upload pipeline o k response +func (o *PipelineServiceUploadPipelineOK) Code() int { + return 200 +} + +func (o *PipelineServiceUploadPipelineOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/upload][%d] pipelineServiceUploadPipelineOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceUploadPipelineOK) String() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/upload][%d] pipelineServiceUploadPipelineOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceUploadPipelineOK) GetPayload() *pipeline_upload_model.V1Pipeline { + return o.Payload +} + +func (o *PipelineServiceUploadPipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_upload_model.V1Pipeline) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceUploadPipelineDefault creates a PipelineServiceUploadPipelineDefault with default headers values +func NewPipelineServiceUploadPipelineDefault(code int) *PipelineServiceUploadPipelineDefault { + return &PipelineServiceUploadPipelineDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceUploadPipelineDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceUploadPipelineDefault struct { + _statusCode int + + Payload *pipeline_upload_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service upload pipeline default response has a 2xx status code +func (o *PipelineServiceUploadPipelineDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service upload pipeline default response has a 3xx status code +func (o *PipelineServiceUploadPipelineDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service upload pipeline default response has a 4xx status code +func (o *PipelineServiceUploadPipelineDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service upload pipeline default response has a 5xx status code +func (o *PipelineServiceUploadPipelineDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service upload pipeline default response a status code equal to that given +func (o *PipelineServiceUploadPipelineDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service upload pipeline default response +func (o *PipelineServiceUploadPipelineDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceUploadPipelineDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/upload][%d] PipelineService_UploadPipeline default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceUploadPipelineDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/upload][%d] PipelineService_UploadPipeline default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceUploadPipelineDefault) GetPayload() *pipeline_upload_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceUploadPipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_upload_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_version_parameters.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_version_parameters.go new file mode 100644 index 0000000000..7729808060 --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_version_parameters.go @@ -0,0 +1,243 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_upload_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPipelineServiceUploadPipelineVersionParams creates a new PipelineServiceUploadPipelineVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPipelineServiceUploadPipelineVersionParams() *PipelineServiceUploadPipelineVersionParams { + return &PipelineServiceUploadPipelineVersionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPipelineServiceUploadPipelineVersionParamsWithTimeout creates a new PipelineServiceUploadPipelineVersionParams object +// with the ability to set a timeout on a request. +func NewPipelineServiceUploadPipelineVersionParamsWithTimeout(timeout time.Duration) *PipelineServiceUploadPipelineVersionParams { + return &PipelineServiceUploadPipelineVersionParams{ + timeout: timeout, + } +} + +// NewPipelineServiceUploadPipelineVersionParamsWithContext creates a new PipelineServiceUploadPipelineVersionParams object +// with the ability to set a context for a request. +func NewPipelineServiceUploadPipelineVersionParamsWithContext(ctx context.Context) *PipelineServiceUploadPipelineVersionParams { + return &PipelineServiceUploadPipelineVersionParams{ + Context: ctx, + } +} + +// NewPipelineServiceUploadPipelineVersionParamsWithHTTPClient creates a new PipelineServiceUploadPipelineVersionParams object +// with the ability to set a custom HTTPClient for a request. +func NewPipelineServiceUploadPipelineVersionParamsWithHTTPClient(client *http.Client) *PipelineServiceUploadPipelineVersionParams { + return &PipelineServiceUploadPipelineVersionParams{ + HTTPClient: client, + } +} + +/* +PipelineServiceUploadPipelineVersionParams contains all the parameters to send to the API endpoint + + for the pipeline service upload pipeline version operation. + + Typically these are written to a http.Request. +*/ +type PipelineServiceUploadPipelineVersionParams struct { + + // Description. + Description *string + + // Name. + Name *string + + // Pipelineid. + Pipelineid *string + + /* Uploadfile. + + The pipeline to upload. Maximum size of 32MB is supported. + */ + Uploadfile runtime.NamedReadCloser + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pipeline service upload pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceUploadPipelineVersionParams) WithDefaults() *PipelineServiceUploadPipelineVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service upload pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceUploadPipelineVersionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) WithTimeout(timeout time.Duration) *PipelineServiceUploadPipelineVersionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) WithContext(ctx context.Context) *PipelineServiceUploadPipelineVersionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) WithHTTPClient(client *http.Client) *PipelineServiceUploadPipelineVersionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDescription adds the description to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) WithDescription(description *string) *PipelineServiceUploadPipelineVersionParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) SetDescription(description *string) { + o.Description = description +} + +// WithName adds the name to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) WithName(name *string) *PipelineServiceUploadPipelineVersionParams { + o.SetName(name) + return o +} + +// SetName adds the name to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) SetName(name *string) { + o.Name = name +} + +// WithPipelineid adds the pipelineid to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) WithPipelineid(pipelineid *string) *PipelineServiceUploadPipelineVersionParams { + o.SetPipelineid(pipelineid) + return o +} + +// SetPipelineid adds the pipelineid to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) SetPipelineid(pipelineid *string) { + o.Pipelineid = pipelineid +} + +// WithUploadfile adds the uploadfile to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) WithUploadfile(uploadfile runtime.NamedReadCloser) *PipelineServiceUploadPipelineVersionParams { + o.SetUploadfile(uploadfile) + return o +} + +// SetUploadfile adds the uploadfile to the pipeline service upload pipeline version params +func (o *PipelineServiceUploadPipelineVersionParams) SetUploadfile(uploadfile runtime.NamedReadCloser) { + o.Uploadfile = uploadfile +} + +// WriteToRequest writes these params to a swagger request +func (o *PipelineServiceUploadPipelineVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.Pipelineid != nil { + + // query param pipelineid + var qrPipelineid string + + if o.Pipelineid != nil { + qrPipelineid = *o.Pipelineid + } + qPipelineid := qrPipelineid + if qPipelineid != "" { + + if err := r.SetQueryParam("pipelineid", qPipelineid); err != nil { + return err + } + } + } + // form file param uploadfile + if err := r.SetFileParam("uploadfile", o.Uploadfile); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_version_responses.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_version_responses.go new file mode 100644 index 0000000000..d9c2350f0e --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_service_upload_pipeline_version_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_upload_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_upload_model" +) + +// PipelineServiceUploadPipelineVersionReader is a Reader for the PipelineServiceUploadPipelineVersion structure. +type PipelineServiceUploadPipelineVersionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PipelineServiceUploadPipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPipelineServiceUploadPipelineVersionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPipelineServiceUploadPipelineVersionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPipelineServiceUploadPipelineVersionOK creates a PipelineServiceUploadPipelineVersionOK with default headers values +func NewPipelineServiceUploadPipelineVersionOK() *PipelineServiceUploadPipelineVersionOK { + return &PipelineServiceUploadPipelineVersionOK{} +} + +/* +PipelineServiceUploadPipelineVersionOK describes a response with status code 200, with default header values. + +PipelineServiceUploadPipelineVersionOK pipeline service upload pipeline version o k +*/ +type PipelineServiceUploadPipelineVersionOK struct { + Payload *pipeline_upload_model.V1PipelineVersion +} + +// IsSuccess returns true when this pipeline service upload pipeline version o k response has a 2xx status code +func (o *PipelineServiceUploadPipelineVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service upload pipeline version o k response has a 3xx status code +func (o *PipelineServiceUploadPipelineVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service upload pipeline version o k response has a 4xx status code +func (o *PipelineServiceUploadPipelineVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service upload pipeline version o k response has a 5xx status code +func (o *PipelineServiceUploadPipelineVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service upload pipeline version o k response a status code equal to that given +func (o *PipelineServiceUploadPipelineVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service upload pipeline version o k response +func (o *PipelineServiceUploadPipelineVersionOK) Code() int { + return 200 +} + +func (o *PipelineServiceUploadPipelineVersionOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/upload_version][%d] pipelineServiceUploadPipelineVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceUploadPipelineVersionOK) String() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/upload_version][%d] pipelineServiceUploadPipelineVersionOK %+v", 200, o.Payload) +} + +func (o *PipelineServiceUploadPipelineVersionOK) GetPayload() *pipeline_upload_model.V1PipelineVersion { + return o.Payload +} + +func (o *PipelineServiceUploadPipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_upload_model.V1PipelineVersion) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPipelineServiceUploadPipelineVersionDefault creates a PipelineServiceUploadPipelineVersionDefault with default headers values +func NewPipelineServiceUploadPipelineVersionDefault(code int) *PipelineServiceUploadPipelineVersionDefault { + return &PipelineServiceUploadPipelineVersionDefault{ + _statusCode: code, + } +} + +/* +PipelineServiceUploadPipelineVersionDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type PipelineServiceUploadPipelineVersionDefault struct { + _statusCode int + + Payload *pipeline_upload_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service upload pipeline version default response has a 2xx status code +func (o *PipelineServiceUploadPipelineVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service upload pipeline version default response has a 3xx status code +func (o *PipelineServiceUploadPipelineVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service upload pipeline version default response has a 4xx status code +func (o *PipelineServiceUploadPipelineVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service upload pipeline version default response has a 5xx status code +func (o *PipelineServiceUploadPipelineVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service upload pipeline version default response a status code equal to that given +func (o *PipelineServiceUploadPipelineVersionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the pipeline service upload pipeline version default response +func (o *PipelineServiceUploadPipelineVersionDefault) Code() int { + return o._statusCode +} + +func (o *PipelineServiceUploadPipelineVersionDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/upload_version][%d] PipelineService_UploadPipelineVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceUploadPipelineVersionDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/pipelines/upload_version][%d] PipelineService_UploadPipelineVersion default %+v", o._statusCode, o.Payload) +} + +func (o *PipelineServiceUploadPipelineVersionDefault) GetPayload() *pipeline_upload_model.GooglerpcStatus { + return o.Payload +} + +func (o *PipelineServiceUploadPipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(pipeline_upload_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go index 1ed17906b0..551b26ad44 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go +++ b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go @@ -7,12 +7,11 @@ package pipeline_upload_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) // New creates a new pipeline upload service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -24,62 +23,92 @@ type Client struct { formats strfmt.Registry } +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + PipelineServiceUploadPipeline(params *PipelineServiceUploadPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceUploadPipelineOK, error) + + PipelineServiceUploadPipelineVersion(params *PipelineServiceUploadPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceUploadPipelineVersionOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -UploadPipeline upload pipeline API +PipelineServiceUploadPipeline pipeline service upload pipeline API */ -func (a *Client) UploadPipeline(params *UploadPipelineParams, authInfo runtime.ClientAuthInfoWriter) (*UploadPipelineOK, error) { +func (a *Client) PipelineServiceUploadPipeline(params *PipelineServiceUploadPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceUploadPipelineOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewUploadPipelineParams() + params = NewPipelineServiceUploadPipelineParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "UploadPipeline", + op := &runtime.ClientOperation{ + ID: "PipelineService_UploadPipeline", Method: "POST", PathPattern: "/apis/v1/pipelines/upload", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"multipart/form-data"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &UploadPipelineReader{formats: a.formats}, + Reader: &PipelineServiceUploadPipelineReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*UploadPipelineOK), nil - + success, ok := result.(*PipelineServiceUploadPipelineOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceUploadPipelineDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -UploadPipelineVersion upload pipeline version API +PipelineServiceUploadPipelineVersion pipeline service upload pipeline version API */ -func (a *Client) UploadPipelineVersion(params *UploadPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter) (*UploadPipelineVersionOK, error) { +func (a *Client) PipelineServiceUploadPipelineVersion(params *PipelineServiceUploadPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceUploadPipelineVersionOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewUploadPipelineVersionParams() + params = NewPipelineServiceUploadPipelineVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "UploadPipelineVersion", + op := &runtime.ClientOperation{ + ID: "PipelineService_UploadPipelineVersion", Method: "POST", PathPattern: "/apis/v1/pipelines/upload_version", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"multipart/form-data"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &UploadPipelineVersionReader{formats: a.formats}, + Reader: &PipelineServiceUploadPipelineVersionReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*UploadPipelineVersionOK), nil - + success, ok := result.(*PipelineServiceUploadPipelineVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceUploadPipelineVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go deleted file mode 100644 index 8b36f7ff7d..0000000000 --- a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_upload_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewUploadPipelineParams creates a new UploadPipelineParams object -// with the default values initialized. -func NewUploadPipelineParams() *UploadPipelineParams { - var () - return &UploadPipelineParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewUploadPipelineParamsWithTimeout creates a new UploadPipelineParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewUploadPipelineParamsWithTimeout(timeout time.Duration) *UploadPipelineParams { - var () - return &UploadPipelineParams{ - - timeout: timeout, - } -} - -// NewUploadPipelineParamsWithContext creates a new UploadPipelineParams object -// with the default values initialized, and the ability to set a context for a request -func NewUploadPipelineParamsWithContext(ctx context.Context) *UploadPipelineParams { - var () - return &UploadPipelineParams{ - - Context: ctx, - } -} - -// NewUploadPipelineParamsWithHTTPClient creates a new UploadPipelineParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewUploadPipelineParamsWithHTTPClient(client *http.Client) *UploadPipelineParams { - var () - return &UploadPipelineParams{ - HTTPClient: client, - } -} - -/*UploadPipelineParams contains all the parameters to send to the API endpoint -for the upload pipeline operation typically these are written to a http.Request -*/ -type UploadPipelineParams struct { - - /*Description*/ - Description *string - /*Name*/ - Name *string - /*Uploadfile - The pipeline to upload. Maximum size of 32MB is supported. - - */ - Uploadfile runtime.NamedReadCloser - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the upload pipeline params -func (o *UploadPipelineParams) WithTimeout(timeout time.Duration) *UploadPipelineParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upload pipeline params -func (o *UploadPipelineParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upload pipeline params -func (o *UploadPipelineParams) WithContext(ctx context.Context) *UploadPipelineParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upload pipeline params -func (o *UploadPipelineParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upload pipeline params -func (o *UploadPipelineParams) WithHTTPClient(client *http.Client) *UploadPipelineParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upload pipeline params -func (o *UploadPipelineParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDescription adds the description to the upload pipeline params -func (o *UploadPipelineParams) WithDescription(description *string) *UploadPipelineParams { - o.SetDescription(description) - return o -} - -// SetDescription adds the description to the upload pipeline params -func (o *UploadPipelineParams) SetDescription(description *string) { - o.Description = description -} - -// WithName adds the name to the upload pipeline params -func (o *UploadPipelineParams) WithName(name *string) *UploadPipelineParams { - o.SetName(name) - return o -} - -// SetName adds the name to the upload pipeline params -func (o *UploadPipelineParams) SetName(name *string) { - o.Name = name -} - -// WithUploadfile adds the uploadfile to the upload pipeline params -func (o *UploadPipelineParams) WithUploadfile(uploadfile runtime.NamedReadCloser) *UploadPipelineParams { - o.SetUploadfile(uploadfile) - return o -} - -// SetUploadfile adds the uploadfile to the upload pipeline params -func (o *UploadPipelineParams) SetUploadfile(uploadfile runtime.NamedReadCloser) { - o.Uploadfile = uploadfile -} - -// WriteToRequest writes these params to a swagger request -func (o *UploadPipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Description != nil { - - // query param description - var qrDescription string - if o.Description != nil { - qrDescription = *o.Description - } - qDescription := qrDescription - if qDescription != "" { - if err := r.SetQueryParam("description", qDescription); err != nil { - return err - } - } - - } - - if o.Name != nil { - - // query param name - var qrName string - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - - } - - // form file param uploadfile - if err := r.SetFileParam("uploadfile", o.Uploadfile); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go deleted file mode 100644 index f845c01fd0..0000000000 --- a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_upload_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_upload_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_upload_model" -) - -// UploadPipelineReader is a Reader for the UploadPipeline structure. -type UploadPipelineReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UploadPipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewUploadPipelineOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewUploadPipelineDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUploadPipelineOK creates a UploadPipelineOK with default headers values -func NewUploadPipelineOK() *UploadPipelineOK { - return &UploadPipelineOK{} -} - -/*UploadPipelineOK handles this case with default header values. - -UploadPipelineOK upload pipeline o k -*/ -type UploadPipelineOK struct { - Payload *pipeline_upload_model.V1Pipeline -} - -func (o *UploadPipelineOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipelines/upload][%d] uploadPipelineOK %+v", 200, o.Payload) -} - -func (o *UploadPipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_upload_model.V1Pipeline) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUploadPipelineDefault creates a UploadPipelineDefault with default headers values -func NewUploadPipelineDefault(code int) *UploadPipelineDefault { - return &UploadPipelineDefault{ - _statusCode: code, - } -} - -/*UploadPipelineDefault handles this case with default header values. - -UploadPipelineDefault upload pipeline default -*/ -type UploadPipelineDefault struct { - _statusCode int - - Payload *pipeline_upload_model.V1Status -} - -// Code gets the status code for the upload pipeline default response -func (o *UploadPipelineDefault) Code() int { - return o._statusCode -} - -func (o *UploadPipelineDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipelines/upload][%d] UploadPipeline default %+v", o._statusCode, o.Payload) -} - -func (o *UploadPipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_upload_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go deleted file mode 100644 index 6a056609f7..0000000000 --- a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_upload_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewUploadPipelineVersionParams creates a new UploadPipelineVersionParams object -// with the default values initialized. -func NewUploadPipelineVersionParams() *UploadPipelineVersionParams { - var () - return &UploadPipelineVersionParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewUploadPipelineVersionParamsWithTimeout creates a new UploadPipelineVersionParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewUploadPipelineVersionParamsWithTimeout(timeout time.Duration) *UploadPipelineVersionParams { - var () - return &UploadPipelineVersionParams{ - - timeout: timeout, - } -} - -// NewUploadPipelineVersionParamsWithContext creates a new UploadPipelineVersionParams object -// with the default values initialized, and the ability to set a context for a request -func NewUploadPipelineVersionParamsWithContext(ctx context.Context) *UploadPipelineVersionParams { - var () - return &UploadPipelineVersionParams{ - - Context: ctx, - } -} - -// NewUploadPipelineVersionParamsWithHTTPClient creates a new UploadPipelineVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewUploadPipelineVersionParamsWithHTTPClient(client *http.Client) *UploadPipelineVersionParams { - var () - return &UploadPipelineVersionParams{ - HTTPClient: client, - } -} - -/*UploadPipelineVersionParams contains all the parameters to send to the API endpoint -for the upload pipeline version operation typically these are written to a http.Request -*/ -type UploadPipelineVersionParams struct { - - /*Description*/ - Description *string - /*Name*/ - Name *string - /*Pipelineid*/ - Pipelineid *string - /*Uploadfile - The pipeline to upload. Maximum size of 32MB is supported. - - */ - Uploadfile runtime.NamedReadCloser - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the upload pipeline version params -func (o *UploadPipelineVersionParams) WithTimeout(timeout time.Duration) *UploadPipelineVersionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upload pipeline version params -func (o *UploadPipelineVersionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upload pipeline version params -func (o *UploadPipelineVersionParams) WithContext(ctx context.Context) *UploadPipelineVersionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upload pipeline version params -func (o *UploadPipelineVersionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upload pipeline version params -func (o *UploadPipelineVersionParams) WithHTTPClient(client *http.Client) *UploadPipelineVersionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upload pipeline version params -func (o *UploadPipelineVersionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithDescription adds the description to the upload pipeline version params -func (o *UploadPipelineVersionParams) WithDescription(description *string) *UploadPipelineVersionParams { - o.SetDescription(description) - return o -} - -// SetDescription adds the description to the upload pipeline version params -func (o *UploadPipelineVersionParams) SetDescription(description *string) { - o.Description = description -} - -// WithName adds the name to the upload pipeline version params -func (o *UploadPipelineVersionParams) WithName(name *string) *UploadPipelineVersionParams { - o.SetName(name) - return o -} - -// SetName adds the name to the upload pipeline version params -func (o *UploadPipelineVersionParams) SetName(name *string) { - o.Name = name -} - -// WithPipelineid adds the pipelineid to the upload pipeline version params -func (o *UploadPipelineVersionParams) WithPipelineid(pipelineid *string) *UploadPipelineVersionParams { - o.SetPipelineid(pipelineid) - return o -} - -// SetPipelineid adds the pipelineid to the upload pipeline version params -func (o *UploadPipelineVersionParams) SetPipelineid(pipelineid *string) { - o.Pipelineid = pipelineid -} - -// WithUploadfile adds the uploadfile to the upload pipeline version params -func (o *UploadPipelineVersionParams) WithUploadfile(uploadfile runtime.NamedReadCloser) *UploadPipelineVersionParams { - o.SetUploadfile(uploadfile) - return o -} - -// SetUploadfile adds the uploadfile to the upload pipeline version params -func (o *UploadPipelineVersionParams) SetUploadfile(uploadfile runtime.NamedReadCloser) { - o.Uploadfile = uploadfile -} - -// WriteToRequest writes these params to a swagger request -func (o *UploadPipelineVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Description != nil { - - // query param description - var qrDescription string - if o.Description != nil { - qrDescription = *o.Description - } - qDescription := qrDescription - if qDescription != "" { - if err := r.SetQueryParam("description", qDescription); err != nil { - return err - } - } - - } - - if o.Name != nil { - - // query param name - var qrName string - if o.Name != nil { - qrName = *o.Name - } - qName := qrName - if qName != "" { - if err := r.SetQueryParam("name", qName); err != nil { - return err - } - } - - } - - if o.Pipelineid != nil { - - // query param pipelineid - var qrPipelineid string - if o.Pipelineid != nil { - qrPipelineid = *o.Pipelineid - } - qPipelineid := qrPipelineid - if qPipelineid != "" { - if err := r.SetQueryParam("pipelineid", qPipelineid); err != nil { - return err - } - } - - } - - // form file param uploadfile - if err := r.SetFileParam("uploadfile", o.Uploadfile); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go b/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go deleted file mode 100644 index 0db67d86d3..0000000000 --- a/backend/api/v1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_upload_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - pipeline_upload_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/pipeline_upload_model" -) - -// UploadPipelineVersionReader is a Reader for the UploadPipelineVersion structure. -type UploadPipelineVersionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UploadPipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewUploadPipelineVersionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewUploadPipelineVersionDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUploadPipelineVersionOK creates a UploadPipelineVersionOK with default headers values -func NewUploadPipelineVersionOK() *UploadPipelineVersionOK { - return &UploadPipelineVersionOK{} -} - -/*UploadPipelineVersionOK handles this case with default header values. - -UploadPipelineVersionOK upload pipeline version o k -*/ -type UploadPipelineVersionOK struct { - Payload *pipeline_upload_model.V1PipelineVersion -} - -func (o *UploadPipelineVersionOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipelines/upload_version][%d] uploadPipelineVersionOK %+v", 200, o.Payload) -} - -func (o *UploadPipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_upload_model.V1PipelineVersion) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUploadPipelineVersionDefault creates a UploadPipelineVersionDefault with default headers values -func NewUploadPipelineVersionDefault(code int) *UploadPipelineVersionDefault { - return &UploadPipelineVersionDefault{ - _statusCode: code, - } -} - -/*UploadPipelineVersionDefault handles this case with default header values. - -UploadPipelineVersionDefault upload pipeline version default -*/ -type UploadPipelineVersionDefault struct { - _statusCode int - - Payload *pipeline_upload_model.V1Status -} - -// Code gets the status code for the upload pipeline version default response -func (o *UploadPipelineVersionDefault) Code() int { - return o._statusCode -} - -func (o *UploadPipelineVersionDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/pipelines/upload_version][%d] UploadPipelineVersion default %+v", o._statusCode, o.Payload) -} - -func (o *UploadPipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(pipeline_upload_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/googlerpc_status.go b/backend/api/v1/go_http_client/pipeline_upload_model/googlerpc_status.go new file mode 100644 index 0000000000..b2aa4d4ebb --- /dev/null +++ b/backend/api/v1/go_http_client/pipeline_upload_model/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_upload_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/protobuf_any.go b/backend/api/v1/go_http_client/pipeline_upload_model/protobuf_any.go index 80a4d4cd71..b17f98cc12 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_model/protobuf_any.go +++ b/backend/api/v1/go_http_client/pipeline_upload_model/protobuf_any.go @@ -6,9 +6,9 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,42 +20,42 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// 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 { -// ... -// } +// 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 @@ -63,34 +63,34 @@ import ( // 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; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@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" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,35 +120,16 @@ type ProtobufAny struct { // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` - - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + AtType string `json:"@type,omitempty"` } // Validate validates this protobuf any func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { - - if swag.IsZero(m.Value) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/v1_parameter.go b/backend/api/v1/go_http_client/pipeline_upload_model/v1_parameter.go index 3881faad64..795c951e33 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_model/v1_parameter.go +++ b/backend/api/v1/go_http_client/pipeline_upload_model/v1_parameter.go @@ -6,12 +6,14 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1Parameter v1 parameter +// // swagger:model v1Parameter type V1Parameter struct { @@ -27,6 +29,11 @@ func (m *V1Parameter) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 parameter based on context it is used +func (m *V1Parameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1Parameter) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/v1_pipeline.go b/backend/api/v1/go_http_client/pipeline_upload_model/v1_pipeline.go index 83f462982b..100297dbc2 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_model/v1_pipeline.go +++ b/backend/api/v1/go_http_client/pipeline_upload_model/v1_pipeline.go @@ -6,16 +6,17 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V1Pipeline v1 pipeline +// // swagger:model v1Pipeline type V1Pipeline struct { @@ -60,7 +61,6 @@ func (m *V1Pipeline) Validate(formats strfmt.Registry) error { } func (m *V1Pipeline) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -73,7 +73,6 @@ func (m *V1Pipeline) validateCreatedAt(formats strfmt.Registry) error { } func (m *V1Pipeline) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -87,6 +86,42 @@ func (m *V1Pipeline) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 pipeline based on the context it is used +func (m *V1Pipeline) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Pipeline) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/v1_pipeline_version.go b/backend/api/v1/go_http_client/pipeline_upload_model/v1_pipeline_version.go index 020b5591ae..93dc8f0fd9 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_model/v1_pipeline_version.go +++ b/backend/api/v1/go_http_client/pipeline_upload_model/v1_pipeline_version.go @@ -6,16 +6,17 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V1PipelineVersion v1 pipeline version +// // swagger:model v1PipelineVersion type V1PipelineVersion struct { @@ -72,7 +73,6 @@ func (m *V1PipelineVersion) Validate(formats strfmt.Registry) error { } func (m *V1PipelineVersion) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -85,7 +85,6 @@ func (m *V1PipelineVersion) validateCreatedAt(formats strfmt.Registry) error { } func (m *V1PipelineVersion) validatePackageURL(formats strfmt.Registry) error { - if swag.IsZero(m.PackageURL) { // not required return nil } @@ -94,6 +93,8 @@ func (m *V1PipelineVersion) validatePackageURL(formats strfmt.Registry) error { if err := m.PackageURL.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") } return err } @@ -103,7 +104,6 @@ func (m *V1PipelineVersion) validatePackageURL(formats strfmt.Registry) error { } func (m *V1PipelineVersion) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -117,6 +117,8 @@ func (m *V1PipelineVersion) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -128,7 +130,6 @@ func (m *V1PipelineVersion) validateParameters(formats strfmt.Registry) error { } func (m *V1PipelineVersion) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -142,6 +143,86 @@ func (m *V1PipelineVersion) validateResourceReferences(formats strfmt.Registry) if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 pipeline version based on the context it is used +func (m *V1PipelineVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePackageURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PipelineVersion) contextValidatePackageURL(ctx context.Context, formats strfmt.Registry) error { + + if m.PackageURL != nil { + if err := m.PackageURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") + } + return err + } + } + + return nil +} + +func (m *V1PipelineVersion) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PipelineVersion) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/v1_relationship.go b/backend/api/v1/go_http_client/pipeline_upload_model/v1_relationship.go index 0ba634ee20..2770fae015 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_model/v1_relationship.go +++ b/backend/api/v1/go_http_client/pipeline_upload_model/v1_relationship.go @@ -6,18 +6,28 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1Relationship v1 relationship +// // swagger:model v1Relationship type V1Relationship string +func NewV1Relationship(value V1Relationship) *V1Relationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1Relationship. +func (m V1Relationship) Pointer() *V1Relationship { + return &m +} + const ( // V1RelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m V1Relationship) validateV1RelationshipEnum(path, location string, value V1Relationship) error { - if err := validate.Enum(path, location, value, v1RelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1RelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m V1Relationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 relationship based on context it is used +func (m V1Relationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_key.go b/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_key.go index e4fe5e0b5b..73c96c1d28 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_key.go +++ b/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_key.go @@ -6,13 +6,15 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceKey v1 resource key +// // swagger:model v1ResourceKey type V1ResourceKey struct { @@ -20,7 +22,7 @@ type V1ResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type V1ResourceType `json:"type,omitempty"` + Type *V1ResourceType `json:"type,omitempty"` } // Validate validates this v1 resource key @@ -38,16 +40,49 @@ func (m *V1ResourceKey) Validate(formats strfmt.Registry) error { } func (m *V1ResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource key based on the context it is used +func (m *V1ResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_reference.go b/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_reference.go index ea3d60f17c..03c3d3e6da 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_reference.go +++ b/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_reference.go @@ -6,13 +6,15 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceReference v1 resource reference +// // swagger:model v1ResourceReference type V1ResourceReference struct { @@ -23,7 +25,7 @@ type V1ResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship V1Relationship `json:"relationship,omitempty"` + Relationship *V1Relationship `json:"relationship,omitempty"` } // Validate validates this v1 resource reference @@ -45,7 +47,6 @@ func (m *V1ResourceReference) Validate(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,69 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource reference based on the context it is used +func (m *V1ResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *V1ResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_type.go b/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_type.go index f269731ac0..e3d32344fe 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_type.go +++ b/backend/api/v1/go_http_client/pipeline_upload_model/v1_resource_type.go @@ -6,18 +6,28 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1ResourceType v1 resource type +// // swagger:model v1ResourceType type V1ResourceType string +func NewV1ResourceType(value V1ResourceType) *V1ResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1ResourceType. +func (m V1ResourceType) Pointer() *V1ResourceType { + return &m +} + const ( // V1ResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m V1ResourceType) validateV1ResourceTypeEnum(path, location string, value V1ResourceType) error { - if err := validate.Enum(path, location, value, v1ResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1ResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m V1ResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 resource type based on context it is used +func (m V1ResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/v1_status.go b/backend/api/v1/go_http_client/pipeline_upload_model/v1_status.go deleted file mode 100644 index a7c1f01f2a..0000000000 --- a/backend/api/v1/go_http_client/pipeline_upload_model/v1_status.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_upload_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// V1Status v1 status -// swagger:model v1Status -type V1Status struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` -} - -// Validate validates this v1 status -func (m *V1Status) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1Status) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1Status) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1Status) UnmarshalBinary(b []byte) error { - var res V1Status - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1/go_http_client/pipeline_upload_model/v1_url.go b/backend/api/v1/go_http_client/pipeline_upload_model/v1_url.go index 3dd49073d6..7bcc5269dc 100644 --- a/backend/api/v1/go_http_client/pipeline_upload_model/v1_url.go +++ b/backend/api/v1/go_http_client/pipeline_upload_model/v1_url.go @@ -6,12 +6,14 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1URL v1 Url +// // swagger:model v1Url type V1URL struct { @@ -24,6 +26,11 @@ func (m *V1URL) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 Url based on context it is used +func (m *V1URL) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1URL) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/run_client/run_client.go b/backend/api/v1/go_http_client/run_client/run_client.go index 4e2808604e..95957b4e14 100644 --- a/backend/api/v1/go_http_client/run_client/run_client.go +++ b/backend/api/v1/go_http_client/run_client/run_client.go @@ -8,8 +8,7 @@ package run_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_client/run_service" ) @@ -27,7 +26,7 @@ const ( ) // DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http", "https"} +var DefaultSchemes = []string{"http"} // NewHTTPClient creates a new run HTTP client. func NewHTTPClient(formats strfmt.Registry) *Run { @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Run { cli := new(Run) cli.Transport = transport - cli.RunService = run_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Run is a client for run type Run struct { - RunService *run_service.Client + RunService run_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Run struct { // SetTransport changes the transport on the client and all its subresources func (c *Run) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.RunService.SetTransport(transport) - } diff --git a/backend/api/v1/go_http_client/run_client/run_service/archive_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/archive_run_parameters.go deleted file mode 100644 index 71672a67d8..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/archive_run_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewArchiveRunParams creates a new ArchiveRunParams object -// with the default values initialized. -func NewArchiveRunParams() *ArchiveRunParams { - var () - return &ArchiveRunParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewArchiveRunParamsWithTimeout creates a new ArchiveRunParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewArchiveRunParamsWithTimeout(timeout time.Duration) *ArchiveRunParams { - var () - return &ArchiveRunParams{ - - timeout: timeout, - } -} - -// NewArchiveRunParamsWithContext creates a new ArchiveRunParams object -// with the default values initialized, and the ability to set a context for a request -func NewArchiveRunParamsWithContext(ctx context.Context) *ArchiveRunParams { - var () - return &ArchiveRunParams{ - - Context: ctx, - } -} - -// NewArchiveRunParamsWithHTTPClient creates a new ArchiveRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewArchiveRunParamsWithHTTPClient(client *http.Client) *ArchiveRunParams { - var () - return &ArchiveRunParams{ - HTTPClient: client, - } -} - -/*ArchiveRunParams contains all the parameters to send to the API endpoint -for the archive run operation typically these are written to a http.Request -*/ -type ArchiveRunParams struct { - - /*ID - The ID of the run to be archived. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the archive run params -func (o *ArchiveRunParams) WithTimeout(timeout time.Duration) *ArchiveRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the archive run params -func (o *ArchiveRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the archive run params -func (o *ArchiveRunParams) WithContext(ctx context.Context) *ArchiveRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the archive run params -func (o *ArchiveRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the archive run params -func (o *ArchiveRunParams) WithHTTPClient(client *http.Client) *ArchiveRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the archive run params -func (o *ArchiveRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the archive run params -func (o *ArchiveRunParams) WithID(id string) *ArchiveRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the archive run params -func (o *ArchiveRunParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ArchiveRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/archive_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/archive_run_responses.go deleted file mode 100644 index 55f9d4c0b1..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/archive_run_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// ArchiveRunReader is a Reader for the ArchiveRun structure. -type ArchiveRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArchiveRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewArchiveRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewArchiveRunDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArchiveRunOK creates a ArchiveRunOK with default headers values -func NewArchiveRunOK() *ArchiveRunOK { - return &ArchiveRunOK{} -} - -/*ArchiveRunOK handles this case with default header values. - -A successful response. -*/ -type ArchiveRunOK struct { - Payload interface{} -} - -func (o *ArchiveRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{id}:archive][%d] archiveRunOK %+v", 200, o.Payload) -} - -func (o *ArchiveRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArchiveRunDefault creates a ArchiveRunDefault with default headers values -func NewArchiveRunDefault(code int) *ArchiveRunDefault { - return &ArchiveRunDefault{ - _statusCode: code, - } -} - -/*ArchiveRunDefault handles this case with default header values. - -ArchiveRunDefault archive run default -*/ -type ArchiveRunDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the archive run default response -func (o *ArchiveRunDefault) Code() int { - return o._statusCode -} - -func (o *ArchiveRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{id}:archive][%d] ArchiveRun default %+v", o._statusCode, o.Payload) -} - -func (o *ArchiveRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/create_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/create_run_parameters.go deleted file mode 100644 index ac9afea96a..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/create_run_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// NewCreateRunParams creates a new CreateRunParams object -// with the default values initialized. -func NewCreateRunParams() *CreateRunParams { - var () - return &CreateRunParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewCreateRunParamsWithTimeout creates a new CreateRunParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewCreateRunParamsWithTimeout(timeout time.Duration) *CreateRunParams { - var () - return &CreateRunParams{ - - timeout: timeout, - } -} - -// NewCreateRunParamsWithContext creates a new CreateRunParams object -// with the default values initialized, and the ability to set a context for a request -func NewCreateRunParamsWithContext(ctx context.Context) *CreateRunParams { - var () - return &CreateRunParams{ - - Context: ctx, - } -} - -// NewCreateRunParamsWithHTTPClient creates a new CreateRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewCreateRunParamsWithHTTPClient(client *http.Client) *CreateRunParams { - var () - return &CreateRunParams{ - HTTPClient: client, - } -} - -/*CreateRunParams contains all the parameters to send to the API endpoint -for the create run operation typically these are written to a http.Request -*/ -type CreateRunParams struct { - - /*Body*/ - Body *run_model.V1Run - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the create run params -func (o *CreateRunParams) WithTimeout(timeout time.Duration) *CreateRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create run params -func (o *CreateRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create run params -func (o *CreateRunParams) WithContext(ctx context.Context) *CreateRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create run params -func (o *CreateRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create run params -func (o *CreateRunParams) WithHTTPClient(client *http.Client) *CreateRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create run params -func (o *CreateRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create run params -func (o *CreateRunParams) WithBody(body *run_model.V1Run) *CreateRunParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create run params -func (o *CreateRunParams) SetBody(body *run_model.V1Run) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/create_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/create_run_responses.go deleted file mode 100644 index 4207c22019..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/create_run_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// CreateRunReader is a Reader for the CreateRun structure. -type CreateRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewCreateRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewCreateRunDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreateRunOK creates a CreateRunOK with default headers values -func NewCreateRunOK() *CreateRunOK { - return &CreateRunOK{} -} - -/*CreateRunOK handles this case with default header values. - -A successful response. -*/ -type CreateRunOK struct { - Payload *run_model.V1RunDetail -} - -func (o *CreateRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs][%d] createRunOK %+v", 200, o.Payload) -} - -func (o *CreateRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1RunDetail) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateRunDefault creates a CreateRunDefault with default headers values -func NewCreateRunDefault(code int) *CreateRunDefault { - return &CreateRunDefault{ - _statusCode: code, - } -} - -/*CreateRunDefault handles this case with default header values. - -CreateRunDefault create run default -*/ -type CreateRunDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the create run default response -func (o *CreateRunDefault) Code() int { - return o._statusCode -} - -func (o *CreateRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs][%d] CreateRun default %+v", o._statusCode, o.Payload) -} - -func (o *CreateRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/delete_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/delete_run_parameters.go deleted file mode 100644 index baf7313f27..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/delete_run_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDeleteRunParams creates a new DeleteRunParams object -// with the default values initialized. -func NewDeleteRunParams() *DeleteRunParams { - var () - return &DeleteRunParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteRunParamsWithTimeout creates a new DeleteRunParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDeleteRunParamsWithTimeout(timeout time.Duration) *DeleteRunParams { - var () - return &DeleteRunParams{ - - timeout: timeout, - } -} - -// NewDeleteRunParamsWithContext creates a new DeleteRunParams object -// with the default values initialized, and the ability to set a context for a request -func NewDeleteRunParamsWithContext(ctx context.Context) *DeleteRunParams { - var () - return &DeleteRunParams{ - - Context: ctx, - } -} - -// NewDeleteRunParamsWithHTTPClient creates a new DeleteRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDeleteRunParamsWithHTTPClient(client *http.Client) *DeleteRunParams { - var () - return &DeleteRunParams{ - HTTPClient: client, - } -} - -/*DeleteRunParams contains all the parameters to send to the API endpoint -for the delete run operation typically these are written to a http.Request -*/ -type DeleteRunParams struct { - - /*ID - The ID of the run to be deleted. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the delete run params -func (o *DeleteRunParams) WithTimeout(timeout time.Duration) *DeleteRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete run params -func (o *DeleteRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete run params -func (o *DeleteRunParams) WithContext(ctx context.Context) *DeleteRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete run params -func (o *DeleteRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete run params -func (o *DeleteRunParams) WithHTTPClient(client *http.Client) *DeleteRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete run params -func (o *DeleteRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the delete run params -func (o *DeleteRunParams) WithID(id string) *DeleteRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the delete run params -func (o *DeleteRunParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/delete_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/delete_run_responses.go deleted file mode 100644 index 6a76cf985a..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/delete_run_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// DeleteRunReader is a Reader for the DeleteRun structure. -type DeleteRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewDeleteRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewDeleteRunDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDeleteRunOK creates a DeleteRunOK with default headers values -func NewDeleteRunOK() *DeleteRunOK { - return &DeleteRunOK{} -} - -/*DeleteRunOK handles this case with default header values. - -A successful response. -*/ -type DeleteRunOK struct { - Payload interface{} -} - -func (o *DeleteRunOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/runs/{id}][%d] deleteRunOK %+v", 200, o.Payload) -} - -func (o *DeleteRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteRunDefault creates a DeleteRunDefault with default headers values -func NewDeleteRunDefault(code int) *DeleteRunDefault { - return &DeleteRunDefault{ - _statusCode: code, - } -} - -/*DeleteRunDefault handles this case with default header values. - -DeleteRunDefault delete run default -*/ -type DeleteRunDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the delete run default response -func (o *DeleteRunDefault) Code() int { - return o._statusCode -} - -func (o *DeleteRunDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v1/runs/{id}][%d] DeleteRun default %+v", o._statusCode, o.Payload) -} - -func (o *DeleteRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/get_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/get_run_parameters.go deleted file mode 100644 index acbd617e1c..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/get_run_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetRunParams creates a new GetRunParams object -// with the default values initialized. -func NewGetRunParams() *GetRunParams { - var () - return &GetRunParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetRunParamsWithTimeout creates a new GetRunParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetRunParamsWithTimeout(timeout time.Duration) *GetRunParams { - var () - return &GetRunParams{ - - timeout: timeout, - } -} - -// NewGetRunParamsWithContext creates a new GetRunParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetRunParamsWithContext(ctx context.Context) *GetRunParams { - var () - return &GetRunParams{ - - Context: ctx, - } -} - -// NewGetRunParamsWithHTTPClient creates a new GetRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetRunParamsWithHTTPClient(client *http.Client) *GetRunParams { - var () - return &GetRunParams{ - HTTPClient: client, - } -} - -/*GetRunParams contains all the parameters to send to the API endpoint -for the get run operation typically these are written to a http.Request -*/ -type GetRunParams struct { - - /*RunID - The ID of the run to be retrieved. - - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get run params -func (o *GetRunParams) WithTimeout(timeout time.Duration) *GetRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get run params -func (o *GetRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get run params -func (o *GetRunParams) WithContext(ctx context.Context) *GetRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get run params -func (o *GetRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get run params -func (o *GetRunParams) WithHTTPClient(client *http.Client) *GetRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get run params -func (o *GetRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRunID adds the runID to the get run params -func (o *GetRunParams) WithRunID(runID string) *GetRunParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get run params -func (o *GetRunParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param run_id - if err := r.SetPathParam("run_id", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/get_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/get_run_responses.go deleted file mode 100644 index aa195a2149..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/get_run_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// GetRunReader is a Reader for the GetRun structure. -type GetRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewGetRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewGetRunDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetRunOK creates a GetRunOK with default headers values -func NewGetRunOK() *GetRunOK { - return &GetRunOK{} -} - -/*GetRunOK handles this case with default header values. - -A successful response. -*/ -type GetRunOK struct { - Payload *run_model.V1RunDetail -} - -func (o *GetRunOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/runs/{run_id}][%d] getRunOK %+v", 200, o.Payload) -} - -func (o *GetRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1RunDetail) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetRunDefault creates a GetRunDefault with default headers values -func NewGetRunDefault(code int) *GetRunDefault { - return &GetRunDefault{ - _statusCode: code, - } -} - -/*GetRunDefault handles this case with default header values. - -GetRunDefault get run default -*/ -type GetRunDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the get run default response -func (o *GetRunDefault) Code() int { - return o._statusCode -} - -func (o *GetRunDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/runs/{run_id}][%d] GetRun default %+v", o._statusCode, o.Payload) -} - -func (o *GetRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/list_runs_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/list_runs_parameters.go deleted file mode 100644 index 48772548ee..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/list_runs_parameters.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewListRunsParams creates a new ListRunsParams object -// with the default values initialized. -func NewListRunsParams() *ListRunsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListRunsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - timeout: cr.DefaultTimeout, - } -} - -// NewListRunsParamsWithTimeout creates a new ListRunsParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewListRunsParamsWithTimeout(timeout time.Duration) *ListRunsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListRunsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - timeout: timeout, - } -} - -// NewListRunsParamsWithContext creates a new ListRunsParams object -// with the default values initialized, and the ability to set a context for a request -func NewListRunsParamsWithContext(ctx context.Context) *ListRunsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListRunsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - - Context: ctx, - } -} - -// NewListRunsParamsWithHTTPClient creates a new ListRunsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewListRunsParamsWithHTTPClient(client *http.Client) *ListRunsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) - return &ListRunsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - HTTPClient: client, - } -} - -/*ListRunsParams contains all the parameters to send to the API endpoint -for the list runs operation typically these are written to a http.Request -*/ -type ListRunsParams struct { - - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). - - */ - Filter *string - /*PageSize - 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. - - */ - PageSize *int32 - /*PageToken - 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. - - */ - PageToken *string - /*ResourceReferenceKeyID - The ID of the resource that referred to. - - */ - ResourceReferenceKeyID *string - /*ResourceReferenceKeyType - The type of the resource that referred to. - - */ - ResourceReferenceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - (Example, "name asc" or "id desc"). Ascending by default. - - */ - SortBy *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the list runs params -func (o *ListRunsParams) WithTimeout(timeout time.Duration) *ListRunsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list runs params -func (o *ListRunsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list runs params -func (o *ListRunsParams) WithContext(ctx context.Context) *ListRunsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list runs params -func (o *ListRunsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list runs params -func (o *ListRunsParams) WithHTTPClient(client *http.Client) *ListRunsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list runs params -func (o *ListRunsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithFilter adds the filter to the list runs params -func (o *ListRunsParams) WithFilter(filter *string) *ListRunsParams { - o.SetFilter(filter) - return o -} - -// SetFilter adds the filter to the list runs params -func (o *ListRunsParams) SetFilter(filter *string) { - o.Filter = filter -} - -// WithPageSize adds the pageSize to the list runs params -func (o *ListRunsParams) WithPageSize(pageSize *int32) *ListRunsParams { - o.SetPageSize(pageSize) - return o -} - -// SetPageSize adds the pageSize to the list runs params -func (o *ListRunsParams) SetPageSize(pageSize *int32) { - o.PageSize = pageSize -} - -// WithPageToken adds the pageToken to the list runs params -func (o *ListRunsParams) WithPageToken(pageToken *string) *ListRunsParams { - o.SetPageToken(pageToken) - return o -} - -// SetPageToken adds the pageToken to the list runs params -func (o *ListRunsParams) SetPageToken(pageToken *string) { - o.PageToken = pageToken -} - -// WithResourceReferenceKeyID adds the resourceReferenceKeyID to the list runs params -func (o *ListRunsParams) WithResourceReferenceKeyID(resourceReferenceKeyID *string) *ListRunsParams { - o.SetResourceReferenceKeyID(resourceReferenceKeyID) - return o -} - -// SetResourceReferenceKeyID adds the resourceReferenceKeyId to the list runs params -func (o *ListRunsParams) SetResourceReferenceKeyID(resourceReferenceKeyID *string) { - o.ResourceReferenceKeyID = resourceReferenceKeyID -} - -// WithResourceReferenceKeyType adds the resourceReferenceKeyType to the list runs params -func (o *ListRunsParams) WithResourceReferenceKeyType(resourceReferenceKeyType *string) *ListRunsParams { - o.SetResourceReferenceKeyType(resourceReferenceKeyType) - return o -} - -// SetResourceReferenceKeyType adds the resourceReferenceKeyType to the list runs params -func (o *ListRunsParams) SetResourceReferenceKeyType(resourceReferenceKeyType *string) { - o.ResourceReferenceKeyType = resourceReferenceKeyType -} - -// WithSortBy adds the sortBy to the list runs params -func (o *ListRunsParams) WithSortBy(sortBy *string) *ListRunsParams { - o.SetSortBy(sortBy) - return o -} - -// SetSortBy adds the sortBy to the list runs params -func (o *ListRunsParams) SetSortBy(sortBy *string) { - o.SortBy = sortBy -} - -// WriteToRequest writes these params to a swagger request -func (o *ListRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Filter != nil { - - // query param filter - var qrFilter string - if o.Filter != nil { - qrFilter = *o.Filter - } - qFilter := qrFilter - if qFilter != "" { - if err := r.SetQueryParam("filter", qFilter); err != nil { - return err - } - } - - } - - if o.PageSize != nil { - - // query param page_size - var qrPageSize int32 - if o.PageSize != nil { - qrPageSize = *o.PageSize - } - qPageSize := swag.FormatInt32(qrPageSize) - if qPageSize != "" { - if err := r.SetQueryParam("page_size", qPageSize); err != nil { - return err - } - } - - } - - if o.PageToken != nil { - - // query param page_token - var qrPageToken string - if o.PageToken != nil { - qrPageToken = *o.PageToken - } - qPageToken := qrPageToken - if qPageToken != "" { - if err := r.SetQueryParam("page_token", qPageToken); err != nil { - return err - } - } - - } - - if o.ResourceReferenceKeyID != nil { - - // query param resource_reference_key.id - var qrResourceReferenceKeyID string - if o.ResourceReferenceKeyID != nil { - qrResourceReferenceKeyID = *o.ResourceReferenceKeyID - } - qResourceReferenceKeyID := qrResourceReferenceKeyID - if qResourceReferenceKeyID != "" { - if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { - return err - } - } - - } - - if o.ResourceReferenceKeyType != nil { - - // query param resource_reference_key.type - var qrResourceReferenceKeyType string - if o.ResourceReferenceKeyType != nil { - qrResourceReferenceKeyType = *o.ResourceReferenceKeyType - } - qResourceReferenceKeyType := qrResourceReferenceKeyType - if qResourceReferenceKeyType != "" { - if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { - return err - } - } - - } - - if o.SortBy != nil { - - // query param sort_by - var qrSortBy string - if o.SortBy != nil { - qrSortBy = *o.SortBy - } - qSortBy := qrSortBy - if qSortBy != "" { - if err := r.SetQueryParam("sort_by", qSortBy); err != nil { - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/list_runs_responses.go b/backend/api/v1/go_http_client/run_client/run_service/list_runs_responses.go deleted file mode 100644 index 736fee99fc..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/list_runs_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// ListRunsReader is a Reader for the ListRuns structure. -type ListRunsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewListRunsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewListRunsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListRunsOK creates a ListRunsOK with default headers values -func NewListRunsOK() *ListRunsOK { - return &ListRunsOK{} -} - -/*ListRunsOK handles this case with default header values. - -A successful response. -*/ -type ListRunsOK struct { - Payload *run_model.V1ListRunsResponse -} - -func (o *ListRunsOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/runs][%d] listRunsOK %+v", 200, o.Payload) -} - -func (o *ListRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1ListRunsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListRunsDefault creates a ListRunsDefault with default headers values -func NewListRunsDefault(code int) *ListRunsDefault { - return &ListRunsDefault{ - _statusCode: code, - } -} - -/*ListRunsDefault handles this case with default header values. - -ListRunsDefault list runs default -*/ -type ListRunsDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the list runs default response -func (o *ListRunsDefault) Code() int { - return o._statusCode -} - -func (o *ListRunsDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/runs][%d] ListRuns default %+v", o._statusCode, o.Payload) -} - -func (o *ListRunsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/read_artifact_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/read_artifact_parameters.go deleted file mode 100644 index 8e7243ea31..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/read_artifact_parameters.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewReadArtifactParams creates a new ReadArtifactParams object -// with the default values initialized. -func NewReadArtifactParams() *ReadArtifactParams { - var () - return &ReadArtifactParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewReadArtifactParamsWithTimeout creates a new ReadArtifactParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewReadArtifactParamsWithTimeout(timeout time.Duration) *ReadArtifactParams { - var () - return &ReadArtifactParams{ - - timeout: timeout, - } -} - -// NewReadArtifactParamsWithContext creates a new ReadArtifactParams object -// with the default values initialized, and the ability to set a context for a request -func NewReadArtifactParamsWithContext(ctx context.Context) *ReadArtifactParams { - var () - return &ReadArtifactParams{ - - Context: ctx, - } -} - -// NewReadArtifactParamsWithHTTPClient creates a new ReadArtifactParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewReadArtifactParamsWithHTTPClient(client *http.Client) *ReadArtifactParams { - var () - return &ReadArtifactParams{ - HTTPClient: client, - } -} - -/*ReadArtifactParams contains all the parameters to send to the API endpoint -for the read artifact operation typically these are written to a http.Request -*/ -type ReadArtifactParams struct { - - /*ArtifactName - The name of the artifact. - - */ - ArtifactName string - /*NodeID - The ID of the running node. - - */ - NodeID string - /*RunID - The ID of the run. - - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the read artifact params -func (o *ReadArtifactParams) WithTimeout(timeout time.Duration) *ReadArtifactParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the read artifact params -func (o *ReadArtifactParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the read artifact params -func (o *ReadArtifactParams) WithContext(ctx context.Context) *ReadArtifactParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the read artifact params -func (o *ReadArtifactParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the read artifact params -func (o *ReadArtifactParams) WithHTTPClient(client *http.Client) *ReadArtifactParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the read artifact params -func (o *ReadArtifactParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithArtifactName adds the artifactName to the read artifact params -func (o *ReadArtifactParams) WithArtifactName(artifactName string) *ReadArtifactParams { - o.SetArtifactName(artifactName) - return o -} - -// SetArtifactName adds the artifactName to the read artifact params -func (o *ReadArtifactParams) SetArtifactName(artifactName string) { - o.ArtifactName = artifactName -} - -// WithNodeID adds the nodeID to the read artifact params -func (o *ReadArtifactParams) WithNodeID(nodeID string) *ReadArtifactParams { - o.SetNodeID(nodeID) - return o -} - -// SetNodeID adds the nodeId to the read artifact params -func (o *ReadArtifactParams) SetNodeID(nodeID string) { - o.NodeID = nodeID -} - -// WithRunID adds the runID to the read artifact params -func (o *ReadArtifactParams) WithRunID(runID string) *ReadArtifactParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the read artifact params -func (o *ReadArtifactParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *ReadArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param artifact_name - if err := r.SetPathParam("artifact_name", o.ArtifactName); err != nil { - return err - } - - // path param node_id - if err := r.SetPathParam("node_id", o.NodeID); err != nil { - return err - } - - // path param run_id - if err := r.SetPathParam("run_id", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/read_artifact_responses.go b/backend/api/v1/go_http_client/run_client/run_service/read_artifact_responses.go deleted file mode 100644 index f3f90ff50d..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/read_artifact_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// ReadArtifactReader is a Reader for the ReadArtifact structure. -type ReadArtifactReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ReadArtifactReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewReadArtifactOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewReadArtifactDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewReadArtifactOK creates a ReadArtifactOK with default headers values -func NewReadArtifactOK() *ReadArtifactOK { - return &ReadArtifactOK{} -} - -/*ReadArtifactOK handles this case with default header values. - -A successful response. -*/ -type ReadArtifactOK struct { - Payload *run_model.V1ReadArtifactResponse -} - -func (o *ReadArtifactOK) Error() string { - return fmt.Sprintf("[GET /apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] readArtifactOK %+v", 200, o.Payload) -} - -func (o *ReadArtifactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1ReadArtifactResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReadArtifactDefault creates a ReadArtifactDefault with default headers values -func NewReadArtifactDefault(code int) *ReadArtifactDefault { - return &ReadArtifactDefault{ - _statusCode: code, - } -} - -/*ReadArtifactDefault handles this case with default header values. - -ReadArtifactDefault read artifact default -*/ -type ReadArtifactDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the read artifact default response -func (o *ReadArtifactDefault) Code() int { - return o._statusCode -} - -func (o *ReadArtifactDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] ReadArtifact default %+v", o._statusCode, o.Payload) -} - -func (o *ReadArtifactDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/report_run_metrics_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/report_run_metrics_parameters.go deleted file mode 100644 index b95d29bdd4..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/report_run_metrics_parameters.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// NewReportRunMetricsParams creates a new ReportRunMetricsParams object -// with the default values initialized. -func NewReportRunMetricsParams() *ReportRunMetricsParams { - var () - return &ReportRunMetricsParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewReportRunMetricsParamsWithTimeout creates a new ReportRunMetricsParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewReportRunMetricsParamsWithTimeout(timeout time.Duration) *ReportRunMetricsParams { - var () - return &ReportRunMetricsParams{ - - timeout: timeout, - } -} - -// NewReportRunMetricsParamsWithContext creates a new ReportRunMetricsParams object -// with the default values initialized, and the ability to set a context for a request -func NewReportRunMetricsParamsWithContext(ctx context.Context) *ReportRunMetricsParams { - var () - return &ReportRunMetricsParams{ - - Context: ctx, - } -} - -// NewReportRunMetricsParamsWithHTTPClient creates a new ReportRunMetricsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewReportRunMetricsParamsWithHTTPClient(client *http.Client) *ReportRunMetricsParams { - var () - return &ReportRunMetricsParams{ - HTTPClient: client, - } -} - -/*ReportRunMetricsParams contains all the parameters to send to the API endpoint -for the report run metrics operation typically these are written to a http.Request -*/ -type ReportRunMetricsParams struct { - - /*Body*/ - Body *run_model.V1ReportRunMetricsRequest - /*RunID - Required. The parent run ID of the metric. - - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the report run metrics params -func (o *ReportRunMetricsParams) WithTimeout(timeout time.Duration) *ReportRunMetricsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the report run metrics params -func (o *ReportRunMetricsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the report run metrics params -func (o *ReportRunMetricsParams) WithContext(ctx context.Context) *ReportRunMetricsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the report run metrics params -func (o *ReportRunMetricsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the report run metrics params -func (o *ReportRunMetricsParams) WithHTTPClient(client *http.Client) *ReportRunMetricsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the report run metrics params -func (o *ReportRunMetricsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the report run metrics params -func (o *ReportRunMetricsParams) WithBody(body *run_model.V1ReportRunMetricsRequest) *ReportRunMetricsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the report run metrics params -func (o *ReportRunMetricsParams) SetBody(body *run_model.V1ReportRunMetricsRequest) { - o.Body = body -} - -// WithRunID adds the runID to the report run metrics params -func (o *ReportRunMetricsParams) WithRunID(runID string) *ReportRunMetricsParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the report run metrics params -func (o *ReportRunMetricsParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *ReportRunMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - // path param run_id - if err := r.SetPathParam("run_id", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/report_run_metrics_responses.go b/backend/api/v1/go_http_client/run_client/run_service/report_run_metrics_responses.go deleted file mode 100644 index 83fa5d1cdc..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/report_run_metrics_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// ReportRunMetricsReader is a Reader for the ReportRunMetrics structure. -type ReportRunMetricsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ReportRunMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewReportRunMetricsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewReportRunMetricsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewReportRunMetricsOK creates a ReportRunMetricsOK with default headers values -func NewReportRunMetricsOK() *ReportRunMetricsOK { - return &ReportRunMetricsOK{} -} - -/*ReportRunMetricsOK handles this case with default header values. - -A successful response. -*/ -type ReportRunMetricsOK struct { - Payload *run_model.V1ReportRunMetricsResponse -} - -func (o *ReportRunMetricsOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{run_id}:reportMetrics][%d] reportRunMetricsOK %+v", 200, o.Payload) -} - -func (o *ReportRunMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1ReportRunMetricsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReportRunMetricsDefault creates a ReportRunMetricsDefault with default headers values -func NewReportRunMetricsDefault(code int) *ReportRunMetricsDefault { - return &ReportRunMetricsDefault{ - _statusCode: code, - } -} - -/*ReportRunMetricsDefault handles this case with default header values. - -ReportRunMetricsDefault report run metrics default -*/ -type ReportRunMetricsDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the report run metrics default response -func (o *ReportRunMetricsDefault) Code() int { - return o._statusCode -} - -func (o *ReportRunMetricsDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{run_id}:reportMetrics][%d] ReportRunMetrics default %+v", o._statusCode, o.Payload) -} - -func (o *ReportRunMetricsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/retry_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/retry_run_parameters.go deleted file mode 100644 index 88fb51cb66..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/retry_run_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewRetryRunParams creates a new RetryRunParams object -// with the default values initialized. -func NewRetryRunParams() *RetryRunParams { - var () - return &RetryRunParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewRetryRunParamsWithTimeout creates a new RetryRunParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewRetryRunParamsWithTimeout(timeout time.Duration) *RetryRunParams { - var () - return &RetryRunParams{ - - timeout: timeout, - } -} - -// NewRetryRunParamsWithContext creates a new RetryRunParams object -// with the default values initialized, and the ability to set a context for a request -func NewRetryRunParamsWithContext(ctx context.Context) *RetryRunParams { - var () - return &RetryRunParams{ - - Context: ctx, - } -} - -// NewRetryRunParamsWithHTTPClient creates a new RetryRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewRetryRunParamsWithHTTPClient(client *http.Client) *RetryRunParams { - var () - return &RetryRunParams{ - HTTPClient: client, - } -} - -/*RetryRunParams contains all the parameters to send to the API endpoint -for the retry run operation typically these are written to a http.Request -*/ -type RetryRunParams struct { - - /*RunID - The ID of the run to be retried. - - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the retry run params -func (o *RetryRunParams) WithTimeout(timeout time.Duration) *RetryRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the retry run params -func (o *RetryRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the retry run params -func (o *RetryRunParams) WithContext(ctx context.Context) *RetryRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the retry run params -func (o *RetryRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the retry run params -func (o *RetryRunParams) WithHTTPClient(client *http.Client) *RetryRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the retry run params -func (o *RetryRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRunID adds the runID to the retry run params -func (o *RetryRunParams) WithRunID(runID string) *RetryRunParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the retry run params -func (o *RetryRunParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *RetryRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param run_id - if err := r.SetPathParam("run_id", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/retry_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/retry_run_responses.go deleted file mode 100644 index 7e325340c9..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/retry_run_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// RetryRunReader is a Reader for the RetryRun structure. -type RetryRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RetryRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewRetryRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewRetryRunDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewRetryRunOK creates a RetryRunOK with default headers values -func NewRetryRunOK() *RetryRunOK { - return &RetryRunOK{} -} - -/*RetryRunOK handles this case with default header values. - -A successful response. -*/ -type RetryRunOK struct { - Payload interface{} -} - -func (o *RetryRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/retry][%d] retryRunOK %+v", 200, o.Payload) -} - -func (o *RetryRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRetryRunDefault creates a RetryRunDefault with default headers values -func NewRetryRunDefault(code int) *RetryRunDefault { - return &RetryRunDefault{ - _statusCode: code, - } -} - -/*RetryRunDefault handles this case with default header values. - -RetryRunDefault retry run default -*/ -type RetryRunDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the retry run default response -func (o *RetryRunDefault) Code() int { - return o._statusCode -} - -func (o *RetryRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/retry][%d] RetryRun default %+v", o._statusCode, o.Payload) -} - -func (o *RetryRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_archive_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_archive_run_parameters.go new file mode 100644 index 0000000000..38a8d1baee --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_archive_run_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRunServiceArchiveRunParams creates a new RunServiceArchiveRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceArchiveRunParams() *RunServiceArchiveRunParams { + return &RunServiceArchiveRunParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceArchiveRunParamsWithTimeout creates a new RunServiceArchiveRunParams object +// with the ability to set a timeout on a request. +func NewRunServiceArchiveRunParamsWithTimeout(timeout time.Duration) *RunServiceArchiveRunParams { + return &RunServiceArchiveRunParams{ + timeout: timeout, + } +} + +// NewRunServiceArchiveRunParamsWithContext creates a new RunServiceArchiveRunParams object +// with the ability to set a context for a request. +func NewRunServiceArchiveRunParamsWithContext(ctx context.Context) *RunServiceArchiveRunParams { + return &RunServiceArchiveRunParams{ + Context: ctx, + } +} + +// NewRunServiceArchiveRunParamsWithHTTPClient creates a new RunServiceArchiveRunParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceArchiveRunParamsWithHTTPClient(client *http.Client) *RunServiceArchiveRunParams { + return &RunServiceArchiveRunParams{ + HTTPClient: client, + } +} + +/* +RunServiceArchiveRunParams contains all the parameters to send to the API endpoint + + for the run service archive run operation. + + Typically these are written to a http.Request. +*/ +type RunServiceArchiveRunParams struct { + + /* ID. + + The ID of the run to be archived. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service archive run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceArchiveRunParams) WithDefaults() *RunServiceArchiveRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service archive run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceArchiveRunParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the run service archive run params +func (o *RunServiceArchiveRunParams) WithTimeout(timeout time.Duration) *RunServiceArchiveRunParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service archive run params +func (o *RunServiceArchiveRunParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service archive run params +func (o *RunServiceArchiveRunParams) WithContext(ctx context.Context) *RunServiceArchiveRunParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service archive run params +func (o *RunServiceArchiveRunParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service archive run params +func (o *RunServiceArchiveRunParams) WithHTTPClient(client *http.Client) *RunServiceArchiveRunParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service archive run params +func (o *RunServiceArchiveRunParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the run service archive run params +func (o *RunServiceArchiveRunParams) WithID(id string) *RunServiceArchiveRunParams { + o.SetID(id) + return o +} + +// SetID adds the id to the run service archive run params +func (o *RunServiceArchiveRunParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceArchiveRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_archive_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_archive_run_responses.go new file mode 100644 index 0000000000..84626b755f --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_archive_run_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceArchiveRunReader is a Reader for the RunServiceArchiveRun structure. +type RunServiceArchiveRunReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceArchiveRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceArchiveRunOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceArchiveRunDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceArchiveRunOK creates a RunServiceArchiveRunOK with default headers values +func NewRunServiceArchiveRunOK() *RunServiceArchiveRunOK { + return &RunServiceArchiveRunOK{} +} + +/* +RunServiceArchiveRunOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceArchiveRunOK struct { + Payload interface{} +} + +// IsSuccess returns true when this run service archive run o k response has a 2xx status code +func (o *RunServiceArchiveRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service archive run o k response has a 3xx status code +func (o *RunServiceArchiveRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service archive run o k response has a 4xx status code +func (o *RunServiceArchiveRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service archive run o k response has a 5xx status code +func (o *RunServiceArchiveRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service archive run o k response a status code equal to that given +func (o *RunServiceArchiveRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service archive run o k response +func (o *RunServiceArchiveRunOK) Code() int { + return 200 +} + +func (o *RunServiceArchiveRunOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{id}:archive][%d] runServiceArchiveRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceArchiveRunOK) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{id}:archive][%d] runServiceArchiveRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceArchiveRunOK) GetPayload() interface{} { + return o.Payload +} + +func (o *RunServiceArchiveRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceArchiveRunDefault creates a RunServiceArchiveRunDefault with default headers values +func NewRunServiceArchiveRunDefault(code int) *RunServiceArchiveRunDefault { + return &RunServiceArchiveRunDefault{ + _statusCode: code, + } +} + +/* +RunServiceArchiveRunDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceArchiveRunDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service archive run default response has a 2xx status code +func (o *RunServiceArchiveRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service archive run default response has a 3xx status code +func (o *RunServiceArchiveRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service archive run default response has a 4xx status code +func (o *RunServiceArchiveRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service archive run default response has a 5xx status code +func (o *RunServiceArchiveRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service archive run default response a status code equal to that given +func (o *RunServiceArchiveRunDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service archive run default response +func (o *RunServiceArchiveRunDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceArchiveRunDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{id}:archive][%d] RunService_ArchiveRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceArchiveRunDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{id}:archive][%d] RunService_ArchiveRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceArchiveRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceArchiveRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_client.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_client.go index b7a36a6867..e817a36268 100644 --- a/backend/api/v1/go_http_client/run_client/run_service/run_service_client.go +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_client.go @@ -7,12 +7,11 @@ package run_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) // New creates a new run service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -24,294 +23,412 @@ type Client struct { formats strfmt.Registry } +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + RunServiceArchiveRun(params *RunServiceArchiveRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceArchiveRunOK, error) + + RunServiceCreateRun(params *RunServiceCreateRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceCreateRunOK, error) + + RunServiceDeleteRun(params *RunServiceDeleteRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceDeleteRunOK, error) + + RunServiceGetRun(params *RunServiceGetRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceGetRunOK, error) + + RunServiceListRuns(params *RunServiceListRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceListRunsOK, error) + + RunServiceReadArtifact(params *RunServiceReadArtifactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReadArtifactOK, error) + + RunServiceReportRunMetrics(params *RunServiceReportRunMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReportRunMetricsOK, error) + + RunServiceRetryRun(params *RunServiceRetryRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceRetryRunOK, error) + + RunServiceTerminateRun(params *RunServiceTerminateRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceTerminateRunOK, error) + + RunServiceUnarchiveRun(params *RunServiceUnarchiveRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceUnarchiveRunOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -ArchiveRun archives a run +RunServiceArchiveRun archives a run */ -func (a *Client) ArchiveRun(params *ArchiveRunParams, authInfo runtime.ClientAuthInfoWriter) (*ArchiveRunOK, error) { +func (a *Client) RunServiceArchiveRun(params *RunServiceArchiveRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceArchiveRunOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewArchiveRunParams() + params = NewRunServiceArchiveRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ArchiveRun", + op := &runtime.ClientOperation{ + ID: "RunService_ArchiveRun", Method: "POST", PathPattern: "/apis/v1/runs/{id}:archive", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &ArchiveRunReader{formats: a.formats}, + Reader: &RunServiceArchiveRunReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ArchiveRunOK), nil - + success, ok := result.(*RunServiceArchiveRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceArchiveRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -CreateRun creates a new run +RunServiceCreateRun creates a new run */ -func (a *Client) CreateRun(params *CreateRunParams, authInfo runtime.ClientAuthInfoWriter) (*CreateRunOK, error) { +func (a *Client) RunServiceCreateRun(params *RunServiceCreateRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceCreateRunOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewCreateRunParams() + params = NewRunServiceCreateRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "CreateRun", + op := &runtime.ClientOperation{ + ID: "RunService_CreateRun", Method: "POST", PathPattern: "/apis/v1/runs", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &CreateRunReader{formats: a.formats}, + Reader: &RunServiceCreateRunReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*CreateRunOK), nil - + success, ok := result.(*RunServiceCreateRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceCreateRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -DeleteRun deletes a run +RunServiceDeleteRun deletes a run */ -func (a *Client) DeleteRun(params *DeleteRunParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteRunOK, error) { +func (a *Client) RunServiceDeleteRun(params *RunServiceDeleteRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceDeleteRunOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDeleteRunParams() + params = NewRunServiceDeleteRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "DeleteRun", + op := &runtime.ClientOperation{ + ID: "RunService_DeleteRun", Method: "DELETE", PathPattern: "/apis/v1/runs/{id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &DeleteRunReader{formats: a.formats}, + Reader: &RunServiceDeleteRunReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*DeleteRunOK), nil - + success, ok := result.(*RunServiceDeleteRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceDeleteRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -GetRun finds a specific run by ID +RunServiceGetRun finds a specific run by ID */ -func (a *Client) GetRun(params *GetRunParams, authInfo runtime.ClientAuthInfoWriter) (*GetRunOK, error) { +func (a *Client) RunServiceGetRun(params *RunServiceGetRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceGetRunOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewGetRunParams() + params = NewRunServiceGetRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetRun", + op := &runtime.ClientOperation{ + ID: "RunService_GetRun", Method: "GET", PathPattern: "/apis/v1/runs/{run_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &GetRunReader{formats: a.formats}, + Reader: &RunServiceGetRunReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*GetRunOK), nil - + success, ok := result.(*RunServiceGetRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceGetRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ListRuns finds all runs +RunServiceListRuns finds all runs */ -func (a *Client) ListRuns(params *ListRunsParams, authInfo runtime.ClientAuthInfoWriter) (*ListRunsOK, error) { +func (a *Client) RunServiceListRuns(params *RunServiceListRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceListRunsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewListRunsParams() + params = NewRunServiceListRunsParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ListRuns", + op := &runtime.ClientOperation{ + ID: "RunService_ListRuns", Method: "GET", PathPattern: "/apis/v1/runs", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &ListRunsReader{formats: a.formats}, + Reader: &RunServiceListRunsReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ListRunsOK), nil - + success, ok := result.(*RunServiceListRunsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceListRunsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ReadArtifact finds a run s artifact data +RunServiceReadArtifact finds a run s artifact data */ -func (a *Client) ReadArtifact(params *ReadArtifactParams, authInfo runtime.ClientAuthInfoWriter) (*ReadArtifactOK, error) { +func (a *Client) RunServiceReadArtifact(params *RunServiceReadArtifactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReadArtifactOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewReadArtifactParams() + params = NewRunServiceReadArtifactParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ReadArtifact", + op := &runtime.ClientOperation{ + ID: "RunService_ReadArtifact", Method: "GET", PathPattern: "/apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &ReadArtifactReader{formats: a.formats}, + Reader: &RunServiceReadArtifactReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ReadArtifactOK), nil - + success, ok := result.(*RunServiceReadArtifactOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceReadArtifactDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ReportRunMetrics reports run metrics 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 +RunServiceReportRunMetrics reports run metrics 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 */ -func (a *Client) ReportRunMetrics(params *ReportRunMetricsParams, authInfo runtime.ClientAuthInfoWriter) (*ReportRunMetricsOK, error) { +func (a *Client) RunServiceReportRunMetrics(params *RunServiceReportRunMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReportRunMetricsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewReportRunMetricsParams() + params = NewRunServiceReportRunMetricsParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "ReportRunMetrics", + op := &runtime.ClientOperation{ + ID: "RunService_ReportRunMetrics", Method: "POST", PathPattern: "/apis/v1/runs/{run_id}:reportMetrics", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &ReportRunMetricsReader{formats: a.formats}, + Reader: &RunServiceReportRunMetricsReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ReportRunMetricsOK), nil - + success, ok := result.(*RunServiceReportRunMetricsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceReportRunMetricsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -RetryRun res initiates a failed or terminated run +RunServiceRetryRun res initiates a failed or terminated run */ -func (a *Client) RetryRun(params *RetryRunParams, authInfo runtime.ClientAuthInfoWriter) (*RetryRunOK, error) { +func (a *Client) RunServiceRetryRun(params *RunServiceRetryRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceRetryRunOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewRetryRunParams() + params = NewRunServiceRetryRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "RetryRun", + op := &runtime.ClientOperation{ + ID: "RunService_RetryRun", Method: "POST", PathPattern: "/apis/v1/runs/{run_id}/retry", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &RetryRunReader{formats: a.formats}, + Reader: &RunServiceRetryRunReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RetryRunOK), nil - + success, ok := result.(*RunServiceRetryRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceRetryRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -TerminateRun terminates an active run +RunServiceTerminateRun terminates an active run */ -func (a *Client) TerminateRun(params *TerminateRunParams, authInfo runtime.ClientAuthInfoWriter) (*TerminateRunOK, error) { +func (a *Client) RunServiceTerminateRun(params *RunServiceTerminateRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceTerminateRunOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewTerminateRunParams() + params = NewRunServiceTerminateRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "TerminateRun", + op := &runtime.ClientOperation{ + ID: "RunService_TerminateRun", Method: "POST", PathPattern: "/apis/v1/runs/{run_id}/terminate", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &TerminateRunReader{formats: a.formats}, + Reader: &RunServiceTerminateRunReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*TerminateRunOK), nil - + success, ok := result.(*RunServiceTerminateRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceTerminateRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -UnarchiveRun restores an archived run +RunServiceUnarchiveRun restores an archived run */ -func (a *Client) UnarchiveRun(params *UnarchiveRunParams, authInfo runtime.ClientAuthInfoWriter) (*UnarchiveRunOK, error) { +func (a *Client) RunServiceUnarchiveRun(params *RunServiceUnarchiveRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceUnarchiveRunOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewUnarchiveRunParams() + params = NewRunServiceUnarchiveRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "UnarchiveRun", + op := &runtime.ClientOperation{ + ID: "RunService_UnarchiveRun", Method: "POST", PathPattern: "/apis/v1/runs/{id}:unarchive", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &UnarchiveRunReader{formats: a.formats}, + Reader: &RunServiceUnarchiveRunReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*UnarchiveRunOK), nil - + success, ok := result.(*RunServiceUnarchiveRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceUnarchiveRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_create_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_create_run_parameters.go new file mode 100644 index 0000000000..9cad2afabe --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_create_run_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// NewRunServiceCreateRunParams creates a new RunServiceCreateRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceCreateRunParams() *RunServiceCreateRunParams { + return &RunServiceCreateRunParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceCreateRunParamsWithTimeout creates a new RunServiceCreateRunParams object +// with the ability to set a timeout on a request. +func NewRunServiceCreateRunParamsWithTimeout(timeout time.Duration) *RunServiceCreateRunParams { + return &RunServiceCreateRunParams{ + timeout: timeout, + } +} + +// NewRunServiceCreateRunParamsWithContext creates a new RunServiceCreateRunParams object +// with the ability to set a context for a request. +func NewRunServiceCreateRunParamsWithContext(ctx context.Context) *RunServiceCreateRunParams { + return &RunServiceCreateRunParams{ + Context: ctx, + } +} + +// NewRunServiceCreateRunParamsWithHTTPClient creates a new RunServiceCreateRunParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceCreateRunParamsWithHTTPClient(client *http.Client) *RunServiceCreateRunParams { + return &RunServiceCreateRunParams{ + HTTPClient: client, + } +} + +/* +RunServiceCreateRunParams contains all the parameters to send to the API endpoint + + for the run service create run operation. + + Typically these are written to a http.Request. +*/ +type RunServiceCreateRunParams struct { + + // Run. + Run *run_model.V1Run + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service create run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceCreateRunParams) WithDefaults() *RunServiceCreateRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service create run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceCreateRunParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the run service create run params +func (o *RunServiceCreateRunParams) WithTimeout(timeout time.Duration) *RunServiceCreateRunParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service create run params +func (o *RunServiceCreateRunParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service create run params +func (o *RunServiceCreateRunParams) WithContext(ctx context.Context) *RunServiceCreateRunParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service create run params +func (o *RunServiceCreateRunParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service create run params +func (o *RunServiceCreateRunParams) WithHTTPClient(client *http.Client) *RunServiceCreateRunParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service create run params +func (o *RunServiceCreateRunParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRun adds the run to the run service create run params +func (o *RunServiceCreateRunParams) WithRun(run *run_model.V1Run) *RunServiceCreateRunParams { + o.SetRun(run) + return o +} + +// SetRun adds the run to the run service create run params +func (o *RunServiceCreateRunParams) SetRun(run *run_model.V1Run) { + o.Run = run +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceCreateRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Run != nil { + if err := r.SetBodyParam(o.Run); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_create_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_create_run_responses.go new file mode 100644 index 0000000000..2b947a378d --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_create_run_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceCreateRunReader is a Reader for the RunServiceCreateRun structure. +type RunServiceCreateRunReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceCreateRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceCreateRunOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceCreateRunDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceCreateRunOK creates a RunServiceCreateRunOK with default headers values +func NewRunServiceCreateRunOK() *RunServiceCreateRunOK { + return &RunServiceCreateRunOK{} +} + +/* +RunServiceCreateRunOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceCreateRunOK struct { + Payload *run_model.V1RunDetail +} + +// IsSuccess returns true when this run service create run o k response has a 2xx status code +func (o *RunServiceCreateRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service create run o k response has a 3xx status code +func (o *RunServiceCreateRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service create run o k response has a 4xx status code +func (o *RunServiceCreateRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service create run o k response has a 5xx status code +func (o *RunServiceCreateRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service create run o k response a status code equal to that given +func (o *RunServiceCreateRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service create run o k response +func (o *RunServiceCreateRunOK) Code() int { + return 200 +} + +func (o *RunServiceCreateRunOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs][%d] runServiceCreateRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceCreateRunOK) String() string { + return fmt.Sprintf("[POST /apis/v1/runs][%d] runServiceCreateRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceCreateRunOK) GetPayload() *run_model.V1RunDetail { + return o.Payload +} + +func (o *RunServiceCreateRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.V1RunDetail) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceCreateRunDefault creates a RunServiceCreateRunDefault with default headers values +func NewRunServiceCreateRunDefault(code int) *RunServiceCreateRunDefault { + return &RunServiceCreateRunDefault{ + _statusCode: code, + } +} + +/* +RunServiceCreateRunDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceCreateRunDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service create run default response has a 2xx status code +func (o *RunServiceCreateRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service create run default response has a 3xx status code +func (o *RunServiceCreateRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service create run default response has a 4xx status code +func (o *RunServiceCreateRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service create run default response has a 5xx status code +func (o *RunServiceCreateRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service create run default response a status code equal to that given +func (o *RunServiceCreateRunDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service create run default response +func (o *RunServiceCreateRunDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceCreateRunDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs][%d] RunService_CreateRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceCreateRunDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/runs][%d] RunService_CreateRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceCreateRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceCreateRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_delete_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_delete_run_parameters.go new file mode 100644 index 0000000000..739a176b0f --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_delete_run_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRunServiceDeleteRunParams creates a new RunServiceDeleteRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceDeleteRunParams() *RunServiceDeleteRunParams { + return &RunServiceDeleteRunParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceDeleteRunParamsWithTimeout creates a new RunServiceDeleteRunParams object +// with the ability to set a timeout on a request. +func NewRunServiceDeleteRunParamsWithTimeout(timeout time.Duration) *RunServiceDeleteRunParams { + return &RunServiceDeleteRunParams{ + timeout: timeout, + } +} + +// NewRunServiceDeleteRunParamsWithContext creates a new RunServiceDeleteRunParams object +// with the ability to set a context for a request. +func NewRunServiceDeleteRunParamsWithContext(ctx context.Context) *RunServiceDeleteRunParams { + return &RunServiceDeleteRunParams{ + Context: ctx, + } +} + +// NewRunServiceDeleteRunParamsWithHTTPClient creates a new RunServiceDeleteRunParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceDeleteRunParamsWithHTTPClient(client *http.Client) *RunServiceDeleteRunParams { + return &RunServiceDeleteRunParams{ + HTTPClient: client, + } +} + +/* +RunServiceDeleteRunParams contains all the parameters to send to the API endpoint + + for the run service delete run operation. + + Typically these are written to a http.Request. +*/ +type RunServiceDeleteRunParams struct { + + /* ID. + + The ID of the run to be deleted. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service delete run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceDeleteRunParams) WithDefaults() *RunServiceDeleteRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service delete run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceDeleteRunParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the run service delete run params +func (o *RunServiceDeleteRunParams) WithTimeout(timeout time.Duration) *RunServiceDeleteRunParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service delete run params +func (o *RunServiceDeleteRunParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service delete run params +func (o *RunServiceDeleteRunParams) WithContext(ctx context.Context) *RunServiceDeleteRunParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service delete run params +func (o *RunServiceDeleteRunParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service delete run params +func (o *RunServiceDeleteRunParams) WithHTTPClient(client *http.Client) *RunServiceDeleteRunParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service delete run params +func (o *RunServiceDeleteRunParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the run service delete run params +func (o *RunServiceDeleteRunParams) WithID(id string) *RunServiceDeleteRunParams { + o.SetID(id) + return o +} + +// SetID adds the id to the run service delete run params +func (o *RunServiceDeleteRunParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceDeleteRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_delete_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_delete_run_responses.go new file mode 100644 index 0000000000..04631e5cd5 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_delete_run_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceDeleteRunReader is a Reader for the RunServiceDeleteRun structure. +type RunServiceDeleteRunReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceDeleteRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceDeleteRunOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceDeleteRunDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceDeleteRunOK creates a RunServiceDeleteRunOK with default headers values +func NewRunServiceDeleteRunOK() *RunServiceDeleteRunOK { + return &RunServiceDeleteRunOK{} +} + +/* +RunServiceDeleteRunOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceDeleteRunOK struct { + Payload interface{} +} + +// IsSuccess returns true when this run service delete run o k response has a 2xx status code +func (o *RunServiceDeleteRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service delete run o k response has a 3xx status code +func (o *RunServiceDeleteRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service delete run o k response has a 4xx status code +func (o *RunServiceDeleteRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service delete run o k response has a 5xx status code +func (o *RunServiceDeleteRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service delete run o k response a status code equal to that given +func (o *RunServiceDeleteRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service delete run o k response +func (o *RunServiceDeleteRunOK) Code() int { + return 200 +} + +func (o *RunServiceDeleteRunOK) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/runs/{id}][%d] runServiceDeleteRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceDeleteRunOK) String() string { + return fmt.Sprintf("[DELETE /apis/v1/runs/{id}][%d] runServiceDeleteRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceDeleteRunOK) GetPayload() interface{} { + return o.Payload +} + +func (o *RunServiceDeleteRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceDeleteRunDefault creates a RunServiceDeleteRunDefault with default headers values +func NewRunServiceDeleteRunDefault(code int) *RunServiceDeleteRunDefault { + return &RunServiceDeleteRunDefault{ + _statusCode: code, + } +} + +/* +RunServiceDeleteRunDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceDeleteRunDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service delete run default response has a 2xx status code +func (o *RunServiceDeleteRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service delete run default response has a 3xx status code +func (o *RunServiceDeleteRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service delete run default response has a 4xx status code +func (o *RunServiceDeleteRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service delete run default response has a 5xx status code +func (o *RunServiceDeleteRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service delete run default response a status code equal to that given +func (o *RunServiceDeleteRunDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service delete run default response +func (o *RunServiceDeleteRunDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceDeleteRunDefault) Error() string { + return fmt.Sprintf("[DELETE /apis/v1/runs/{id}][%d] RunService_DeleteRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceDeleteRunDefault) String() string { + return fmt.Sprintf("[DELETE /apis/v1/runs/{id}][%d] RunService_DeleteRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceDeleteRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceDeleteRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_get_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_get_run_parameters.go new file mode 100644 index 0000000000..fecdb4654d --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_get_run_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRunServiceGetRunParams creates a new RunServiceGetRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceGetRunParams() *RunServiceGetRunParams { + return &RunServiceGetRunParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceGetRunParamsWithTimeout creates a new RunServiceGetRunParams object +// with the ability to set a timeout on a request. +func NewRunServiceGetRunParamsWithTimeout(timeout time.Duration) *RunServiceGetRunParams { + return &RunServiceGetRunParams{ + timeout: timeout, + } +} + +// NewRunServiceGetRunParamsWithContext creates a new RunServiceGetRunParams object +// with the ability to set a context for a request. +func NewRunServiceGetRunParamsWithContext(ctx context.Context) *RunServiceGetRunParams { + return &RunServiceGetRunParams{ + Context: ctx, + } +} + +// NewRunServiceGetRunParamsWithHTTPClient creates a new RunServiceGetRunParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceGetRunParamsWithHTTPClient(client *http.Client) *RunServiceGetRunParams { + return &RunServiceGetRunParams{ + HTTPClient: client, + } +} + +/* +RunServiceGetRunParams contains all the parameters to send to the API endpoint + + for the run service get run operation. + + Typically these are written to a http.Request. +*/ +type RunServiceGetRunParams struct { + + /* RunID. + + The ID of the run to be retrieved. + */ + RunID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service get run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceGetRunParams) WithDefaults() *RunServiceGetRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service get run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceGetRunParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the run service get run params +func (o *RunServiceGetRunParams) WithTimeout(timeout time.Duration) *RunServiceGetRunParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service get run params +func (o *RunServiceGetRunParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service get run params +func (o *RunServiceGetRunParams) WithContext(ctx context.Context) *RunServiceGetRunParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service get run params +func (o *RunServiceGetRunParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service get run params +func (o *RunServiceGetRunParams) WithHTTPClient(client *http.Client) *RunServiceGetRunParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service get run params +func (o *RunServiceGetRunParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRunID adds the runID to the run service get run params +func (o *RunServiceGetRunParams) WithRunID(runID string) *RunServiceGetRunParams { + o.SetRunID(runID) + return o +} + +// SetRunID adds the runId to the run service get run params +func (o *RunServiceGetRunParams) SetRunID(runID string) { + o.RunID = runID +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceGetRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param run_id + if err := r.SetPathParam("run_id", o.RunID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_get_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_get_run_responses.go new file mode 100644 index 0000000000..927d1bb754 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_get_run_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceGetRunReader is a Reader for the RunServiceGetRun structure. +type RunServiceGetRunReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceGetRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceGetRunOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceGetRunDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceGetRunOK creates a RunServiceGetRunOK with default headers values +func NewRunServiceGetRunOK() *RunServiceGetRunOK { + return &RunServiceGetRunOK{} +} + +/* +RunServiceGetRunOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceGetRunOK struct { + Payload *run_model.V1RunDetail +} + +// IsSuccess returns true when this run service get run o k response has a 2xx status code +func (o *RunServiceGetRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service get run o k response has a 3xx status code +func (o *RunServiceGetRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service get run o k response has a 4xx status code +func (o *RunServiceGetRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service get run o k response has a 5xx status code +func (o *RunServiceGetRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service get run o k response a status code equal to that given +func (o *RunServiceGetRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service get run o k response +func (o *RunServiceGetRunOK) Code() int { + return 200 +} + +func (o *RunServiceGetRunOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/runs/{run_id}][%d] runServiceGetRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceGetRunOK) String() string { + return fmt.Sprintf("[GET /apis/v1/runs/{run_id}][%d] runServiceGetRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceGetRunOK) GetPayload() *run_model.V1RunDetail { + return o.Payload +} + +func (o *RunServiceGetRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.V1RunDetail) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceGetRunDefault creates a RunServiceGetRunDefault with default headers values +func NewRunServiceGetRunDefault(code int) *RunServiceGetRunDefault { + return &RunServiceGetRunDefault{ + _statusCode: code, + } +} + +/* +RunServiceGetRunDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceGetRunDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service get run default response has a 2xx status code +func (o *RunServiceGetRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service get run default response has a 3xx status code +func (o *RunServiceGetRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service get run default response has a 4xx status code +func (o *RunServiceGetRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service get run default response has a 5xx status code +func (o *RunServiceGetRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service get run default response a status code equal to that given +func (o *RunServiceGetRunDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service get run default response +func (o *RunServiceGetRunDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceGetRunDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/runs/{run_id}][%d] RunService_GetRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceGetRunDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/runs/{run_id}][%d] RunService_GetRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceGetRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceGetRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_list_runs_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_list_runs_parameters.go new file mode 100644 index 0000000000..a08329282a --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_list_runs_parameters.go @@ -0,0 +1,355 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewRunServiceListRunsParams creates a new RunServiceListRunsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceListRunsParams() *RunServiceListRunsParams { + return &RunServiceListRunsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceListRunsParamsWithTimeout creates a new RunServiceListRunsParams object +// with the ability to set a timeout on a request. +func NewRunServiceListRunsParamsWithTimeout(timeout time.Duration) *RunServiceListRunsParams { + return &RunServiceListRunsParams{ + timeout: timeout, + } +} + +// NewRunServiceListRunsParamsWithContext creates a new RunServiceListRunsParams object +// with the ability to set a context for a request. +func NewRunServiceListRunsParamsWithContext(ctx context.Context) *RunServiceListRunsParams { + return &RunServiceListRunsParams{ + Context: ctx, + } +} + +// NewRunServiceListRunsParamsWithHTTPClient creates a new RunServiceListRunsParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceListRunsParamsWithHTTPClient(client *http.Client) *RunServiceListRunsParams { + return &RunServiceListRunsParams{ + HTTPClient: client, + } +} + +/* +RunServiceListRunsParams contains all the parameters to send to the API endpoint + + for the run service list runs operation. + + Typically these are written to a http.Request. +*/ +type RunServiceListRunsParams struct { + + /* Filter. + + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). + */ + Filter *string + + /* PageSize. + + 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. + + Format: int32 + */ + PageSize *int32 + + /* PageToken. + + 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. + */ + PageToken *string + + /* ResourceReferenceKeyID. + + The ID of the resource that referred to. + */ + ResourceReferenceKeyID *string + + /* ResourceReferenceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" + */ + ResourceReferenceKeyType *string + + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + (Example, "name asc" or "id desc"). Ascending by default. + */ + SortBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service list runs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceListRunsParams) WithDefaults() *RunServiceListRunsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service list runs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceListRunsParams) SetDefaults() { + var ( + resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := RunServiceListRunsParams{ + ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the run service list runs params +func (o *RunServiceListRunsParams) WithTimeout(timeout time.Duration) *RunServiceListRunsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service list runs params +func (o *RunServiceListRunsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service list runs params +func (o *RunServiceListRunsParams) WithContext(ctx context.Context) *RunServiceListRunsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service list runs params +func (o *RunServiceListRunsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service list runs params +func (o *RunServiceListRunsParams) WithHTTPClient(client *http.Client) *RunServiceListRunsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service list runs params +func (o *RunServiceListRunsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilter adds the filter to the run service list runs params +func (o *RunServiceListRunsParams) WithFilter(filter *string) *RunServiceListRunsParams { + o.SetFilter(filter) + return o +} + +// SetFilter adds the filter to the run service list runs params +func (o *RunServiceListRunsParams) SetFilter(filter *string) { + o.Filter = filter +} + +// WithPageSize adds the pageSize to the run service list runs params +func (o *RunServiceListRunsParams) WithPageSize(pageSize *int32) *RunServiceListRunsParams { + o.SetPageSize(pageSize) + return o +} + +// SetPageSize adds the pageSize to the run service list runs params +func (o *RunServiceListRunsParams) SetPageSize(pageSize *int32) { + o.PageSize = pageSize +} + +// WithPageToken adds the pageToken to the run service list runs params +func (o *RunServiceListRunsParams) WithPageToken(pageToken *string) *RunServiceListRunsParams { + o.SetPageToken(pageToken) + return o +} + +// SetPageToken adds the pageToken to the run service list runs params +func (o *RunServiceListRunsParams) SetPageToken(pageToken *string) { + o.PageToken = pageToken +} + +// WithResourceReferenceKeyID adds the resourceReferenceKeyID to the run service list runs params +func (o *RunServiceListRunsParams) WithResourceReferenceKeyID(resourceReferenceKeyID *string) *RunServiceListRunsParams { + o.SetResourceReferenceKeyID(resourceReferenceKeyID) + return o +} + +// SetResourceReferenceKeyID adds the resourceReferenceKeyId to the run service list runs params +func (o *RunServiceListRunsParams) SetResourceReferenceKeyID(resourceReferenceKeyID *string) { + o.ResourceReferenceKeyID = resourceReferenceKeyID +} + +// WithResourceReferenceKeyType adds the resourceReferenceKeyType to the run service list runs params +func (o *RunServiceListRunsParams) WithResourceReferenceKeyType(resourceReferenceKeyType *string) *RunServiceListRunsParams { + o.SetResourceReferenceKeyType(resourceReferenceKeyType) + return o +} + +// SetResourceReferenceKeyType adds the resourceReferenceKeyType to the run service list runs params +func (o *RunServiceListRunsParams) SetResourceReferenceKeyType(resourceReferenceKeyType *string) { + o.ResourceReferenceKeyType = resourceReferenceKeyType +} + +// WithSortBy adds the sortBy to the run service list runs params +func (o *RunServiceListRunsParams) WithSortBy(sortBy *string) *RunServiceListRunsParams { + o.SetSortBy(sortBy) + return o +} + +// SetSortBy adds the sortBy to the run service list runs params +func (o *RunServiceListRunsParams) SetSortBy(sortBy *string) { + o.SortBy = sortBy +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceListRunsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filter != nil { + + // query param filter + var qrFilter string + + if o.Filter != nil { + qrFilter = *o.Filter + } + qFilter := qrFilter + if qFilter != "" { + + if err := r.SetQueryParam("filter", qFilter); err != nil { + return err + } + } + } + + if o.PageSize != nil { + + // query param page_size + var qrPageSize int32 + + if o.PageSize != nil { + qrPageSize = *o.PageSize + } + qPageSize := swag.FormatInt32(qrPageSize) + if qPageSize != "" { + + if err := r.SetQueryParam("page_size", qPageSize); err != nil { + return err + } + } + } + + if o.PageToken != nil { + + // query param page_token + var qrPageToken string + + if o.PageToken != nil { + qrPageToken = *o.PageToken + } + qPageToken := qrPageToken + if qPageToken != "" { + + if err := r.SetQueryParam("page_token", qPageToken); err != nil { + return err + } + } + } + + if o.ResourceReferenceKeyID != nil { + + // query param resource_reference_key.id + var qrResourceReferenceKeyID string + + if o.ResourceReferenceKeyID != nil { + qrResourceReferenceKeyID = *o.ResourceReferenceKeyID + } + qResourceReferenceKeyID := qrResourceReferenceKeyID + if qResourceReferenceKeyID != "" { + + if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { + return err + } + } + } + + if o.ResourceReferenceKeyType != nil { + + // query param resource_reference_key.type + var qrResourceReferenceKeyType string + + if o.ResourceReferenceKeyType != nil { + qrResourceReferenceKeyType = *o.ResourceReferenceKeyType + } + qResourceReferenceKeyType := qrResourceReferenceKeyType + if qResourceReferenceKeyType != "" { + + if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { + return err + } + } + } + + if o.SortBy != nil { + + // query param sort_by + var qrSortBy string + + if o.SortBy != nil { + qrSortBy = *o.SortBy + } + qSortBy := qrSortBy + if qSortBy != "" { + + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_list_runs_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_list_runs_responses.go new file mode 100644 index 0000000000..8adcbac27b --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_list_runs_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceListRunsReader is a Reader for the RunServiceListRuns structure. +type RunServiceListRunsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceListRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceListRunsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceListRunsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceListRunsOK creates a RunServiceListRunsOK with default headers values +func NewRunServiceListRunsOK() *RunServiceListRunsOK { + return &RunServiceListRunsOK{} +} + +/* +RunServiceListRunsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceListRunsOK struct { + Payload *run_model.V1ListRunsResponse +} + +// IsSuccess returns true when this run service list runs o k response has a 2xx status code +func (o *RunServiceListRunsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service list runs o k response has a 3xx status code +func (o *RunServiceListRunsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service list runs o k response has a 4xx status code +func (o *RunServiceListRunsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service list runs o k response has a 5xx status code +func (o *RunServiceListRunsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service list runs o k response a status code equal to that given +func (o *RunServiceListRunsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service list runs o k response +func (o *RunServiceListRunsOK) Code() int { + return 200 +} + +func (o *RunServiceListRunsOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/runs][%d] runServiceListRunsOK %+v", 200, o.Payload) +} + +func (o *RunServiceListRunsOK) String() string { + return fmt.Sprintf("[GET /apis/v1/runs][%d] runServiceListRunsOK %+v", 200, o.Payload) +} + +func (o *RunServiceListRunsOK) GetPayload() *run_model.V1ListRunsResponse { + return o.Payload +} + +func (o *RunServiceListRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.V1ListRunsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceListRunsDefault creates a RunServiceListRunsDefault with default headers values +func NewRunServiceListRunsDefault(code int) *RunServiceListRunsDefault { + return &RunServiceListRunsDefault{ + _statusCode: code, + } +} + +/* +RunServiceListRunsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceListRunsDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service list runs default response has a 2xx status code +func (o *RunServiceListRunsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service list runs default response has a 3xx status code +func (o *RunServiceListRunsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service list runs default response has a 4xx status code +func (o *RunServiceListRunsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service list runs default response has a 5xx status code +func (o *RunServiceListRunsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service list runs default response a status code equal to that given +func (o *RunServiceListRunsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service list runs default response +func (o *RunServiceListRunsDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceListRunsDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/runs][%d] RunService_ListRuns default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceListRunsDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/runs][%d] RunService_ListRuns default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceListRunsDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceListRunsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_read_artifact_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_read_artifact_parameters.go new file mode 100644 index 0000000000..08ead4d838 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_read_artifact_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRunServiceReadArtifactParams creates a new RunServiceReadArtifactParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceReadArtifactParams() *RunServiceReadArtifactParams { + return &RunServiceReadArtifactParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceReadArtifactParamsWithTimeout creates a new RunServiceReadArtifactParams object +// with the ability to set a timeout on a request. +func NewRunServiceReadArtifactParamsWithTimeout(timeout time.Duration) *RunServiceReadArtifactParams { + return &RunServiceReadArtifactParams{ + timeout: timeout, + } +} + +// NewRunServiceReadArtifactParamsWithContext creates a new RunServiceReadArtifactParams object +// with the ability to set a context for a request. +func NewRunServiceReadArtifactParamsWithContext(ctx context.Context) *RunServiceReadArtifactParams { + return &RunServiceReadArtifactParams{ + Context: ctx, + } +} + +// NewRunServiceReadArtifactParamsWithHTTPClient creates a new RunServiceReadArtifactParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceReadArtifactParamsWithHTTPClient(client *http.Client) *RunServiceReadArtifactParams { + return &RunServiceReadArtifactParams{ + HTTPClient: client, + } +} + +/* +RunServiceReadArtifactParams contains all the parameters to send to the API endpoint + + for the run service read artifact operation. + + Typically these are written to a http.Request. +*/ +type RunServiceReadArtifactParams struct { + + /* ArtifactName. + + The name of the artifact. + */ + ArtifactName string + + /* NodeID. + + The ID of the running node. + */ + NodeID string + + /* RunID. + + The ID of the run. + */ + RunID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service read artifact params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReadArtifactParams) WithDefaults() *RunServiceReadArtifactParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service read artifact params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReadArtifactParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the run service read artifact params +func (o *RunServiceReadArtifactParams) WithTimeout(timeout time.Duration) *RunServiceReadArtifactParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service read artifact params +func (o *RunServiceReadArtifactParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service read artifact params +func (o *RunServiceReadArtifactParams) WithContext(ctx context.Context) *RunServiceReadArtifactParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service read artifact params +func (o *RunServiceReadArtifactParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service read artifact params +func (o *RunServiceReadArtifactParams) WithHTTPClient(client *http.Client) *RunServiceReadArtifactParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service read artifact params +func (o *RunServiceReadArtifactParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithArtifactName adds the artifactName to the run service read artifact params +func (o *RunServiceReadArtifactParams) WithArtifactName(artifactName string) *RunServiceReadArtifactParams { + o.SetArtifactName(artifactName) + return o +} + +// SetArtifactName adds the artifactName to the run service read artifact params +func (o *RunServiceReadArtifactParams) SetArtifactName(artifactName string) { + o.ArtifactName = artifactName +} + +// WithNodeID adds the nodeID to the run service read artifact params +func (o *RunServiceReadArtifactParams) WithNodeID(nodeID string) *RunServiceReadArtifactParams { + o.SetNodeID(nodeID) + return o +} + +// SetNodeID adds the nodeId to the run service read artifact params +func (o *RunServiceReadArtifactParams) SetNodeID(nodeID string) { + o.NodeID = nodeID +} + +// WithRunID adds the runID to the run service read artifact params +func (o *RunServiceReadArtifactParams) WithRunID(runID string) *RunServiceReadArtifactParams { + o.SetRunID(runID) + return o +} + +// SetRunID adds the runId to the run service read artifact params +func (o *RunServiceReadArtifactParams) SetRunID(runID string) { + o.RunID = runID +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceReadArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param artifact_name + if err := r.SetPathParam("artifact_name", o.ArtifactName); err != nil { + return err + } + + // path param node_id + if err := r.SetPathParam("node_id", o.NodeID); err != nil { + return err + } + + // path param run_id + if err := r.SetPathParam("run_id", o.RunID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_read_artifact_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_read_artifact_responses.go new file mode 100644 index 0000000000..bdabb66e00 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_read_artifact_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceReadArtifactReader is a Reader for the RunServiceReadArtifact structure. +type RunServiceReadArtifactReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceReadArtifactReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceReadArtifactOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceReadArtifactDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceReadArtifactOK creates a RunServiceReadArtifactOK with default headers values +func NewRunServiceReadArtifactOK() *RunServiceReadArtifactOK { + return &RunServiceReadArtifactOK{} +} + +/* +RunServiceReadArtifactOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceReadArtifactOK struct { + Payload *run_model.V1ReadArtifactResponse +} + +// IsSuccess returns true when this run service read artifact o k response has a 2xx status code +func (o *RunServiceReadArtifactOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service read artifact o k response has a 3xx status code +func (o *RunServiceReadArtifactOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service read artifact o k response has a 4xx status code +func (o *RunServiceReadArtifactOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service read artifact o k response has a 5xx status code +func (o *RunServiceReadArtifactOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service read artifact o k response a status code equal to that given +func (o *RunServiceReadArtifactOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service read artifact o k response +func (o *RunServiceReadArtifactOK) Code() int { + return 200 +} + +func (o *RunServiceReadArtifactOK) Error() string { + return fmt.Sprintf("[GET /apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] runServiceReadArtifactOK %+v", 200, o.Payload) +} + +func (o *RunServiceReadArtifactOK) String() string { + return fmt.Sprintf("[GET /apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] runServiceReadArtifactOK %+v", 200, o.Payload) +} + +func (o *RunServiceReadArtifactOK) GetPayload() *run_model.V1ReadArtifactResponse { + return o.Payload +} + +func (o *RunServiceReadArtifactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.V1ReadArtifactResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceReadArtifactDefault creates a RunServiceReadArtifactDefault with default headers values +func NewRunServiceReadArtifactDefault(code int) *RunServiceReadArtifactDefault { + return &RunServiceReadArtifactDefault{ + _statusCode: code, + } +} + +/* +RunServiceReadArtifactDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceReadArtifactDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service read artifact default response has a 2xx status code +func (o *RunServiceReadArtifactDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service read artifact default response has a 3xx status code +func (o *RunServiceReadArtifactDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service read artifact default response has a 4xx status code +func (o *RunServiceReadArtifactDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service read artifact default response has a 5xx status code +func (o *RunServiceReadArtifactDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service read artifact default response a status code equal to that given +func (o *RunServiceReadArtifactDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service read artifact default response +func (o *RunServiceReadArtifactDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceReadArtifactDefault) Error() string { + return fmt.Sprintf("[GET /apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] RunService_ReadArtifact default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceReadArtifactDefault) String() string { + return fmt.Sprintf("[GET /apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] RunService_ReadArtifact default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceReadArtifactDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceReadArtifactDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_report_run_metrics_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_report_run_metrics_parameters.go new file mode 100644 index 0000000000..5483960dde --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_report_run_metrics_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRunServiceReportRunMetricsParams creates a new RunServiceReportRunMetricsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceReportRunMetricsParams() *RunServiceReportRunMetricsParams { + return &RunServiceReportRunMetricsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceReportRunMetricsParamsWithTimeout creates a new RunServiceReportRunMetricsParams object +// with the ability to set a timeout on a request. +func NewRunServiceReportRunMetricsParamsWithTimeout(timeout time.Duration) *RunServiceReportRunMetricsParams { + return &RunServiceReportRunMetricsParams{ + timeout: timeout, + } +} + +// NewRunServiceReportRunMetricsParamsWithContext creates a new RunServiceReportRunMetricsParams object +// with the ability to set a context for a request. +func NewRunServiceReportRunMetricsParamsWithContext(ctx context.Context) *RunServiceReportRunMetricsParams { + return &RunServiceReportRunMetricsParams{ + Context: ctx, + } +} + +// NewRunServiceReportRunMetricsParamsWithHTTPClient creates a new RunServiceReportRunMetricsParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceReportRunMetricsParamsWithHTTPClient(client *http.Client) *RunServiceReportRunMetricsParams { + return &RunServiceReportRunMetricsParams{ + HTTPClient: client, + } +} + +/* +RunServiceReportRunMetricsParams contains all the parameters to send to the API endpoint + + for the run service report run metrics operation. + + Typically these are written to a http.Request. +*/ +type RunServiceReportRunMetricsParams struct { + + // Body. + Body RunServiceReportRunMetricsBody + + /* RunID. + + Required. The parent run ID of the metric. + */ + RunID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service report run metrics params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReportRunMetricsParams) WithDefaults() *RunServiceReportRunMetricsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service report run metrics params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReportRunMetricsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) WithTimeout(timeout time.Duration) *RunServiceReportRunMetricsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) WithContext(ctx context.Context) *RunServiceReportRunMetricsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) WithHTTPClient(client *http.Client) *RunServiceReportRunMetricsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) WithBody(body RunServiceReportRunMetricsBody) *RunServiceReportRunMetricsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) SetBody(body RunServiceReportRunMetricsBody) { + o.Body = body +} + +// WithRunID adds the runID to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) WithRunID(runID string) *RunServiceReportRunMetricsParams { + o.SetRunID(runID) + return o +} + +// SetRunID adds the runId to the run service report run metrics params +func (o *RunServiceReportRunMetricsParams) SetRunID(runID string) { + o.RunID = runID +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceReportRunMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param run_id + if err := r.SetPathParam("run_id", o.RunID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_report_run_metrics_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_report_run_metrics_responses.go new file mode 100644 index 0000000000..146a0e7291 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_report_run_metrics_responses.go @@ -0,0 +1,288 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceReportRunMetricsReader is a Reader for the RunServiceReportRunMetrics structure. +type RunServiceReportRunMetricsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceReportRunMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceReportRunMetricsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceReportRunMetricsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceReportRunMetricsOK creates a RunServiceReportRunMetricsOK with default headers values +func NewRunServiceReportRunMetricsOK() *RunServiceReportRunMetricsOK { + return &RunServiceReportRunMetricsOK{} +} + +/* +RunServiceReportRunMetricsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceReportRunMetricsOK struct { + Payload *run_model.V1ReportRunMetricsResponse +} + +// IsSuccess returns true when this run service report run metrics o k response has a 2xx status code +func (o *RunServiceReportRunMetricsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service report run metrics o k response has a 3xx status code +func (o *RunServiceReportRunMetricsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service report run metrics o k response has a 4xx status code +func (o *RunServiceReportRunMetricsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service report run metrics o k response has a 5xx status code +func (o *RunServiceReportRunMetricsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service report run metrics o k response a status code equal to that given +func (o *RunServiceReportRunMetricsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service report run metrics o k response +func (o *RunServiceReportRunMetricsOK) Code() int { + return 200 +} + +func (o *RunServiceReportRunMetricsOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}:reportMetrics][%d] runServiceReportRunMetricsOK %+v", 200, o.Payload) +} + +func (o *RunServiceReportRunMetricsOK) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}:reportMetrics][%d] runServiceReportRunMetricsOK %+v", 200, o.Payload) +} + +func (o *RunServiceReportRunMetricsOK) GetPayload() *run_model.V1ReportRunMetricsResponse { + return o.Payload +} + +func (o *RunServiceReportRunMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.V1ReportRunMetricsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceReportRunMetricsDefault creates a RunServiceReportRunMetricsDefault with default headers values +func NewRunServiceReportRunMetricsDefault(code int) *RunServiceReportRunMetricsDefault { + return &RunServiceReportRunMetricsDefault{ + _statusCode: code, + } +} + +/* +RunServiceReportRunMetricsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceReportRunMetricsDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service report run metrics default response has a 2xx status code +func (o *RunServiceReportRunMetricsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service report run metrics default response has a 3xx status code +func (o *RunServiceReportRunMetricsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service report run metrics default response has a 4xx status code +func (o *RunServiceReportRunMetricsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service report run metrics default response has a 5xx status code +func (o *RunServiceReportRunMetricsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service report run metrics default response a status code equal to that given +func (o *RunServiceReportRunMetricsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service report run metrics default response +func (o *RunServiceReportRunMetricsDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceReportRunMetricsDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}:reportMetrics][%d] RunService_ReportRunMetrics default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceReportRunMetricsDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}:reportMetrics][%d] RunService_ReportRunMetrics default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceReportRunMetricsDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceReportRunMetricsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +RunServiceReportRunMetricsBody run service report run metrics body +swagger:model RunServiceReportRunMetricsBody +*/ +type RunServiceReportRunMetricsBody struct { + + // List of metrics to report. + Metrics []*run_model.V1RunMetric `json:"metrics"` +} + +// Validate validates this run service report run metrics body +func (o *RunServiceReportRunMetricsBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateMetrics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *RunServiceReportRunMetricsBody) validateMetrics(formats strfmt.Registry) error { + if swag.IsZero(o.Metrics) { // not required + return nil + } + + for i := 0; i < len(o.Metrics); i++ { + if swag.IsZero(o.Metrics[i]) { // not required + continue + } + + if o.Metrics[i] != nil { + if err := o.Metrics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "metrics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "metrics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this run service report run metrics body based on the context it is used +func (o *RunServiceReportRunMetricsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateMetrics(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *RunServiceReportRunMetricsBody) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Metrics); i++ { + + if o.Metrics[i] != nil { + if err := o.Metrics[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "metrics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "metrics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *RunServiceReportRunMetricsBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *RunServiceReportRunMetricsBody) UnmarshalBinary(b []byte) error { + var res RunServiceReportRunMetricsBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_retry_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_retry_run_parameters.go new file mode 100644 index 0000000000..6f8bf0a374 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_retry_run_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRunServiceRetryRunParams creates a new RunServiceRetryRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceRetryRunParams() *RunServiceRetryRunParams { + return &RunServiceRetryRunParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceRetryRunParamsWithTimeout creates a new RunServiceRetryRunParams object +// with the ability to set a timeout on a request. +func NewRunServiceRetryRunParamsWithTimeout(timeout time.Duration) *RunServiceRetryRunParams { + return &RunServiceRetryRunParams{ + timeout: timeout, + } +} + +// NewRunServiceRetryRunParamsWithContext creates a new RunServiceRetryRunParams object +// with the ability to set a context for a request. +func NewRunServiceRetryRunParamsWithContext(ctx context.Context) *RunServiceRetryRunParams { + return &RunServiceRetryRunParams{ + Context: ctx, + } +} + +// NewRunServiceRetryRunParamsWithHTTPClient creates a new RunServiceRetryRunParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceRetryRunParamsWithHTTPClient(client *http.Client) *RunServiceRetryRunParams { + return &RunServiceRetryRunParams{ + HTTPClient: client, + } +} + +/* +RunServiceRetryRunParams contains all the parameters to send to the API endpoint + + for the run service retry run operation. + + Typically these are written to a http.Request. +*/ +type RunServiceRetryRunParams struct { + + /* RunID. + + The ID of the run to be retried. + */ + RunID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service retry run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceRetryRunParams) WithDefaults() *RunServiceRetryRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service retry run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceRetryRunParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the run service retry run params +func (o *RunServiceRetryRunParams) WithTimeout(timeout time.Duration) *RunServiceRetryRunParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service retry run params +func (o *RunServiceRetryRunParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service retry run params +func (o *RunServiceRetryRunParams) WithContext(ctx context.Context) *RunServiceRetryRunParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service retry run params +func (o *RunServiceRetryRunParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service retry run params +func (o *RunServiceRetryRunParams) WithHTTPClient(client *http.Client) *RunServiceRetryRunParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service retry run params +func (o *RunServiceRetryRunParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRunID adds the runID to the run service retry run params +func (o *RunServiceRetryRunParams) WithRunID(runID string) *RunServiceRetryRunParams { + o.SetRunID(runID) + return o +} + +// SetRunID adds the runId to the run service retry run params +func (o *RunServiceRetryRunParams) SetRunID(runID string) { + o.RunID = runID +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceRetryRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param run_id + if err := r.SetPathParam("run_id", o.RunID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_retry_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_retry_run_responses.go new file mode 100644 index 0000000000..2474d9f1d0 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_retry_run_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceRetryRunReader is a Reader for the RunServiceRetryRun structure. +type RunServiceRetryRunReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceRetryRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceRetryRunOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceRetryRunDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceRetryRunOK creates a RunServiceRetryRunOK with default headers values +func NewRunServiceRetryRunOK() *RunServiceRetryRunOK { + return &RunServiceRetryRunOK{} +} + +/* +RunServiceRetryRunOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceRetryRunOK struct { + Payload interface{} +} + +// IsSuccess returns true when this run service retry run o k response has a 2xx status code +func (o *RunServiceRetryRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service retry run o k response has a 3xx status code +func (o *RunServiceRetryRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service retry run o k response has a 4xx status code +func (o *RunServiceRetryRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service retry run o k response has a 5xx status code +func (o *RunServiceRetryRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service retry run o k response a status code equal to that given +func (o *RunServiceRetryRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service retry run o k response +func (o *RunServiceRetryRunOK) Code() int { + return 200 +} + +func (o *RunServiceRetryRunOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/retry][%d] runServiceRetryRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceRetryRunOK) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/retry][%d] runServiceRetryRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceRetryRunOK) GetPayload() interface{} { + return o.Payload +} + +func (o *RunServiceRetryRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceRetryRunDefault creates a RunServiceRetryRunDefault with default headers values +func NewRunServiceRetryRunDefault(code int) *RunServiceRetryRunDefault { + return &RunServiceRetryRunDefault{ + _statusCode: code, + } +} + +/* +RunServiceRetryRunDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceRetryRunDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service retry run default response has a 2xx status code +func (o *RunServiceRetryRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service retry run default response has a 3xx status code +func (o *RunServiceRetryRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service retry run default response has a 4xx status code +func (o *RunServiceRetryRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service retry run default response has a 5xx status code +func (o *RunServiceRetryRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service retry run default response a status code equal to that given +func (o *RunServiceRetryRunDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service retry run default response +func (o *RunServiceRetryRunDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceRetryRunDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/retry][%d] RunService_RetryRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceRetryRunDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/retry][%d] RunService_RetryRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceRetryRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceRetryRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_terminate_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_terminate_run_parameters.go new file mode 100644 index 0000000000..1d02143821 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_terminate_run_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRunServiceTerminateRunParams creates a new RunServiceTerminateRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceTerminateRunParams() *RunServiceTerminateRunParams { + return &RunServiceTerminateRunParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceTerminateRunParamsWithTimeout creates a new RunServiceTerminateRunParams object +// with the ability to set a timeout on a request. +func NewRunServiceTerminateRunParamsWithTimeout(timeout time.Duration) *RunServiceTerminateRunParams { + return &RunServiceTerminateRunParams{ + timeout: timeout, + } +} + +// NewRunServiceTerminateRunParamsWithContext creates a new RunServiceTerminateRunParams object +// with the ability to set a context for a request. +func NewRunServiceTerminateRunParamsWithContext(ctx context.Context) *RunServiceTerminateRunParams { + return &RunServiceTerminateRunParams{ + Context: ctx, + } +} + +// NewRunServiceTerminateRunParamsWithHTTPClient creates a new RunServiceTerminateRunParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceTerminateRunParamsWithHTTPClient(client *http.Client) *RunServiceTerminateRunParams { + return &RunServiceTerminateRunParams{ + HTTPClient: client, + } +} + +/* +RunServiceTerminateRunParams contains all the parameters to send to the API endpoint + + for the run service terminate run operation. + + Typically these are written to a http.Request. +*/ +type RunServiceTerminateRunParams struct { + + /* RunID. + + The ID of the run to be terminated. + */ + RunID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service terminate run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceTerminateRunParams) WithDefaults() *RunServiceTerminateRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service terminate run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceTerminateRunParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the run service terminate run params +func (o *RunServiceTerminateRunParams) WithTimeout(timeout time.Duration) *RunServiceTerminateRunParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service terminate run params +func (o *RunServiceTerminateRunParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service terminate run params +func (o *RunServiceTerminateRunParams) WithContext(ctx context.Context) *RunServiceTerminateRunParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service terminate run params +func (o *RunServiceTerminateRunParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service terminate run params +func (o *RunServiceTerminateRunParams) WithHTTPClient(client *http.Client) *RunServiceTerminateRunParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service terminate run params +func (o *RunServiceTerminateRunParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRunID adds the runID to the run service terminate run params +func (o *RunServiceTerminateRunParams) WithRunID(runID string) *RunServiceTerminateRunParams { + o.SetRunID(runID) + return o +} + +// SetRunID adds the runId to the run service terminate run params +func (o *RunServiceTerminateRunParams) SetRunID(runID string) { + o.RunID = runID +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceTerminateRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param run_id + if err := r.SetPathParam("run_id", o.RunID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_terminate_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_terminate_run_responses.go new file mode 100644 index 0000000000..a8005e9ae5 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_terminate_run_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceTerminateRunReader is a Reader for the RunServiceTerminateRun structure. +type RunServiceTerminateRunReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceTerminateRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceTerminateRunOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceTerminateRunDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceTerminateRunOK creates a RunServiceTerminateRunOK with default headers values +func NewRunServiceTerminateRunOK() *RunServiceTerminateRunOK { + return &RunServiceTerminateRunOK{} +} + +/* +RunServiceTerminateRunOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceTerminateRunOK struct { + Payload interface{} +} + +// IsSuccess returns true when this run service terminate run o k response has a 2xx status code +func (o *RunServiceTerminateRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service terminate run o k response has a 3xx status code +func (o *RunServiceTerminateRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service terminate run o k response has a 4xx status code +func (o *RunServiceTerminateRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service terminate run o k response has a 5xx status code +func (o *RunServiceTerminateRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service terminate run o k response a status code equal to that given +func (o *RunServiceTerminateRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service terminate run o k response +func (o *RunServiceTerminateRunOK) Code() int { + return 200 +} + +func (o *RunServiceTerminateRunOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/terminate][%d] runServiceTerminateRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceTerminateRunOK) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/terminate][%d] runServiceTerminateRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceTerminateRunOK) GetPayload() interface{} { + return o.Payload +} + +func (o *RunServiceTerminateRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceTerminateRunDefault creates a RunServiceTerminateRunDefault with default headers values +func NewRunServiceTerminateRunDefault(code int) *RunServiceTerminateRunDefault { + return &RunServiceTerminateRunDefault{ + _statusCode: code, + } +} + +/* +RunServiceTerminateRunDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceTerminateRunDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service terminate run default response has a 2xx status code +func (o *RunServiceTerminateRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service terminate run default response has a 3xx status code +func (o *RunServiceTerminateRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service terminate run default response has a 4xx status code +func (o *RunServiceTerminateRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service terminate run default response has a 5xx status code +func (o *RunServiceTerminateRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service terminate run default response a status code equal to that given +func (o *RunServiceTerminateRunDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service terminate run default response +func (o *RunServiceTerminateRunDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceTerminateRunDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/terminate][%d] RunService_TerminateRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceTerminateRunDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/terminate][%d] RunService_TerminateRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceTerminateRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceTerminateRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_unarchive_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_unarchive_run_parameters.go new file mode 100644 index 0000000000..fbf8dacbc9 --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_unarchive_run_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRunServiceUnarchiveRunParams creates a new RunServiceUnarchiveRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRunServiceUnarchiveRunParams() *RunServiceUnarchiveRunParams { + return &RunServiceUnarchiveRunParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRunServiceUnarchiveRunParamsWithTimeout creates a new RunServiceUnarchiveRunParams object +// with the ability to set a timeout on a request. +func NewRunServiceUnarchiveRunParamsWithTimeout(timeout time.Duration) *RunServiceUnarchiveRunParams { + return &RunServiceUnarchiveRunParams{ + timeout: timeout, + } +} + +// NewRunServiceUnarchiveRunParamsWithContext creates a new RunServiceUnarchiveRunParams object +// with the ability to set a context for a request. +func NewRunServiceUnarchiveRunParamsWithContext(ctx context.Context) *RunServiceUnarchiveRunParams { + return &RunServiceUnarchiveRunParams{ + Context: ctx, + } +} + +// NewRunServiceUnarchiveRunParamsWithHTTPClient creates a new RunServiceUnarchiveRunParams object +// with the ability to set a custom HTTPClient for a request. +func NewRunServiceUnarchiveRunParamsWithHTTPClient(client *http.Client) *RunServiceUnarchiveRunParams { + return &RunServiceUnarchiveRunParams{ + HTTPClient: client, + } +} + +/* +RunServiceUnarchiveRunParams contains all the parameters to send to the API endpoint + + for the run service unarchive run operation. + + Typically these are written to a http.Request. +*/ +type RunServiceUnarchiveRunParams struct { + + /* ID. + + The ID of the run to be restored. + */ + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the run service unarchive run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceUnarchiveRunParams) WithDefaults() *RunServiceUnarchiveRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service unarchive run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceUnarchiveRunParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) WithTimeout(timeout time.Duration) *RunServiceUnarchiveRunParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) WithContext(ctx context.Context) *RunServiceUnarchiveRunParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) WithHTTPClient(client *http.Client) *RunServiceUnarchiveRunParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) WithID(id string) *RunServiceUnarchiveRunParams { + o.SetID(id) + return o +} + +// SetID adds the id to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *RunServiceUnarchiveRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/run_service_unarchive_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/run_service_unarchive_run_responses.go new file mode 100644 index 0000000000..4cf5e2c25b --- /dev/null +++ b/backend/api/v1/go_http_client/run_client/run_service/run_service_unarchive_run_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" +) + +// RunServiceUnarchiveRunReader is a Reader for the RunServiceUnarchiveRun structure. +type RunServiceUnarchiveRunReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RunServiceUnarchiveRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRunServiceUnarchiveRunOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRunServiceUnarchiveRunDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRunServiceUnarchiveRunOK creates a RunServiceUnarchiveRunOK with default headers values +func NewRunServiceUnarchiveRunOK() *RunServiceUnarchiveRunOK { + return &RunServiceUnarchiveRunOK{} +} + +/* +RunServiceUnarchiveRunOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RunServiceUnarchiveRunOK struct { + Payload interface{} +} + +// IsSuccess returns true when this run service unarchive run o k response has a 2xx status code +func (o *RunServiceUnarchiveRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service unarchive run o k response has a 3xx status code +func (o *RunServiceUnarchiveRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service unarchive run o k response has a 4xx status code +func (o *RunServiceUnarchiveRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service unarchive run o k response has a 5xx status code +func (o *RunServiceUnarchiveRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service unarchive run o k response a status code equal to that given +func (o *RunServiceUnarchiveRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service unarchive run o k response +func (o *RunServiceUnarchiveRunOK) Code() int { + return 200 +} + +func (o *RunServiceUnarchiveRunOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{id}:unarchive][%d] runServiceUnarchiveRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceUnarchiveRunOK) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{id}:unarchive][%d] runServiceUnarchiveRunOK %+v", 200, o.Payload) +} + +func (o *RunServiceUnarchiveRunOK) GetPayload() interface{} { + return o.Payload +} + +func (o *RunServiceUnarchiveRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewRunServiceUnarchiveRunDefault creates a RunServiceUnarchiveRunDefault with default headers values +func NewRunServiceUnarchiveRunDefault(code int) *RunServiceUnarchiveRunDefault { + return &RunServiceUnarchiveRunDefault{ + _statusCode: code, + } +} + +/* +RunServiceUnarchiveRunDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RunServiceUnarchiveRunDefault struct { + _statusCode int + + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service unarchive run default response has a 2xx status code +func (o *RunServiceUnarchiveRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service unarchive run default response has a 3xx status code +func (o *RunServiceUnarchiveRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service unarchive run default response has a 4xx status code +func (o *RunServiceUnarchiveRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service unarchive run default response has a 5xx status code +func (o *RunServiceUnarchiveRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service unarchive run default response a status code equal to that given +func (o *RunServiceUnarchiveRunDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the run service unarchive run default response +func (o *RunServiceUnarchiveRunDefault) Code() int { + return o._statusCode +} + +func (o *RunServiceUnarchiveRunDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/runs/{id}:unarchive][%d] RunService_UnarchiveRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceUnarchiveRunDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/runs/{id}:unarchive][%d] RunService_UnarchiveRun default %+v", o._statusCode, o.Payload) +} + +func (o *RunServiceUnarchiveRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload +} + +func (o *RunServiceUnarchiveRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(run_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/run_client/run_service/terminate_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/terminate_run_parameters.go deleted file mode 100644 index 97352266ca..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/terminate_run_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewTerminateRunParams creates a new TerminateRunParams object -// with the default values initialized. -func NewTerminateRunParams() *TerminateRunParams { - var () - return &TerminateRunParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewTerminateRunParamsWithTimeout creates a new TerminateRunParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewTerminateRunParamsWithTimeout(timeout time.Duration) *TerminateRunParams { - var () - return &TerminateRunParams{ - - timeout: timeout, - } -} - -// NewTerminateRunParamsWithContext creates a new TerminateRunParams object -// with the default values initialized, and the ability to set a context for a request -func NewTerminateRunParamsWithContext(ctx context.Context) *TerminateRunParams { - var () - return &TerminateRunParams{ - - Context: ctx, - } -} - -// NewTerminateRunParamsWithHTTPClient creates a new TerminateRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewTerminateRunParamsWithHTTPClient(client *http.Client) *TerminateRunParams { - var () - return &TerminateRunParams{ - HTTPClient: client, - } -} - -/*TerminateRunParams contains all the parameters to send to the API endpoint -for the terminate run operation typically these are written to a http.Request -*/ -type TerminateRunParams struct { - - /*RunID - The ID of the run to be terminated. - - */ - RunID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the terminate run params -func (o *TerminateRunParams) WithTimeout(timeout time.Duration) *TerminateRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the terminate run params -func (o *TerminateRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the terminate run params -func (o *TerminateRunParams) WithContext(ctx context.Context) *TerminateRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the terminate run params -func (o *TerminateRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the terminate run params -func (o *TerminateRunParams) WithHTTPClient(client *http.Client) *TerminateRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the terminate run params -func (o *TerminateRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithRunID adds the runID to the terminate run params -func (o *TerminateRunParams) WithRunID(runID string) *TerminateRunParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the terminate run params -func (o *TerminateRunParams) SetRunID(runID string) { - o.RunID = runID -} - -// WriteToRequest writes these params to a swagger request -func (o *TerminateRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param run_id - if err := r.SetPathParam("run_id", o.RunID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/terminate_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/terminate_run_responses.go deleted file mode 100644 index 05a7d5a6c4..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/terminate_run_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// TerminateRunReader is a Reader for the TerminateRun structure. -type TerminateRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *TerminateRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewTerminateRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewTerminateRunDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewTerminateRunOK creates a TerminateRunOK with default headers values -func NewTerminateRunOK() *TerminateRunOK { - return &TerminateRunOK{} -} - -/*TerminateRunOK handles this case with default header values. - -A successful response. -*/ -type TerminateRunOK struct { - Payload interface{} -} - -func (o *TerminateRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/terminate][%d] terminateRunOK %+v", 200, o.Payload) -} - -func (o *TerminateRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewTerminateRunDefault creates a TerminateRunDefault with default headers values -func NewTerminateRunDefault(code int) *TerminateRunDefault { - return &TerminateRunDefault{ - _statusCode: code, - } -} - -/*TerminateRunDefault handles this case with default header values. - -TerminateRunDefault terminate run default -*/ -type TerminateRunDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the terminate run default response -func (o *TerminateRunDefault) Code() int { - return o._statusCode -} - -func (o *TerminateRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{run_id}/terminate][%d] TerminateRun default %+v", o._statusCode, o.Payload) -} - -func (o *TerminateRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/unarchive_run_parameters.go b/backend/api/v1/go_http_client/run_client/run_service/unarchive_run_parameters.go deleted file mode 100644 index a6c1879d49..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/unarchive_run_parameters.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewUnarchiveRunParams creates a new UnarchiveRunParams object -// with the default values initialized. -func NewUnarchiveRunParams() *UnarchiveRunParams { - var () - return &UnarchiveRunParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewUnarchiveRunParamsWithTimeout creates a new UnarchiveRunParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewUnarchiveRunParamsWithTimeout(timeout time.Duration) *UnarchiveRunParams { - var () - return &UnarchiveRunParams{ - - timeout: timeout, - } -} - -// NewUnarchiveRunParamsWithContext creates a new UnarchiveRunParams object -// with the default values initialized, and the ability to set a context for a request -func NewUnarchiveRunParamsWithContext(ctx context.Context) *UnarchiveRunParams { - var () - return &UnarchiveRunParams{ - - Context: ctx, - } -} - -// NewUnarchiveRunParamsWithHTTPClient creates a new UnarchiveRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewUnarchiveRunParamsWithHTTPClient(client *http.Client) *UnarchiveRunParams { - var () - return &UnarchiveRunParams{ - HTTPClient: client, - } -} - -/*UnarchiveRunParams contains all the parameters to send to the API endpoint -for the unarchive run operation typically these are written to a http.Request -*/ -type UnarchiveRunParams struct { - - /*ID - The ID of the run to be restored. - - */ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the unarchive run params -func (o *UnarchiveRunParams) WithTimeout(timeout time.Duration) *UnarchiveRunParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unarchive run params -func (o *UnarchiveRunParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unarchive run params -func (o *UnarchiveRunParams) WithContext(ctx context.Context) *UnarchiveRunParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unarchive run params -func (o *UnarchiveRunParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unarchive run params -func (o *UnarchiveRunParams) WithHTTPClient(client *http.Client) *UnarchiveRunParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unarchive run params -func (o *UnarchiveRunParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the unarchive run params -func (o *UnarchiveRunParams) WithID(id string) *UnarchiveRunParams { - o.SetID(id) - return o -} - -// SetID adds the id to the unarchive run params -func (o *UnarchiveRunParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *UnarchiveRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/run_client/run_service/unarchive_run_responses.go b/backend/api/v1/go_http_client/run_client/run_service/unarchive_run_responses.go deleted file mode 100644 index 243e22c5a6..0000000000 --- a/backend/api/v1/go_http_client/run_client/run_service/unarchive_run_responses.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/run_model" -) - -// UnarchiveRunReader is a Reader for the UnarchiveRun structure. -type UnarchiveRunReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnarchiveRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewUnarchiveRunOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewUnarchiveRunDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUnarchiveRunOK creates a UnarchiveRunOK with default headers values -func NewUnarchiveRunOK() *UnarchiveRunOK { - return &UnarchiveRunOK{} -} - -/*UnarchiveRunOK handles this case with default header values. - -A successful response. -*/ -type UnarchiveRunOK struct { - Payload interface{} -} - -func (o *UnarchiveRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{id}:unarchive][%d] unarchiveRunOK %+v", 200, o.Payload) -} - -func (o *UnarchiveRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUnarchiveRunDefault creates a UnarchiveRunDefault with default headers values -func NewUnarchiveRunDefault(code int) *UnarchiveRunDefault { - return &UnarchiveRunDefault{ - _statusCode: code, - } -} - -/*UnarchiveRunDefault handles this case with default header values. - -UnarchiveRunDefault unarchive run default -*/ -type UnarchiveRunDefault struct { - _statusCode int - - Payload *run_model.V1Status -} - -// Code gets the status code for the unarchive run default response -func (o *UnarchiveRunDefault) Code() int { - return o._statusCode -} - -func (o *UnarchiveRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/runs/{id}:unarchive][%d] UnarchiveRun default %+v", o._statusCode, o.Payload) -} - -func (o *UnarchiveRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(run_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/run_model/googlerpc_status.go b/backend/api/v1/go_http_client/run_model/googlerpc_status.go new file mode 100644 index 0000000000..43ffc7242b --- /dev/null +++ b/backend/api/v1/go_http_client/run_model/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1/go_http_client/run_model/pipeline_spec_runtime_config.go b/backend/api/v1/go_http_client/run_model/pipeline_spec_runtime_config.go index 884d3ccee1..7e77fa701d 100644 --- a/backend/api/v1/go_http_client/run_model/pipeline_spec_runtime_config.go +++ b/backend/api/v1/go_http_client/run_model/pipeline_spec_runtime_config.go @@ -6,14 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // PipelineSpecRuntimeConfig The runtime config of a PipelineSpec. +// // swagger:model PipelineSpecRuntimeConfig type PipelineSpecRuntimeConfig struct { @@ -43,7 +45,6 @@ func (m *PipelineSpecRuntimeConfig) Validate(formats strfmt.Registry) error { } func (m *PipelineSpecRuntimeConfig) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -55,6 +56,40 @@ func (m *PipelineSpecRuntimeConfig) validateParameters(formats strfmt.Registry) } if val, ok := m.Parameters[k]; ok { if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + k) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this pipeline spec runtime config based on the context it is used +func (m *PipelineSpecRuntimeConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PipelineSpecRuntimeConfig) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for k := range m.Parameters { + + if val, ok := m.Parameters[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { return err } } diff --git a/backend/api/v1/go_http_client/run_model/protobuf_any.go b/backend/api/v1/go_http_client/run_model/protobuf_any.go index 6d18c719ed..342f93cbb5 100644 --- a/backend/api/v1/go_http_client/run_model/protobuf_any.go +++ b/backend/api/v1/go_http_client/run_model/protobuf_any.go @@ -6,9 +6,9 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +20,45 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// 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 := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// 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 := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(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 @@ -66,34 +66,34 @@ import ( // 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; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@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" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -124,35 +124,16 @@ type ProtobufAny struct { // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` - - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + AtType string `json:"@type,omitempty"` } // Validate validates this protobuf any func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { - - if swag.IsZero(m.Value) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result.go b/backend/api/v1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result.go index c0ea5f174a..98eef41292 100644 --- a/backend/api/v1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result.go +++ b/backend/api/v1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result.go @@ -6,13 +6,15 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // ReportRunMetricsResponseReportRunMetricResult report run metrics response report run metric result +// // swagger:model ReportRunMetricsResponseReportRunMetricResult type ReportRunMetricsResponseReportRunMetricResult struct { @@ -26,7 +28,7 @@ type ReportRunMetricsResponseReportRunMetricResult struct { MetricNodeID string `json:"metric_node_id,omitempty"` // Output. The status of the metric reporting. - Status ReportRunMetricsResponseReportRunMetricResultStatus `json:"status,omitempty"` + Status *ReportRunMetricsResponseReportRunMetricResultStatus `json:"status,omitempty"` } // Validate validates this report run metrics response report run metric result @@ -44,16 +46,49 @@ func (m *ReportRunMetricsResponseReportRunMetricResult) Validate(formats strfmt. } func (m *ReportRunMetricsResponseReportRunMetricResult) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required return nil } - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// ContextValidate validate this report run metrics response report run metric result based on the context it is used +func (m *ReportRunMetricsResponseReportRunMetricResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ReportRunMetricsResponseReportRunMetricResult) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result_status.go b/backend/api/v1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result_status.go index 19f00402ee..5f7b96fe2b 100644 --- a/backend/api/v1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result_status.go +++ b/backend/api/v1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result_status.go @@ -6,22 +6,32 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // 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. +// - 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. +// // swagger:model ReportRunMetricsResponseReportRunMetricResultStatus type ReportRunMetricsResponseReportRunMetricResultStatus string +func NewReportRunMetricsResponseReportRunMetricResultStatus(value ReportRunMetricsResponseReportRunMetricResultStatus) *ReportRunMetricsResponseReportRunMetricResultStatus { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ReportRunMetricsResponseReportRunMetricResultStatus. +func (m ReportRunMetricsResponseReportRunMetricResultStatus) Pointer() *ReportRunMetricsResponseReportRunMetricResultStatus { + return &m +} + const ( // ReportRunMetricsResponseReportRunMetricResultStatusUNSPECIFIED captures enum value "UNSPECIFIED" @@ -54,7 +64,7 @@ func init() { } func (m ReportRunMetricsResponseReportRunMetricResultStatus) validateReportRunMetricsResponseReportRunMetricResultStatusEnum(path, location string, value ReportRunMetricsResponseReportRunMetricResultStatus) error { - if err := validate.Enum(path, location, value, reportRunMetricsResponseReportRunMetricResultStatusEnum); err != nil { + if err := validate.EnumCase(path, location, value, reportRunMetricsResponseReportRunMetricResultStatusEnum, true); err != nil { return err } return nil @@ -74,3 +84,8 @@ func (m ReportRunMetricsResponseReportRunMetricResultStatus) Validate(formats st } return nil } + +// ContextValidate validates this report run metrics response report run metric result status based on context it is used +func (m ReportRunMetricsResponseReportRunMetricResultStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/run_model/run_metric_format.go b/backend/api/v1/go_http_client/run_model/run_metric_format.go index 6a194f501b..a454bd9be0 100644 --- a/backend/api/v1/go_http_client/run_model/run_metric_format.go +++ b/backend/api/v1/go_http_client/run_model/run_metric_format.go @@ -6,20 +6,30 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // RunMetricFormat - UNSPECIFIED: Default value if not present. -// - RAW: Display value as its raw format. -// - PERCENTAGE: Display value in percentage format. +// - RAW: Display value as its raw format. +// - PERCENTAGE: Display value in percentage format. +// // swagger:model RunMetricFormat type RunMetricFormat string +func NewRunMetricFormat(value RunMetricFormat) *RunMetricFormat { + return &value +} + +// Pointer returns a pointer to a freshly-allocated RunMetricFormat. +func (m RunMetricFormat) Pointer() *RunMetricFormat { + return &m +} + const ( // RunMetricFormatUNSPECIFIED captures enum value "UNSPECIFIED" @@ -46,7 +56,7 @@ func init() { } func (m RunMetricFormat) validateRunMetricFormatEnum(path, location string, value RunMetricFormat) error { - if err := validate.Enum(path, location, value, runMetricFormatEnum); err != nil { + if err := validate.EnumCase(path, location, value, runMetricFormatEnum, true); err != nil { return err } return nil @@ -66,3 +76,8 @@ func (m RunMetricFormat) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this run metric format based on context it is used +func (m RunMetricFormat) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/run_model/v1_list_runs_response.go b/backend/api/v1/go_http_client/run_model/v1_list_runs_response.go index 8790fb1b1f..947cfd25ba 100644 --- a/backend/api/v1/go_http_client/run_model/v1_list_runs_response.go +++ b/backend/api/v1/go_http_client/run_model/v1_list_runs_response.go @@ -6,15 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ListRunsResponse v1 list runs response +// // swagger:model v1ListRunsResponse type V1ListRunsResponse struct { @@ -43,7 +44,6 @@ func (m *V1ListRunsResponse) Validate(formats strfmt.Registry) error { } func (m *V1ListRunsResponse) validateRuns(formats strfmt.Registry) error { - if swag.IsZero(m.Runs) { // not required return nil } @@ -57,6 +57,42 @@ func (m *V1ListRunsResponse) validateRuns(formats strfmt.Registry) error { if err := m.Runs[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("runs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 list runs response based on the context it is used +func (m *V1ListRunsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRuns(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ListRunsResponse) contextValidateRuns(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Runs); i++ { + + if m.Runs[i] != nil { + if err := m.Runs[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runs" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1/go_http_client/run_model/v1_parameter.go b/backend/api/v1/go_http_client/run_model/v1_parameter.go index d036779300..fa1de90ca9 100644 --- a/backend/api/v1/go_http_client/run_model/v1_parameter.go +++ b/backend/api/v1/go_http_client/run_model/v1_parameter.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1Parameter v1 parameter +// // swagger:model v1Parameter type V1Parameter struct { @@ -27,6 +29,11 @@ func (m *V1Parameter) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 parameter based on context it is used +func (m *V1Parameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1Parameter) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/run_model/v1_pipeline_runtime.go b/backend/api/v1/go_http_client/run_model/v1_pipeline_runtime.go index 86210aff02..a2fca027c9 100644 --- a/backend/api/v1/go_http_client/run_model/v1_pipeline_runtime.go +++ b/backend/api/v1/go_http_client/run_model/v1_pipeline_runtime.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1PipelineRuntime v1 pipeline runtime +// // swagger:model v1PipelineRuntime type V1PipelineRuntime struct { @@ -29,6 +31,11 @@ func (m *V1PipelineRuntime) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 pipeline runtime based on context it is used +func (m *V1PipelineRuntime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1PipelineRuntime) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/run_model/v1_pipeline_spec.go b/backend/api/v1/go_http_client/run_model/v1_pipeline_spec.go index ea0398af80..2c415811b7 100644 --- a/backend/api/v1/go_http_client/run_model/v1_pipeline_spec.go +++ b/backend/api/v1/go_http_client/run_model/v1_pipeline_spec.go @@ -6,15 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1PipelineSpec v1 pipeline spec +// // swagger:model v1PipelineSpec type V1PipelineSpec struct { @@ -60,7 +61,6 @@ func (m *V1PipelineSpec) Validate(formats strfmt.Registry) error { } func (m *V1PipelineSpec) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -74,6 +74,8 @@ func (m *V1PipelineSpec) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -85,7 +87,6 @@ func (m *V1PipelineSpec) validateParameters(formats strfmt.Registry) error { } func (m *V1PipelineSpec) validateRuntimeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RuntimeConfig) { // not required return nil } @@ -94,6 +95,62 @@ func (m *V1PipelineSpec) validateRuntimeConfig(formats strfmt.Registry) error { if err := m.RuntimeConfig.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 pipeline spec based on the context it is used +func (m *V1PipelineSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRuntimeConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PipelineSpec) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PipelineSpec) contextValidateRuntimeConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.RuntimeConfig != nil { + if err := m.RuntimeConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") } return err } diff --git a/backend/api/v1/go_http_client/run_model/v1_read_artifact_response.go b/backend/api/v1/go_http_client/run_model/v1_read_artifact_response.go index a4d36d21f8..768cd41ea0 100644 --- a/backend/api/v1/go_http_client/run_model/v1_read_artifact_response.go +++ b/backend/api/v1/go_http_client/run_model/v1_read_artifact_response.go @@ -6,13 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ReadArtifactResponse v1 read artifact response +// // swagger:model v1ReadArtifactResponse type V1ReadArtifactResponse struct { @@ -23,26 +24,11 @@ type V1ReadArtifactResponse struct { // Validate validates this v1 read artifact response func (m *V1ReadArtifactResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateData(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *V1ReadArtifactResponse) validateData(formats strfmt.Registry) error { - - if swag.IsZero(m.Data) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this v1 read artifact response based on context it is used +func (m *V1ReadArtifactResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1/go_http_client/run_model/v1_relationship.go b/backend/api/v1/go_http_client/run_model/v1_relationship.go index 02e0861e19..a3d20ee0d8 100644 --- a/backend/api/v1/go_http_client/run_model/v1_relationship.go +++ b/backend/api/v1/go_http_client/run_model/v1_relationship.go @@ -6,18 +6,28 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1Relationship v1 relationship +// // swagger:model v1Relationship type V1Relationship string +func NewV1Relationship(value V1Relationship) *V1Relationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1Relationship. +func (m V1Relationship) Pointer() *V1Relationship { + return &m +} + const ( // V1RelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m V1Relationship) validateV1RelationshipEnum(path, location string, value V1Relationship) error { - if err := validate.Enum(path, location, value, v1RelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1RelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m V1Relationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 relationship based on context it is used +func (m V1Relationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/run_model/v1_report_run_metrics_request.go b/backend/api/v1/go_http_client/run_model/v1_report_run_metrics_request.go deleted file mode 100644 index 42905b1ca1..0000000000 --- a/backend/api/v1/go_http_client/run_model/v1_report_run_metrics_request.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// V1ReportRunMetricsRequest v1 report run metrics request -// swagger:model v1ReportRunMetricsRequest -type V1ReportRunMetricsRequest struct { - - // List of metrics to report. - Metrics []*V1RunMetric `json:"metrics"` - - // Required. The parent run ID of the metric. - RunID string `json:"run_id,omitempty"` -} - -// Validate validates this v1 report run metrics request -func (m *V1ReportRunMetricsRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetrics(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1ReportRunMetricsRequest) validateMetrics(formats strfmt.Registry) error { - - if swag.IsZero(m.Metrics) { // not required - return nil - } - - for i := 0; i < len(m.Metrics); i++ { - if swag.IsZero(m.Metrics[i]) { // not required - continue - } - - if m.Metrics[i] != nil { - if err := m.Metrics[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metrics" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1ReportRunMetricsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1ReportRunMetricsRequest) UnmarshalBinary(b []byte) error { - var res V1ReportRunMetricsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1/go_http_client/run_model/v1_report_run_metrics_response.go b/backend/api/v1/go_http_client/run_model/v1_report_run_metrics_response.go index 4c6b4ac169..a915e04be0 100644 --- a/backend/api/v1/go_http_client/run_model/v1_report_run_metrics_response.go +++ b/backend/api/v1/go_http_client/run_model/v1_report_run_metrics_response.go @@ -6,15 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ReportRunMetricsResponse v1 report run metrics response +// // swagger:model v1ReportRunMetricsResponse type V1ReportRunMetricsResponse struct { @@ -37,7 +38,6 @@ func (m *V1ReportRunMetricsResponse) Validate(formats strfmt.Registry) error { } func (m *V1ReportRunMetricsResponse) validateResults(formats strfmt.Registry) error { - if swag.IsZero(m.Results) { // not required return nil } @@ -51,6 +51,42 @@ func (m *V1ReportRunMetricsResponse) validateResults(formats strfmt.Registry) er if err := m.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 report run metrics response based on the context it is used +func (m *V1ReportRunMetricsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ReportRunMetricsResponse) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Results); i++ { + + if m.Results[i] != nil { + if err := m.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("results" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1/go_http_client/run_model/v1_resource_key.go b/backend/api/v1/go_http_client/run_model/v1_resource_key.go index 3a6f41a6c4..e42d216e13 100644 --- a/backend/api/v1/go_http_client/run_model/v1_resource_key.go +++ b/backend/api/v1/go_http_client/run_model/v1_resource_key.go @@ -6,13 +6,15 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceKey v1 resource key +// // swagger:model v1ResourceKey type V1ResourceKey struct { @@ -20,7 +22,7 @@ type V1ResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type V1ResourceType `json:"type,omitempty"` + Type *V1ResourceType `json:"type,omitempty"` } // Validate validates this v1 resource key @@ -38,16 +40,49 @@ func (m *V1ResourceKey) Validate(formats strfmt.Registry) error { } func (m *V1ResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource key based on the context it is used +func (m *V1ResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/run_model/v1_resource_reference.go b/backend/api/v1/go_http_client/run_model/v1_resource_reference.go index a08a5a6c5a..7aa8bbc5bd 100644 --- a/backend/api/v1/go_http_client/run_model/v1_resource_reference.go +++ b/backend/api/v1/go_http_client/run_model/v1_resource_reference.go @@ -6,13 +6,15 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1ResourceReference v1 resource reference +// // swagger:model v1ResourceReference type V1ResourceReference struct { @@ -23,7 +25,7 @@ type V1ResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship V1Relationship `json:"relationship,omitempty"` + Relationship *V1Relationship `json:"relationship,omitempty"` } // Validate validates this v1 resource reference @@ -45,7 +47,6 @@ func (m *V1ResourceReference) Validate(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,69 @@ func (m *V1ResourceReference) validateKey(formats strfmt.Registry) error { } func (m *V1ResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource reference based on the context it is used +func (m *V1ResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *V1ResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/run_model/v1_resource_type.go b/backend/api/v1/go_http_client/run_model/v1_resource_type.go index 62274107cd..8d5f01e306 100644 --- a/backend/api/v1/go_http_client/run_model/v1_resource_type.go +++ b/backend/api/v1/go_http_client/run_model/v1_resource_type.go @@ -6,18 +6,28 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1ResourceType v1 resource type +// // swagger:model v1ResourceType type V1ResourceType string +func NewV1ResourceType(value V1ResourceType) *V1ResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1ResourceType. +func (m V1ResourceType) Pointer() *V1ResourceType { + return &m +} + const ( // V1ResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m V1ResourceType) validateV1ResourceTypeEnum(path, location string, value V1ResourceType) error { - if err := validate.Enum(path, location, value, v1ResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1ResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m V1ResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 resource type based on context it is used +func (m V1ResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/run_model/v1_run.go b/backend/api/v1/go_http_client/run_model/v1_run.go index e6ef059372..c95ffa2246 100644 --- a/backend/api/v1/go_http_client/run_model/v1_run.go +++ b/backend/api/v1/go_http_client/run_model/v1_run.go @@ -6,16 +6,17 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V1Run v1 run +// // swagger:model v1Run type V1Run struct { @@ -70,7 +71,7 @@ type V1Run struct { Status string `json:"status,omitempty"` // Output. Specify whether this run is in archived or available mode. - StorageState V1RunStorageState `json:"storage_state,omitempty"` + StorageState *V1RunStorageState `json:"storage_state,omitempty"` } // Validate validates this v1 run @@ -112,7 +113,6 @@ func (m *V1Run) Validate(formats strfmt.Registry) error { } func (m *V1Run) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -125,7 +125,6 @@ func (m *V1Run) validateCreatedAt(formats strfmt.Registry) error { } func (m *V1Run) validateFinishedAt(formats strfmt.Registry) error { - if swag.IsZero(m.FinishedAt) { // not required return nil } @@ -138,7 +137,6 @@ func (m *V1Run) validateFinishedAt(formats strfmt.Registry) error { } func (m *V1Run) validateMetrics(formats strfmt.Registry) error { - if swag.IsZero(m.Metrics) { // not required return nil } @@ -152,6 +150,8 @@ func (m *V1Run) validateMetrics(formats strfmt.Registry) error { if err := m.Metrics[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("metrics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metrics" + "." + strconv.Itoa(i)) } return err } @@ -163,7 +163,6 @@ func (m *V1Run) validateMetrics(formats strfmt.Registry) error { } func (m *V1Run) validatePipelineSpec(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineSpec) { // not required return nil } @@ -172,6 +171,8 @@ func (m *V1Run) validatePipelineSpec(formats strfmt.Registry) error { if err := m.PipelineSpec.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") } return err } @@ -181,7 +182,6 @@ func (m *V1Run) validatePipelineSpec(formats strfmt.Registry) error { } func (m *V1Run) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -195,6 +195,8 @@ func (m *V1Run) validateResourceReferences(formats strfmt.Registry) error { if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } @@ -206,7 +208,6 @@ func (m *V1Run) validateResourceReferences(formats strfmt.Registry) error { } func (m *V1Run) validateScheduledAt(formats strfmt.Registry) error { - if swag.IsZero(m.ScheduledAt) { // not required return nil } @@ -219,16 +220,117 @@ func (m *V1Run) validateScheduledAt(formats strfmt.Registry) error { } func (m *V1Run) validateStorageState(formats strfmt.Registry) error { - if swag.IsZero(m.StorageState) { // not required return nil } - if err := m.StorageState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storage_state") + if m.StorageState != nil { + if err := m.StorageState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 run based on the context it is used +func (m *V1Run) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMetrics(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePipelineSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStorageState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Run) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Metrics); i++ { + + if m.Metrics[i] != nil { + if err := m.Metrics[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metrics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metrics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Run) contextValidatePipelineSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineSpec != nil { + if err := m.PipelineSpec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") + } + return err + } + } + + return nil +} + +func (m *V1Run) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Run) contextValidateStorageState(ctx context.Context, formats strfmt.Registry) error { + + if m.StorageState != nil { + if err := m.StorageState.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/run_model/v1_run_detail.go b/backend/api/v1/go_http_client/run_model/v1_run_detail.go index b7b8ce7abd..1f7955b5f5 100644 --- a/backend/api/v1/go_http_client/run_model/v1_run_detail.go +++ b/backend/api/v1/go_http_client/run_model/v1_run_detail.go @@ -6,13 +6,15 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1RunDetail v1 run detail +// // swagger:model v1RunDetail type V1RunDetail struct { @@ -42,7 +44,6 @@ func (m *V1RunDetail) Validate(formats strfmt.Registry) error { } func (m *V1RunDetail) validatePipelineRuntime(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineRuntime) { // not required return nil } @@ -51,6 +52,8 @@ func (m *V1RunDetail) validatePipelineRuntime(formats strfmt.Registry) error { if err := m.PipelineRuntime.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_runtime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_runtime") } return err } @@ -60,7 +63,6 @@ func (m *V1RunDetail) validatePipelineRuntime(formats strfmt.Registry) error { } func (m *V1RunDetail) validateRun(formats strfmt.Registry) error { - if swag.IsZero(m.Run) { // not required return nil } @@ -69,6 +71,58 @@ func (m *V1RunDetail) validateRun(formats strfmt.Registry) error { if err := m.Run.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("run") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("run") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 run detail based on the context it is used +func (m *V1RunDetail) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePipelineRuntime(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRun(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RunDetail) contextValidatePipelineRuntime(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineRuntime != nil { + if err := m.PipelineRuntime.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_runtime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_runtime") + } + return err + } + } + + return nil +} + +func (m *V1RunDetail) contextValidateRun(ctx context.Context, formats strfmt.Registry) error { + + if m.Run != nil { + if err := m.Run.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("run") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("run") } return err } diff --git a/backend/api/v1/go_http_client/run_model/v1_run_metric.go b/backend/api/v1/go_http_client/run_model/v1_run_metric.go index 6896b08630..eda34473d9 100644 --- a/backend/api/v1/go_http_client/run_model/v1_run_metric.go +++ b/backend/api/v1/go_http_client/run_model/v1_run_metric.go @@ -6,18 +6,20 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1RunMetric v1 run metric +// // swagger:model v1RunMetric type V1RunMetric struct { // The display format of metric. - Format RunMetricFormat `json:"format,omitempty"` + Format *RunMetricFormat `json:"format,omitempty"` // Required. The user defined name of the metric. It must between 1 and 63 // characters long and must conform to the following regular expression: @@ -49,16 +51,49 @@ func (m *V1RunMetric) Validate(formats strfmt.Registry) error { } func (m *V1RunMetric) validateFormat(formats strfmt.Registry) error { - if swag.IsZero(m.Format) { // not required return nil } - if err := m.Format.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("format") + if m.Format != nil { + if err := m.Format.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("format") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("format") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 run metric based on the context it is used +func (m *V1RunMetric) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateFormat(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RunMetric) contextValidateFormat(ctx context.Context, formats strfmt.Registry) error { + + if m.Format != nil { + if err := m.Format.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("format") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("format") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/run_model/v1_run_storage_state.go b/backend/api/v1/go_http_client/run_model/v1_run_storage_state.go index 02c0226c97..614a0f9aef 100644 --- a/backend/api/v1/go_http_client/run_model/v1_run_storage_state.go +++ b/backend/api/v1/go_http_client/run_model/v1_run_storage_state.go @@ -6,18 +6,28 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1RunStorageState v1 run storage state +// // swagger:model v1RunStorageState type V1RunStorageState string +func NewV1RunStorageState(value V1RunStorageState) *V1RunStorageState { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1RunStorageState. +func (m V1RunStorageState) Pointer() *V1RunStorageState { + return &m +} + const ( // V1RunStorageStateSTORAGESTATEAVAILABLE captures enum value "STORAGESTATE_AVAILABLE" @@ -41,7 +51,7 @@ func init() { } func (m V1RunStorageState) validateV1RunStorageStateEnum(path, location string, value V1RunStorageState) error { - if err := validate.Enum(path, location, value, v1RunStorageStateEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1RunStorageStateEnum, true); err != nil { return err } return nil @@ -61,3 +71,8 @@ func (m V1RunStorageState) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 run storage state based on context it is used +func (m V1RunStorageState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/go_http_client/run_model/v1_status.go b/backend/api/v1/go_http_client/run_model/v1_status.go deleted file mode 100644 index 016dd582e7..0000000000 --- a/backend/api/v1/go_http_client/run_model/v1_status.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// V1Status v1 status -// swagger:model v1Status -type V1Status struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` -} - -// Validate validates this v1 status -func (m *V1Status) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1Status) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1Status) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1Status) UnmarshalBinary(b []byte) error { - var res V1Status - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1/go_http_client/run_model/v1_value.go b/backend/api/v1/go_http_client/run_model/v1_value.go index 1b3478edc7..a95fd72b6e 100644 --- a/backend/api/v1/go_http_client/run_model/v1_value.go +++ b/backend/api/v1/go_http_client/run_model/v1_value.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1Value Value is the value of the field. +// // swagger:model v1Value type V1Value struct { @@ -30,6 +32,11 @@ func (m *V1Value) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v1 value based on context it is used +func (m *V1Value) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V1Value) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1/go_http_client/visualization_client/visualization_client.go b/backend/api/v1/go_http_client/visualization_client/visualization_client.go index 46c0870df2..d7aae70f58 100644 --- a/backend/api/v1/go_http_client/visualization_client/visualization_client.go +++ b/backend/api/v1/go_http_client/visualization_client/visualization_client.go @@ -8,8 +8,7 @@ package visualization_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/visualization_client/visualization_service" ) @@ -27,7 +26,7 @@ const ( ) // DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http", "https"} +var DefaultSchemes = []string{"http"} // NewHTTPClient creates a new visualization HTTP client. func NewHTTPClient(formats strfmt.Registry) *Visualization { @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Visualizat cli := new(Visualization) cli.Transport = transport - cli.VisualizationService = visualization_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Visualization is a client for visualization type Visualization struct { - VisualizationService *visualization_service.Client + VisualizationService visualization_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Visualization struct { // SetTransport changes the transport on the client and all its subresources func (c *Visualization) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.VisualizationService.SetTransport(transport) - } diff --git a/backend/api/v1/go_http_client/visualization_client/visualization_service/create_visualization_parameters.go b/backend/api/v1/go_http_client/visualization_client/visualization_service/create_visualization_parameters.go deleted file mode 100644 index 6c1c0422a0..0000000000 --- a/backend/api/v1/go_http_client/visualization_client/visualization_service/create_visualization_parameters.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package visualization_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" - - visualization_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/visualization_model" -) - -// NewCreateVisualizationParams creates a new CreateVisualizationParams object -// with the default values initialized. -func NewCreateVisualizationParams() *CreateVisualizationParams { - var () - return &CreateVisualizationParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewCreateVisualizationParamsWithTimeout creates a new CreateVisualizationParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewCreateVisualizationParamsWithTimeout(timeout time.Duration) *CreateVisualizationParams { - var () - return &CreateVisualizationParams{ - - timeout: timeout, - } -} - -// NewCreateVisualizationParamsWithContext creates a new CreateVisualizationParams object -// with the default values initialized, and the ability to set a context for a request -func NewCreateVisualizationParamsWithContext(ctx context.Context) *CreateVisualizationParams { - var () - return &CreateVisualizationParams{ - - Context: ctx, - } -} - -// NewCreateVisualizationParamsWithHTTPClient creates a new CreateVisualizationParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewCreateVisualizationParamsWithHTTPClient(client *http.Client) *CreateVisualizationParams { - var () - return &CreateVisualizationParams{ - HTTPClient: client, - } -} - -/*CreateVisualizationParams contains all the parameters to send to the API endpoint -for the create visualization operation typically these are written to a http.Request -*/ -type CreateVisualizationParams struct { - - /*Body*/ - Body *visualization_model.V1Visualization - /*Namespace*/ - Namespace string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the create visualization params -func (o *CreateVisualizationParams) WithTimeout(timeout time.Duration) *CreateVisualizationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create visualization params -func (o *CreateVisualizationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create visualization params -func (o *CreateVisualizationParams) WithContext(ctx context.Context) *CreateVisualizationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create visualization params -func (o *CreateVisualizationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create visualization params -func (o *CreateVisualizationParams) WithHTTPClient(client *http.Client) *CreateVisualizationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create visualization params -func (o *CreateVisualizationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create visualization params -func (o *CreateVisualizationParams) WithBody(body *visualization_model.V1Visualization) *CreateVisualizationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create visualization params -func (o *CreateVisualizationParams) SetBody(body *visualization_model.V1Visualization) { - o.Body = body -} - -// WithNamespace adds the namespace to the create visualization params -func (o *CreateVisualizationParams) WithNamespace(namespace string) *CreateVisualizationParams { - o.SetNamespace(namespace) - return o -} - -// SetNamespace adds the namespace to the create visualization params -func (o *CreateVisualizationParams) SetNamespace(namespace string) { - o.Namespace = namespace -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateVisualizationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - // path param namespace - if err := r.SetPathParam("namespace", o.Namespace); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/backend/api/v1/go_http_client/visualization_client/visualization_service/create_visualization_responses.go b/backend/api/v1/go_http_client/visualization_client/visualization_service/create_visualization_responses.go deleted file mode 100644 index 1676b44407..0000000000 --- a/backend/api/v1/go_http_client/visualization_client/visualization_service/create_visualization_responses.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package visualization_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" - - visualization_model "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/visualization_model" -) - -// CreateVisualizationReader is a Reader for the CreateVisualization structure. -type CreateVisualizationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateVisualizationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - - case 200: - result := NewCreateVisualizationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - result := NewCreateVisualizationDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreateVisualizationOK creates a CreateVisualizationOK with default headers values -func NewCreateVisualizationOK() *CreateVisualizationOK { - return &CreateVisualizationOK{} -} - -/*CreateVisualizationOK handles this case with default header values. - -A successful response. -*/ -type CreateVisualizationOK struct { - Payload *visualization_model.V1Visualization -} - -func (o *CreateVisualizationOK) Error() string { - return fmt.Sprintf("[POST /apis/v1/visualizations/{namespace}][%d] createVisualizationOK %+v", 200, o.Payload) -} - -func (o *CreateVisualizationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(visualization_model.V1Visualization) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateVisualizationDefault creates a CreateVisualizationDefault with default headers values -func NewCreateVisualizationDefault(code int) *CreateVisualizationDefault { - return &CreateVisualizationDefault{ - _statusCode: code, - } -} - -/*CreateVisualizationDefault handles this case with default header values. - -CreateVisualizationDefault create visualization default -*/ -type CreateVisualizationDefault struct { - _statusCode int - - Payload *visualization_model.V1Status -} - -// Code gets the status code for the create visualization default response -func (o *CreateVisualizationDefault) Code() int { - return o._statusCode -} - -func (o *CreateVisualizationDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1/visualizations/{namespace}][%d] CreateVisualization default %+v", o._statusCode, o.Payload) -} - -func (o *CreateVisualizationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(visualization_model.V1Status) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_client.go b/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_client.go index a20dd966c5..f4e54d27c9 100644 --- a/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_client.go +++ b/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_client.go @@ -7,12 +7,11 @@ package visualization_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) // New creates a new visualization service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } @@ -24,33 +23,52 @@ type Client struct { formats strfmt.Registry } +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + VisualizationServiceCreateVisualization(params *VisualizationServiceCreateVisualizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VisualizationServiceCreateVisualizationOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* -CreateVisualization create visualization API +VisualizationServiceCreateVisualization visualization service create visualization API */ -func (a *Client) CreateVisualization(params *CreateVisualizationParams, authInfo runtime.ClientAuthInfoWriter) (*CreateVisualizationOK, error) { +func (a *Client) VisualizationServiceCreateVisualization(params *VisualizationServiceCreateVisualizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VisualizationServiceCreateVisualizationOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewCreateVisualizationParams() + params = NewVisualizationServiceCreateVisualizationParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "CreateVisualization", + op := &runtime.ClientOperation{ + ID: "VisualizationService_CreateVisualization", Method: "POST", PathPattern: "/apis/v1/visualizations/{namespace}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, + Schemes: []string{"http"}, Params: params, - Reader: &CreateVisualizationReader{formats: a.formats}, + Reader: &VisualizationServiceCreateVisualizationReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*CreateVisualizationOK), nil - + success, ok := result.(*VisualizationServiceCreateVisualizationOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*VisualizationServiceCreateVisualizationDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_parameters.go b/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_parameters.go new file mode 100644 index 0000000000..0df24fc945 --- /dev/null +++ b/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_parameters.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package visualization_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/visualization_model" +) + +// NewVisualizationServiceCreateVisualizationParams creates a new VisualizationServiceCreateVisualizationParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewVisualizationServiceCreateVisualizationParams() *VisualizationServiceCreateVisualizationParams { + return &VisualizationServiceCreateVisualizationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewVisualizationServiceCreateVisualizationParamsWithTimeout creates a new VisualizationServiceCreateVisualizationParams object +// with the ability to set a timeout on a request. +func NewVisualizationServiceCreateVisualizationParamsWithTimeout(timeout time.Duration) *VisualizationServiceCreateVisualizationParams { + return &VisualizationServiceCreateVisualizationParams{ + timeout: timeout, + } +} + +// NewVisualizationServiceCreateVisualizationParamsWithContext creates a new VisualizationServiceCreateVisualizationParams object +// with the ability to set a context for a request. +func NewVisualizationServiceCreateVisualizationParamsWithContext(ctx context.Context) *VisualizationServiceCreateVisualizationParams { + return &VisualizationServiceCreateVisualizationParams{ + Context: ctx, + } +} + +// NewVisualizationServiceCreateVisualizationParamsWithHTTPClient creates a new VisualizationServiceCreateVisualizationParams object +// with the ability to set a custom HTTPClient for a request. +func NewVisualizationServiceCreateVisualizationParamsWithHTTPClient(client *http.Client) *VisualizationServiceCreateVisualizationParams { + return &VisualizationServiceCreateVisualizationParams{ + HTTPClient: client, + } +} + +/* +VisualizationServiceCreateVisualizationParams contains all the parameters to send to the API endpoint + + for the visualization service create visualization operation. + + Typically these are written to a http.Request. +*/ +type VisualizationServiceCreateVisualizationParams struct { + + // Namespace. + Namespace string + + // Visualization. + Visualization *visualization_model.V1Visualization + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the visualization service create visualization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *VisualizationServiceCreateVisualizationParams) WithDefaults() *VisualizationServiceCreateVisualizationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the visualization service create visualization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *VisualizationServiceCreateVisualizationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) WithTimeout(timeout time.Duration) *VisualizationServiceCreateVisualizationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) WithContext(ctx context.Context) *VisualizationServiceCreateVisualizationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) WithHTTPClient(client *http.Client) *VisualizationServiceCreateVisualizationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) WithNamespace(namespace string) *VisualizationServiceCreateVisualizationParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithVisualization adds the visualization to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) WithVisualization(visualization *visualization_model.V1Visualization) *VisualizationServiceCreateVisualizationParams { + o.SetVisualization(visualization) + return o +} + +// SetVisualization adds the visualization to the visualization service create visualization params +func (o *VisualizationServiceCreateVisualizationParams) SetVisualization(visualization *visualization_model.V1Visualization) { + o.Visualization = visualization +} + +// WriteToRequest writes these params to a swagger request +func (o *VisualizationServiceCreateVisualizationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param namespace + if err := r.SetPathParam("namespace", o.Namespace); err != nil { + return err + } + if o.Visualization != nil { + if err := r.SetBodyParam(o.Visualization); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_responses.go b/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_responses.go new file mode 100644 index 0000000000..e027cc480e --- /dev/null +++ b/backend/api/v1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_responses.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package visualization_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/kubeflow/pipelines/backend/api/v1/go_http_client/visualization_model" +) + +// VisualizationServiceCreateVisualizationReader is a Reader for the VisualizationServiceCreateVisualization structure. +type VisualizationServiceCreateVisualizationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *VisualizationServiceCreateVisualizationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewVisualizationServiceCreateVisualizationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewVisualizationServiceCreateVisualizationDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewVisualizationServiceCreateVisualizationOK creates a VisualizationServiceCreateVisualizationOK with default headers values +func NewVisualizationServiceCreateVisualizationOK() *VisualizationServiceCreateVisualizationOK { + return &VisualizationServiceCreateVisualizationOK{} +} + +/* +VisualizationServiceCreateVisualizationOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type VisualizationServiceCreateVisualizationOK struct { + Payload *visualization_model.V1Visualization +} + +// IsSuccess returns true when this visualization service create visualization o k response has a 2xx status code +func (o *VisualizationServiceCreateVisualizationOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this visualization service create visualization o k response has a 3xx status code +func (o *VisualizationServiceCreateVisualizationOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this visualization service create visualization o k response has a 4xx status code +func (o *VisualizationServiceCreateVisualizationOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this visualization service create visualization o k response has a 5xx status code +func (o *VisualizationServiceCreateVisualizationOK) IsServerError() bool { + return false +} + +// IsCode returns true when this visualization service create visualization o k response a status code equal to that given +func (o *VisualizationServiceCreateVisualizationOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the visualization service create visualization o k response +func (o *VisualizationServiceCreateVisualizationOK) Code() int { + return 200 +} + +func (o *VisualizationServiceCreateVisualizationOK) Error() string { + return fmt.Sprintf("[POST /apis/v1/visualizations/{namespace}][%d] visualizationServiceCreateVisualizationOK %+v", 200, o.Payload) +} + +func (o *VisualizationServiceCreateVisualizationOK) String() string { + return fmt.Sprintf("[POST /apis/v1/visualizations/{namespace}][%d] visualizationServiceCreateVisualizationOK %+v", 200, o.Payload) +} + +func (o *VisualizationServiceCreateVisualizationOK) GetPayload() *visualization_model.V1Visualization { + return o.Payload +} + +func (o *VisualizationServiceCreateVisualizationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(visualization_model.V1Visualization) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewVisualizationServiceCreateVisualizationDefault creates a VisualizationServiceCreateVisualizationDefault with default headers values +func NewVisualizationServiceCreateVisualizationDefault(code int) *VisualizationServiceCreateVisualizationDefault { + return &VisualizationServiceCreateVisualizationDefault{ + _statusCode: code, + } +} + +/* +VisualizationServiceCreateVisualizationDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type VisualizationServiceCreateVisualizationDefault struct { + _statusCode int + + Payload *visualization_model.GooglerpcStatus +} + +// IsSuccess returns true when this visualization service create visualization default response has a 2xx status code +func (o *VisualizationServiceCreateVisualizationDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this visualization service create visualization default response has a 3xx status code +func (o *VisualizationServiceCreateVisualizationDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this visualization service create visualization default response has a 4xx status code +func (o *VisualizationServiceCreateVisualizationDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this visualization service create visualization default response has a 5xx status code +func (o *VisualizationServiceCreateVisualizationDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this visualization service create visualization default response a status code equal to that given +func (o *VisualizationServiceCreateVisualizationDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the visualization service create visualization default response +func (o *VisualizationServiceCreateVisualizationDefault) Code() int { + return o._statusCode +} + +func (o *VisualizationServiceCreateVisualizationDefault) Error() string { + return fmt.Sprintf("[POST /apis/v1/visualizations/{namespace}][%d] VisualizationService_CreateVisualization default %+v", o._statusCode, o.Payload) +} + +func (o *VisualizationServiceCreateVisualizationDefault) String() string { + return fmt.Sprintf("[POST /apis/v1/visualizations/{namespace}][%d] VisualizationService_CreateVisualization default %+v", o._statusCode, o.Payload) +} + +func (o *VisualizationServiceCreateVisualizationDefault) GetPayload() *visualization_model.GooglerpcStatus { + return o.Payload +} + +func (o *VisualizationServiceCreateVisualizationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(visualization_model.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/backend/api/v1/go_http_client/visualization_model/googlerpc_status.go b/backend/api/v1/go_http_client/visualization_model/googlerpc_status.go new file mode 100644 index 0000000000..0671a99b5b --- /dev/null +++ b/backend/api/v1/go_http_client/visualization_model/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package visualization_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1/go_http_client/visualization_model/protobuf_any.go b/backend/api/v1/go_http_client/visualization_model/protobuf_any.go index a8f3909206..e599b8d81e 100644 --- a/backend/api/v1/go_http_client/visualization_model/protobuf_any.go +++ b/backend/api/v1/go_http_client/visualization_model/protobuf_any.go @@ -6,9 +6,9 @@ package visualization_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +20,45 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// 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 := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// 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 := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(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 @@ -66,34 +66,34 @@ import ( // 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; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@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" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -124,35 +124,16 @@ type ProtobufAny struct { // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` - - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + AtType string `json:"@type,omitempty"` } // Validate validates this protobuf any func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { - - if swag.IsZero(m.Value) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1/go_http_client/visualization_model/v1_status.go b/backend/api/v1/go_http_client/visualization_model/v1_status.go deleted file mode 100644 index ec6165a938..0000000000 --- a/backend/api/v1/go_http_client/visualization_model/v1_status.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package visualization_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// V1Status v1 status -// swagger:model v1Status -type V1Status struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` -} - -// Validate validates this v1 status -func (m *V1Status) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1Status) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1Status) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1Status) UnmarshalBinary(b []byte) error { - var res V1Status - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1/go_http_client/visualization_model/v1_visualization.go b/backend/api/v1/go_http_client/visualization_model/v1_visualization.go index ba4b6d803f..f936160bbe 100644 --- a/backend/api/v1/go_http_client/visualization_model/v1_visualization.go +++ b/backend/api/v1/go_http_client/visualization_model/v1_visualization.go @@ -6,13 +6,15 @@ package visualization_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V1Visualization v1 visualization +// // swagger:model v1Visualization type V1Visualization struct { @@ -36,7 +38,7 @@ type V1Visualization struct { Source string `json:"source,omitempty"` // type - Type V1VisualizationType `json:"type,omitempty"` + Type *V1VisualizationType `json:"type,omitempty"` } // Validate validates this v1 visualization @@ -54,16 +56,49 @@ func (m *V1Visualization) Validate(formats strfmt.Registry) error { } func (m *V1Visualization) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 visualization based on the context it is used +func (m *V1Visualization) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Visualization) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1/go_http_client/visualization_model/v1_visualization_type.go b/backend/api/v1/go_http_client/visualization_model/v1_visualization_type.go index 53855f3b49..a796021160 100644 --- a/backend/api/v1/go_http_client/visualization_model/v1_visualization_type.go +++ b/backend/api/v1/go_http_client/visualization_model/v1_visualization_type.go @@ -6,20 +6,30 @@ package visualization_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V1VisualizationType Type of visualization to be generated. // This is required when creating the pipeline through CreateVisualization // API. +// // swagger:model v1VisualizationType type V1VisualizationType string +func NewV1VisualizationType(value V1VisualizationType) *V1VisualizationType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1VisualizationType. +func (m V1VisualizationType) Pointer() *V1VisualizationType { + return &m +} + const ( // V1VisualizationTypeROCCURVE captures enum value "ROC_CURVE" @@ -52,7 +62,7 @@ func init() { } func (m V1VisualizationType) validateV1VisualizationTypeEnum(path, location string, value V1VisualizationType) error { - if err := validate.Enum(path, location, value, v1VisualizationTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, v1VisualizationTypeEnum, true); err != nil { return err } return nil @@ -72,3 +82,8 @@ func (m V1VisualizationType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v1 visualization type based on context it is used +func (m V1VisualizationType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1/google/api/annotations.proto b/backend/api/v1/google/api/annotations.proto new file mode 100644 index 0000000000..efdab3db6c --- /dev/null +++ b/backend/api/v1/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/backend/api/v1/google/api/http.proto b/backend/api/v1/google/api/http.proto new file mode 100644 index 0000000000..31d867a27d --- /dev/null +++ b/backend/api/v1/google/api/http.proto @@ -0,0 +1,379 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parameters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// # gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; +// } +// } +// message GetMessageRequest { +// string name = 1; // Mapped to URL path. +// } +// message Message { +// string text = 1; // The resource content. +// } +// +// This enables an HTTP REST to gRPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +// +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +// } +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` +// +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice when +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// This enables the following two alternative HTTP JSON to RPC mappings: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +// "123456")` +// +// ## Rules for HTTP mapping +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They +// are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL +// query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP +// request body, all +// fields are passed via URL path and URL query parameters. +// +// ### Path template syntax +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// ## Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// Example: +// +// http: +// rules: +// # Selects a gRPC method and applies HttpRule to it. +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// ## Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. +message HttpRule { + // Selects a method to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Maps to HTTP GET. Used for listing and getting information about + // resources. + string get = 2; + + // Maps to HTTP PUT. Used for replacing a resource. + string put = 3; + + // Maps to HTTP POST. Used for creating a resource or performing an action. + string post = 4; + + // Maps to HTTP DELETE. Used for deleting a resource. + string delete = 5; + + // Maps to HTTP PATCH. Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/backend/api/v1/healthz.proto b/backend/api/v1/healthz.proto index ca11ca99c4..3b284e5e53 100644 --- a/backend/api/v1/healthz.proto +++ b/backend/api/v1/healthz.proto @@ -19,10 +19,10 @@ package v1; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; import "backend/api/v1/error.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { responses: { key: "default"; value: { @@ -67,5 +67,5 @@ service HealthzService { message GetHealthzResponse { // Returns if KFP in multi-user mode - bool multi_user = 3; + bool multi_user = 3 [json_name = "multi_user"]; } diff --git a/backend/api/v1/job.proto b/backend/api/v1/job.proto index 38f606a444..3c74fd55fe 100644 --- a/backend/api/v1/job.proto +++ b/backend/api/v1/job.proto @@ -22,10 +22,10 @@ import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; import "backend/api/v1/pipeline_spec.proto"; import "backend/api/v1/resource_reference.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; import "backend/api/v1/error.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { responses: { key: "default"; value: { @@ -119,21 +119,21 @@ message ListJobsRequest { // 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. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // 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. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc". // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // What resource reference to filter on. // E.g. If listing job for an experiment, the query string would be // resource_reference_key.type=EXPERIMENT&resource_reference_key.id=123 - ResourceKey resource_reference_key = 4; + ResourceKey resource_reference_key = 4 [json_name = "resource_reference_key"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). @@ -145,10 +145,10 @@ message ListJobsResponse { repeated Job jobs = 1; // The total number of jobs for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; // The token to list the next page of jobs. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; } message DeleteJobRequest { @@ -169,10 +169,10 @@ message DisableJobRequest { // CronSchedule allow scheduling the job with unix-like cron message CronSchedule { // The start time of the cron job - google.protobuf.Timestamp start_time = 1; + google.protobuf.Timestamp start_time = 1 [json_name = "start_time"]; // The end time of the cron job - google.protobuf.Timestamp end_time = 2; + google.protobuf.Timestamp end_time = 2 [json_name = "end_time"]; // The cron string. For details how to compose a cron, visit // ttps://en.wikipedia.org/wiki/Cron @@ -182,20 +182,20 @@ message CronSchedule { // PeriodicSchedule allow scheduling the job periodically with certain interval message PeriodicSchedule { // The start time of the periodic job - google.protobuf.Timestamp start_time = 1; + google.protobuf.Timestamp start_time = 1 [json_name = "start_time"]; // The end time of the periodic job - google.protobuf.Timestamp end_time = 2; + google.protobuf.Timestamp end_time = 2 [json_name = "end_time"]; // The time interval between the starting time of consecutive jobs - int64 interval_second = 3; + int64 interval_second = 3 [json_name = "interval_second"]; } // Trigger defines what starts a pipeline run. message Trigger { oneof trigger { - CronSchedule cron_schedule = 1; - PeriodicSchedule periodic_schedule = 2; + CronSchedule cron_schedule = 1 [json_name = "cron_schedule"]; + PeriodicSchedule periodic_schedule = 2 [json_name = "periodic_schedule"]; } } @@ -212,17 +212,17 @@ message Job { // Required input field. // Describing what the pipeline manifest and parameters to use // for the scheduled job. - PipelineSpec pipeline_spec = 4; + PipelineSpec pipeline_spec = 4 [json_name = "pipeline_spec"]; // Optional input field. Specify which resource this job belongs to. - repeated ResourceReference resource_references = 5; + repeated ResourceReference resource_references = 5 [json_name = "resource_references"]; // Optional input field. Specify which Kubernetes service account this job uses. - string service_account = 18; + string service_account = 18 [json_name = "service_account"]; // Required input field. // Specify how many runs can be executed concurrently. Rage [1-10] - int64 max_concurrency = 6; + int64 max_concurrency = 6 [json_name = "max_concurrency"]; // Required input field. // Specify how a run is triggered. Support cron mode or periodic mode. @@ -238,10 +238,10 @@ message Job { Mode mode = 8; // Output. The time this job is created. - google.protobuf.Timestamp created_at = 9; + google.protobuf.Timestamp created_at = 9 [json_name = "created_at"]; // Output. The last time this job is updated. - google.protobuf.Timestamp updated_at = 10; + google.protobuf.Timestamp updated_at = 10 [json_name = "updated_at"]; // Output. The status of the job. // One of [Enable, Disable, Error] @@ -258,6 +258,6 @@ message Job { // 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. - bool no_catchup = 17; + bool no_catchup = 17 [json_name = "no_catchup"]; } // Next field number of Job will be 19 diff --git a/backend/api/v1/pipeline.proto b/backend/api/v1/pipeline.proto index 6461a8bef8..0715cbc0a7 100644 --- a/backend/api/v1/pipeline.proto +++ b/backend/api/v1/pipeline.proto @@ -23,9 +23,9 @@ import "google/protobuf/empty.proto"; import "backend/api/v1/error.proto"; import "backend/api/v1/parameter.proto"; import "backend/api/v1/resource_reference.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { responses: { key: "default"; value: { @@ -151,7 +151,7 @@ service PipelineService { message Url { // URL of the pipeline definition or the pipeline version definition. - string pipeline_url = 1; + string pipeline_url = 1 [json_name = "pipeline_url"]; } // Create pipeline by providing an URL pointing to the pipeline file, @@ -163,10 +163,10 @@ message CreatePipelineRequest { message UpdatePipelineDefaultVersionRequest { // The ID of the pipeline to be updated. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // The ID of the default version. - string version_id = 2; + string version_id = 2 [json_name = "version_id"]; } message GetPipelineRequest { @@ -178,16 +178,16 @@ message ListPipelinesRequest { // 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. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // 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. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). @@ -196,17 +196,17 @@ message ListPipelinesRequest { // What resource reference to filter on. // For Pipeline, the only valid resource type is Namespace. An sample query string could be // resource_reference_key.type=NAMESPACE&resource_reference_key.id=ns1 - ResourceKey resource_reference_key = 5; + ResourceKey resource_reference_key = 5 [json_name = "resource_reference_key"]; } message ListPipelinesResponse { repeated Pipeline pipelines = 1; // The total number of pipelines for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; // The token to list the next page of pipelines. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; } message DeletePipelineRequest { @@ -227,7 +227,7 @@ message GetTemplateResponse { message GetPipelineVersionTemplateRequest { // The ID of the pipeline version whose template is to be retrieved. - string version_id = 1; + string version_id = 1 [json_name = "version_id"]; } message CreatePipelineVersionRequest { @@ -238,26 +238,26 @@ message CreatePipelineVersionRequest { message GetPipelineVersionRequest { // The ID of the pipeline version to be retrieved. - string version_id = 1; + string version_id = 1 [json_name = "version_id"]; } message ListPipelineVersionsRequest { // ResourceKey specifies the pipeline whose versions are to be listed. - ResourceKey resource_key = 1; + ResourceKey resource_key = 1 [json_name = "resource_key"]; // 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. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // 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. - string page_token = 3; + string page_token = 3 [json_name = "page_token"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - string sort_by = 4; + string sort_by = 4 [json_name = "sort_by"]; // A base-64 encoded, JSON-serialized Filter protocol buffer (see // filter.proto). string filter = 5; @@ -267,15 +267,15 @@ message ListPipelineVersionsResponse { repeated PipelineVersion versions = 1; // The token to list the next page of pipeline versions. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; // The total number of pipeline versions for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; } message DeletePipelineVersionRequest { // The ID of the pipeline version to be deleted. - string version_id = 1; + string version_id = 1 [json_name = "version_id"]; } message Pipeline { @@ -283,7 +283,7 @@ message Pipeline { string id = 1; // Output. The time this pipeline is created. - google.protobuf.Timestamp created_at = 2; + google.protobuf.Timestamp created_at = 2 [json_name = "created_at"]; // Optional input field. Pipeline name provided by user. If not specified, // file name is used as pipeline name. @@ -313,11 +313,11 @@ message Pipeline { // Output only. The default version of the pipeline. As of now, the latest // version is used as default. (In the future, if desired by customers, we // can allow them to set default version.) - PipelineVersion default_version = 8; + PipelineVersion default_version = 8 [json_name = "default_version"]; // Input field. Specify which resource this pipeline belongs to. // For Pipeline, the only valid resource reference is a single Namespace. - repeated ResourceReference resource_references = 9; + repeated ResourceReference resource_references = 9 [json_name = "resource_references"]; } message PipelineVersion { @@ -328,22 +328,22 @@ message PipelineVersion { string name = 2; // Output. The time this pipeline version is created. - google.protobuf.Timestamp created_at = 3; + google.protobuf.Timestamp created_at = 3 [json_name = "created_at"]; // Output. The input parameters for this pipeline. repeated Parameter parameters = 4; // Input. Optional. Pipeline version code source. - string code_source_url = 5; + string code_source_url = 5 [json_name = "code_source_url"]; // Input. Required. Pipeline version package url. // Whe calling CreatePipelineVersion API method, need to provide one package // file location. - Url package_url = 6; + Url package_url = 6 [json_name = "package_url"]; // Input field. Specify which resource this pipeline version belongs to. // For Experiment, the only valid resource reference is a single Namespace. - repeated ResourceReference resource_references = 7; + repeated ResourceReference resource_references = 7 [json_name = "resource_references"]; // Input. Optional. Description for the pipeline version. string description = 8; diff --git a/backend/api/v1/pipeline_spec.proto b/backend/api/v1/pipeline_spec.proto index 359952c261..c81839b30d 100644 --- a/backend/api/v1/pipeline_spec.proto +++ b/backend/api/v1/pipeline_spec.proto @@ -21,18 +21,18 @@ import "backend/api/v1/parameter.proto"; message PipelineSpec { // Optional input field. The ID of the pipeline user uploaded before. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // Optional output field. The name of the pipeline. // Not empty if the pipeline id is not empty. - string pipeline_name = 5; + string pipeline_name = 5 [json_name = "pipeline_name"]; // Optional input field. The marshalled raw argo JSON workflow. // This will be deprecated when pipeline_manifest is in use. - string workflow_manifest = 2; + string workflow_manifest = 2 [json_name = "workflow_manifest"]; // Optional input field. The raw pipeline JSON spec. - string pipeline_manifest = 3; + string pipeline_manifest = 3 [json_name = "pipeline_manifest"]; // The parameter user provide to inject to the pipeline JSON. // If a default value of a parameter exist in the JSON, @@ -49,22 +49,22 @@ message PipelineSpec { // A path in a object store bucket which will be treated as the root // output directory of the pipeline. It is used by the system to // generate the paths of output artifacts. Ref:(https://www.kubeflow.org/docs/components/pipelines/pipeline-root/) - string pipeline_root = 2; + string pipeline_root = 2 [json_name = "pipeline_root"]; } // Runtime config of the pipeline. V2 only - RuntimeConfig runtime_config = 6; + RuntimeConfig runtime_config = 6 [json_name = "runtime_config"]; } // Value is the value of the field. message Value { oneof value { // An integer value - int64 int_value = 1; + int64 int_value = 1 [json_name = "int_value"]; // A double value - double double_value = 2; + double double_value = 2 [json_name = "double_value"]; // A string value - string string_value = 3; + string string_value = 3 [json_name = "string_value"]; } } diff --git a/backend/api/v1/python_http_client/README.md b/backend/api/v1/python_http_client/README.md index c0253d198f..1981e8eaab 100644 --- a/backend/api/v1/python_http_client/README.md +++ b/backend/api/v1/python_http_client/README.md @@ -1,12 +1,12 @@ # kfp-tekton-server-api -This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. +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.5.0 -- Package version: 1.5.0 +- API version: 1.8.0rc7 +- Package version: 1.8.0rc7 - Build package: org.openapitools.codegen.languages.PythonClientCodegen -For more information, please visit [https://github.com/kubeflow/kfp-tekton](https://github.com/kubeflow/kfp-tekton) +For more information, please visit [https://www.google.com](https://www.google.com) ## Requirements. @@ -83,10 +83,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Archives an experiment and the experiment's runs and jobs. - api_response = api_instance.archive_experiment(id) + api_response = api_instance.experiment_service_archive_experiment(id) pprint(api_response) except ApiException as e: - print("Exception when calling ExperimentServiceApi->archive_experiment: %s\n" % e) + print("Exception when calling ExperimentServiceApi->experiment_service_archive_experiment: %s\n" % e) ``` @@ -96,46 +96,48 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*ExperimentServiceApi* | [**archive_experiment**](docs/ExperimentServiceApi.md#archive_experiment) | **POST** /apis/v1/experiments/{id}:archive | Archives an experiment and the experiment's runs and jobs. -*ExperimentServiceApi* | [**create_experiment**](docs/ExperimentServiceApi.md#create_experiment) | **POST** /apis/v1/experiments | Creates a new experiment. -*ExperimentServiceApi* | [**delete_experiment**](docs/ExperimentServiceApi.md#delete_experiment) | **DELETE** /apis/v1/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/v1/experiments/{id} | Finds a specific experiment by ID. -*ExperimentServiceApi* | [**list_experiment**](docs/ExperimentServiceApi.md#list_experiment) | **GET** /apis/v1/experiments | Finds all experiments. Supports pagination, and sorting on certain fields. -*ExperimentServiceApi* | [**unarchive_experiment**](docs/ExperimentServiceApi.md#unarchive_experiment) | **POST** /apis/v1/experiments/{id}:unarchive | Restores an archived experiment. The experiment's archived runs and jobs will stay archived. -*HealthzServiceApi* | [**get_healthz**](docs/HealthzServiceApi.md#get_healthz) | **GET** /apis/v1/healthz | Get healthz data. -*JobServiceApi* | [**create_job**](docs/JobServiceApi.md#create_job) | **POST** /apis/v1/jobs | Creates a new job. -*JobServiceApi* | [**delete_job**](docs/JobServiceApi.md#delete_job) | **DELETE** /apis/v1/jobs/{id} | Deletes a job. -*JobServiceApi* | [**disable_job**](docs/JobServiceApi.md#disable_job) | **POST** /apis/v1/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/v1/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/v1/jobs/{id} | Finds a specific job by ID. -*JobServiceApi* | [**list_jobs**](docs/JobServiceApi.md#list_jobs) | **GET** /apis/v1/jobs | Finds all jobs. -*PipelineServiceApi* | [**create_pipeline**](docs/PipelineServiceApi.md#create_pipeline) | **POST** /apis/v1/pipelines | Creates a pipeline. -*PipelineServiceApi* | [**create_pipeline_version**](docs/PipelineServiceApi.md#create_pipeline_version) | **POST** /apis/v1/pipeline_versions | Adds a pipeline version to the specified pipeline. -*PipelineServiceApi* | [**delete_pipeline**](docs/PipelineServiceApi.md#delete_pipeline) | **DELETE** /apis/v1/pipelines/{id} | Deletes a pipeline and its pipeline versions. -*PipelineServiceApi* | [**delete_pipeline_version**](docs/PipelineServiceApi.md#delete_pipeline_version) | **DELETE** /apis/v1/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/v1/pipelines/{id} | Finds a specific pipeline by ID. -*PipelineServiceApi* | [**get_pipeline_version**](docs/PipelineServiceApi.md#get_pipeline_version) | **GET** /apis/v1/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/v1/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/v1/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/v1/pipeline_versions | Lists all pipeline versions of a given pipeline. -*PipelineServiceApi* | [**list_pipelines**](docs/PipelineServiceApi.md#list_pipelines) | **GET** /apis/v1/pipelines | Finds all pipelines. -*PipelineServiceApi* | [**update_pipeline_default_version**](docs/PipelineServiceApi.md#update_pipeline_default_version) | **POST** /apis/v1/pipelines/{pipeline_id}/default_version/{version_id} | Update the default pipeline version of a specific pipeline. -*PipelineUploadServiceApi* | [**upload_pipeline**](docs/PipelineUploadServiceApi.md#upload_pipeline) | **POST** /apis/v1/pipelines/upload | -*PipelineUploadServiceApi* | [**upload_pipeline_version**](docs/PipelineUploadServiceApi.md#upload_pipeline_version) | **POST** /apis/v1/pipelines/upload_version | -*RunServiceApi* | [**archive_run**](docs/RunServiceApi.md#archive_run) | **POST** /apis/v1/runs/{id}:archive | Archives a run. -*RunServiceApi* | [**create_run**](docs/RunServiceApi.md#create_run) | **POST** /apis/v1/runs | Creates a new run. -*RunServiceApi* | [**delete_run**](docs/RunServiceApi.md#delete_run) | **DELETE** /apis/v1/runs/{id} | Deletes a run. -*RunServiceApi* | [**get_run**](docs/RunServiceApi.md#get_run) | **GET** /apis/v1/runs/{run_id} | Finds a specific run by ID. -*RunServiceApi* | [**list_runs**](docs/RunServiceApi.md#list_runs) | **GET** /apis/v1/runs | Finds all runs. -*RunServiceApi* | [**read_artifact**](docs/RunServiceApi.md#read_artifact) | **GET** /apis/v1/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/v1/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/v1/runs/{run_id}/retry | Re-initiates a failed or terminated run. -*RunServiceApi* | [**terminate_run**](docs/RunServiceApi.md#terminate_run) | **POST** /apis/v1/runs/{run_id}/terminate | Terminates an active run. -*RunServiceApi* | [**unarchive_run**](docs/RunServiceApi.md#unarchive_run) | **POST** /apis/v1/runs/{id}:unarchive | Restores an archived run. +*ExperimentServiceApi* | [**experiment_service_archive_experiment**](docs/ExperimentServiceApi.md#experiment_service_archive_experiment) | **POST** /apis/v1/experiments/{id}:archive | Archives an experiment and the experiment's runs and jobs. +*ExperimentServiceApi* | [**experiment_service_create_experiment**](docs/ExperimentServiceApi.md#experiment_service_create_experiment) | **POST** /apis/v1/experiments | Creates a new experiment. +*ExperimentServiceApi* | [**experiment_service_delete_experiment**](docs/ExperimentServiceApi.md#experiment_service_delete_experiment) | **DELETE** /apis/v1/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* | [**experiment_service_get_experiment**](docs/ExperimentServiceApi.md#experiment_service_get_experiment) | **GET** /apis/v1/experiments/{id} | Finds a specific experiment by ID. +*ExperimentServiceApi* | [**experiment_service_list_experiment**](docs/ExperimentServiceApi.md#experiment_service_list_experiment) | **GET** /apis/v1/experiments | Finds all experiments. Supports pagination, and sorting on certain fields. +*ExperimentServiceApi* | [**experiment_service_unarchive_experiment**](docs/ExperimentServiceApi.md#experiment_service_unarchive_experiment) | **POST** /apis/v1/experiments/{id}:unarchive | Restores an archived experiment. The experiment's archived runs and jobs will stay archived. +*HealthzServiceApi* | [**healthz_service_get_healthz**](docs/HealthzServiceApi.md#healthz_service_get_healthz) | **GET** /apis/v1/healthz | Get healthz data. +*JobServiceApi* | [**job_service_create_job**](docs/JobServiceApi.md#job_service_create_job) | **POST** /apis/v1/jobs | Creates a new job. +*JobServiceApi* | [**job_service_delete_job**](docs/JobServiceApi.md#job_service_delete_job) | **DELETE** /apis/v1/jobs/{id} | Deletes a job. +*JobServiceApi* | [**job_service_disable_job**](docs/JobServiceApi.md#job_service_disable_job) | **POST** /apis/v1/jobs/{id}/disable | Stops a job and all its associated runs. The job is not deleted. +*JobServiceApi* | [**job_service_enable_job**](docs/JobServiceApi.md#job_service_enable_job) | **POST** /apis/v1/jobs/{id}/enable | Restarts a job that was previously stopped. All runs associated with the job will continue. +*JobServiceApi* | [**job_service_get_job**](docs/JobServiceApi.md#job_service_get_job) | **GET** /apis/v1/jobs/{id} | Finds a specific job by ID. +*JobServiceApi* | [**job_service_list_jobs**](docs/JobServiceApi.md#job_service_list_jobs) | **GET** /apis/v1/jobs | Finds all jobs. +*PipelineServiceApi* | [**pipeline_service_create_pipeline**](docs/PipelineServiceApi.md#pipeline_service_create_pipeline) | **POST** /apis/v1/pipelines | Creates a pipeline. +*PipelineServiceApi* | [**pipeline_service_create_pipeline_version**](docs/PipelineServiceApi.md#pipeline_service_create_pipeline_version) | **POST** /apis/v1/pipeline_versions | Adds a pipeline version to the specified pipeline. +*PipelineServiceApi* | [**pipeline_service_delete_pipeline**](docs/PipelineServiceApi.md#pipeline_service_delete_pipeline) | **DELETE** /apis/v1/pipelines/{id} | Deletes a pipeline and its pipeline versions. +*PipelineServiceApi* | [**pipeline_service_delete_pipeline_version**](docs/PipelineServiceApi.md#pipeline_service_delete_pipeline_version) | **DELETE** /apis/v1/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* | [**pipeline_service_get_pipeline**](docs/PipelineServiceApi.md#pipeline_service_get_pipeline) | **GET** /apis/v1/pipelines/{id} | Finds a specific pipeline by ID. +*PipelineServiceApi* | [**pipeline_service_get_pipeline_version**](docs/PipelineServiceApi.md#pipeline_service_get_pipeline_version) | **GET** /apis/v1/pipeline_versions/{version_id} | Gets a pipeline version by pipeline version ID. +*PipelineServiceApi* | [**pipeline_service_get_pipeline_version_template**](docs/PipelineServiceApi.md#pipeline_service_get_pipeline_version_template) | **GET** /apis/v1/pipeline_versions/{version_id}/templates | Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. +*PipelineServiceApi* | [**pipeline_service_get_template**](docs/PipelineServiceApi.md#pipeline_service_get_template) | **GET** /apis/v1/pipelines/{id}/templates | Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. +*PipelineServiceApi* | [**pipeline_service_list_pipeline_versions**](docs/PipelineServiceApi.md#pipeline_service_list_pipeline_versions) | **GET** /apis/v1/pipeline_versions | Lists all pipeline versions of a given pipeline. +*PipelineServiceApi* | [**pipeline_service_list_pipelines**](docs/PipelineServiceApi.md#pipeline_service_list_pipelines) | **GET** /apis/v1/pipelines | Finds all pipelines. +*PipelineServiceApi* | [**pipeline_service_update_pipeline_default_version**](docs/PipelineServiceApi.md#pipeline_service_update_pipeline_default_version) | **POST** /apis/v1/pipelines/{pipeline_id}/default_version/{version_id} | Update the default pipeline version of a specific pipeline. +*PipelineUploadServiceApi* | [**pipeline_service_upload_pipeline**](docs/PipelineUploadServiceApi.md#pipeline_service_upload_pipeline) | **POST** /apis/v1/pipelines/upload | +*PipelineUploadServiceApi* | [**pipeline_service_upload_pipeline_version**](docs/PipelineUploadServiceApi.md#pipeline_service_upload_pipeline_version) | **POST** /apis/v1/pipelines/upload_version | +*RunServiceApi* | [**run_service_archive_run**](docs/RunServiceApi.md#run_service_archive_run) | **POST** /apis/v1/runs/{id}:archive | Archives a run. +*RunServiceApi* | [**run_service_create_run**](docs/RunServiceApi.md#run_service_create_run) | **POST** /apis/v1/runs | Creates a new run. +*RunServiceApi* | [**run_service_delete_run**](docs/RunServiceApi.md#run_service_delete_run) | **DELETE** /apis/v1/runs/{id} | Deletes a run. +*RunServiceApi* | [**run_service_get_run**](docs/RunServiceApi.md#run_service_get_run) | **GET** /apis/v1/runs/{run_id} | Finds a specific run by ID. +*RunServiceApi* | [**run_service_list_runs**](docs/RunServiceApi.md#run_service_list_runs) | **GET** /apis/v1/runs | Finds all runs. +*RunServiceApi* | [**run_service_read_artifact**](docs/RunServiceApi.md#run_service_read_artifact) | **GET** /apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read | Finds a run's artifact data. +*RunServiceApi* | [**run_service_report_run_metrics**](docs/RunServiceApi.md#run_service_report_run_metrics) | **POST** /apis/v1/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* | [**run_service_retry_run**](docs/RunServiceApi.md#run_service_retry_run) | **POST** /apis/v1/runs/{run_id}/retry | Re-initiates a failed or terminated run. +*RunServiceApi* | [**run_service_terminate_run**](docs/RunServiceApi.md#run_service_terminate_run) | **POST** /apis/v1/runs/{run_id}/terminate | Terminates an active run. +*RunServiceApi* | [**run_service_unarchive_run**](docs/RunServiceApi.md#run_service_unarchive_run) | **POST** /apis/v1/runs/{id}:unarchive | Restores an archived run. ## Documentation For Models + - [GooglerpcStatus](docs/GooglerpcStatus.md) + - [InlineObject](docs/InlineObject.md) - [JobMode](docs/JobMode.md) - [PipelineSpecRuntimeConfig](docs/PipelineSpecRuntimeConfig.md) - [ProtobufAny](docs/ProtobufAny.md) @@ -161,7 +163,6 @@ Class | Method | HTTP request | Description - [V1PipelineVersion](docs/V1PipelineVersion.md) - [V1ReadArtifactResponse](docs/V1ReadArtifactResponse.md) - [V1Relationship](docs/V1Relationship.md) - - [V1ReportRunMetricsRequest](docs/V1ReportRunMetricsRequest.md) - [V1ReportRunMetricsResponse](docs/V1ReportRunMetricsResponse.md) - [V1ResourceKey](docs/V1ResourceKey.md) - [V1ResourceReference](docs/V1ResourceReference.md) @@ -170,7 +171,6 @@ Class | Method | HTTP request | Description - [V1RunDetail](docs/V1RunDetail.md) - [V1RunMetric](docs/V1RunMetric.md) - [V1RunStorageState](docs/V1RunStorageState.md) - - [V1Status](docs/V1Status.md) - [V1Trigger](docs/V1Trigger.md) - [V1Url](docs/V1Url.md) - [V1Value](docs/V1Value.md) @@ -188,6 +188,6 @@ Class | Method | HTTP request | Description ## Author -prashsh1@in.ibm.com +kubeflow-pipelines@google.com diff --git a/backend/api/v1/python_http_client/docs/ExperimentServiceApi.md b/backend/api/v1/python_http_client/docs/ExperimentServiceApi.md index 46d12656ab..994349729d 100644 --- a/backend/api/v1/python_http_client/docs/ExperimentServiceApi.md +++ b/backend/api/v1/python_http_client/docs/ExperimentServiceApi.md @@ -4,16 +4,16 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**archive_experiment**](ExperimentServiceApi.md#archive_experiment) | **POST** /apis/v1/experiments/{id}:archive | Archives an experiment and the experiment's runs and jobs. -[**create_experiment**](ExperimentServiceApi.md#create_experiment) | **POST** /apis/v1/experiments | Creates a new experiment. -[**delete_experiment**](ExperimentServiceApi.md#delete_experiment) | **DELETE** /apis/v1/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/v1/experiments/{id} | Finds a specific experiment by ID. -[**list_experiment**](ExperimentServiceApi.md#list_experiment) | **GET** /apis/v1/experiments | Finds all experiments. Supports pagination, and sorting on certain fields. -[**unarchive_experiment**](ExperimentServiceApi.md#unarchive_experiment) | **POST** /apis/v1/experiments/{id}:unarchive | Restores an archived experiment. The experiment's archived runs and jobs will stay archived. +[**experiment_service_archive_experiment**](ExperimentServiceApi.md#experiment_service_archive_experiment) | **POST** /apis/v1/experiments/{id}:archive | Archives an experiment and the experiment's runs and jobs. +[**experiment_service_create_experiment**](ExperimentServiceApi.md#experiment_service_create_experiment) | **POST** /apis/v1/experiments | Creates a new experiment. +[**experiment_service_delete_experiment**](ExperimentServiceApi.md#experiment_service_delete_experiment) | **DELETE** /apis/v1/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. +[**experiment_service_get_experiment**](ExperimentServiceApi.md#experiment_service_get_experiment) | **GET** /apis/v1/experiments/{id} | Finds a specific experiment by ID. +[**experiment_service_list_experiment**](ExperimentServiceApi.md#experiment_service_list_experiment) | **GET** /apis/v1/experiments | Finds all experiments. Supports pagination, and sorting on certain fields. +[**experiment_service_unarchive_experiment**](ExperimentServiceApi.md#experiment_service_unarchive_experiment) | **POST** /apis/v1/experiments/{id}:unarchive | Restores an archived experiment. The experiment's archived runs and jobs will stay archived. -# **archive_experiment** -> object archive_experiment(id) +# **experiment_service_archive_experiment** +> object experiment_service_archive_experiment(id) Archives an experiment and the experiment's runs and jobs. @@ -55,10 +55,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Archives an experiment and the experiment's runs and jobs. - api_response = api_instance.archive_experiment(id) + api_response = api_instance.experiment_service_archive_experiment(id) pprint(api_response) except ApiException as e: - print("Exception when calling ExperimentServiceApi->archive_experiment: %s\n" % e) + print("Exception when calling ExperimentServiceApi->experiment_service_archive_experiment: %s\n" % e) ``` ### Parameters @@ -84,12 +84,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1Experiment create_experiment(body) +# **experiment_service_create_experiment** +> V1Experiment experiment_service_create_experiment(experiment) Creates a new experiment. @@ -127,21 +127,21 @@ configuration = kfp_tekton_server_api.Configuration( with kfp_tekton_server_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = kfp_tekton_server_api.ExperimentServiceApi(api_client) - body = kfp_tekton_server_api.V1Experiment() # V1Experiment | The experiment to be created. + experiment = kfp_tekton_server_api.V1Experiment() # V1Experiment | The experiment to be created. try: # Creates a new experiment. - api_response = api_instance.create_experiment(body) + api_response = api_instance.experiment_service_create_experiment(experiment) pprint(api_response) except ApiException as e: - print("Exception when calling ExperimentServiceApi->create_experiment: %s\n" % e) + print("Exception when calling ExperimentServiceApi->experiment_service_create_experiment: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**V1Experiment**](V1Experiment.md)| The experiment to be created. | + **experiment** | [**V1Experiment**](V1Experiment.md)| The experiment to be created. | ### Return type @@ -160,12 +160,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **experiment_service_delete_experiment** +> object experiment_service_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. @@ -207,10 +207,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: 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) + api_response = api_instance.experiment_service_delete_experiment(id) pprint(api_response) except ApiException as e: - print("Exception when calling ExperimentServiceApi->delete_experiment: %s\n" % e) + print("Exception when calling ExperimentServiceApi->experiment_service_delete_experiment: %s\n" % e) ``` ### Parameters @@ -236,12 +236,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1Experiment get_experiment(id) +# **experiment_service_get_experiment** +> V1Experiment experiment_service_get_experiment(id) Finds a specific experiment by ID. @@ -283,10 +283,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Finds a specific experiment by ID. - api_response = api_instance.get_experiment(id) + api_response = api_instance.experiment_service_get_experiment(id) pprint(api_response) except ApiException as e: - print("Exception when calling ExperimentServiceApi->get_experiment: %s\n" % e) + print("Exception when calling ExperimentServiceApi->experiment_service_get_experiment: %s\n" % e) ``` ### Parameters @@ -312,12 +312,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1ListExperimentsResponse 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) +# **experiment_service_list_experiment** +> V1ListExperimentsResponse experiment_service_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. @@ -364,10 +364,10 @@ resource_reference_key_id = 'resource_reference_key_id_example' # str | The ID o 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) + api_response = api_instance.experiment_service_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) + print("Exception when calling ExperimentServiceApi->experiment_service_list_experiment: %s\n" % e) ``` ### Parameters @@ -398,12 +398,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **experiment_service_unarchive_experiment** +> object experiment_service_unarchive_experiment(id) Restores an archived experiment. The experiment's archived runs and jobs will stay archived. @@ -445,10 +445,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Restores an archived experiment. The experiment's archived runs and jobs will stay archived. - api_response = api_instance.unarchive_experiment(id) + api_response = api_instance.experiment_service_unarchive_experiment(id) pprint(api_response) except ApiException as e: - print("Exception when calling ExperimentServiceApi->unarchive_experiment: %s\n" % e) + print("Exception when calling ExperimentServiceApi->experiment_service_unarchive_experiment: %s\n" % e) ``` ### Parameters @@ -474,7 +474,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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/v1/python_http_client/docs/V1Status.md b/backend/api/v1/python_http_client/docs/GooglerpcStatus.md similarity index 87% rename from backend/api/v1/python_http_client/docs/V1Status.md rename to backend/api/v1/python_http_client/docs/GooglerpcStatus.md index 27dfc148e1..257d91b44a 100644 --- a/backend/api/v1/python_http_client/docs/V1Status.md +++ b/backend/api/v1/python_http_client/docs/GooglerpcStatus.md @@ -1,10 +1,10 @@ -# V1Status +# GooglerpcStatus ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | **str** | | [optional] **code** | **int** | | [optional] +**message** | **str** | | [optional] **details** | [**list[ProtobufAny]**](ProtobufAny.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/backend/api/v1/python_http_client/docs/HealthzServiceApi.md b/backend/api/v1/python_http_client/docs/HealthzServiceApi.md index 31b689a465..dfe6cfba14 100644 --- a/backend/api/v1/python_http_client/docs/HealthzServiceApi.md +++ b/backend/api/v1/python_http_client/docs/HealthzServiceApi.md @@ -4,11 +4,11 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_healthz**](HealthzServiceApi.md#get_healthz) | **GET** /apis/v1/healthz | Get healthz data. +[**healthz_service_get_healthz**](HealthzServiceApi.md#healthz_service_get_healthz) | **GET** /apis/v1/healthz | Get healthz data. -# **get_healthz** -> V1GetHealthzResponse get_healthz() +# **healthz_service_get_healthz** +> V1GetHealthzResponse healthz_service_get_healthz() Get healthz data. @@ -49,10 +49,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Get healthz data. - api_response = api_instance.get_healthz() + api_response = api_instance.healthz_service_get_healthz() pprint(api_response) except ApiException as e: - print("Exception when calling HealthzServiceApi->get_healthz: %s\n" % e) + print("Exception when calling HealthzServiceApi->healthz_service_get_healthz: %s\n" % e) ``` ### Parameters @@ -75,7 +75,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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/v1/python_http_client/docs/V1ReportRunMetricsRequest.md b/backend/api/v1/python_http_client/docs/InlineObject.md similarity index 77% rename from backend/api/v1/python_http_client/docs/V1ReportRunMetricsRequest.md rename to backend/api/v1/python_http_client/docs/InlineObject.md index 50afacdfed..1b2f43603e 100644 --- a/backend/api/v1/python_http_client/docs/V1ReportRunMetricsRequest.md +++ b/backend/api/v1/python_http_client/docs/InlineObject.md @@ -1,9 +1,8 @@ -# V1ReportRunMetricsRequest +# InlineObject ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**run_id** | **str** | Required. The parent run ID of the metric. | [optional] **metrics** | [**list[V1RunMetric]**](V1RunMetric.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/v1/python_http_client/docs/JobServiceApi.md b/backend/api/v1/python_http_client/docs/JobServiceApi.md index ed9f687473..3478e4ed75 100644 --- a/backend/api/v1/python_http_client/docs/JobServiceApi.md +++ b/backend/api/v1/python_http_client/docs/JobServiceApi.md @@ -4,16 +4,16 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_job**](JobServiceApi.md#create_job) | **POST** /apis/v1/jobs | Creates a new job. -[**delete_job**](JobServiceApi.md#delete_job) | **DELETE** /apis/v1/jobs/{id} | Deletes a job. -[**disable_job**](JobServiceApi.md#disable_job) | **POST** /apis/v1/jobs/{id}/disable | Stops a job and all its associated runs. The job is not deleted. -[**enable_job**](JobServiceApi.md#enable_job) | **POST** /apis/v1/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/v1/jobs/{id} | Finds a specific job by ID. -[**list_jobs**](JobServiceApi.md#list_jobs) | **GET** /apis/v1/jobs | Finds all jobs. +[**job_service_create_job**](JobServiceApi.md#job_service_create_job) | **POST** /apis/v1/jobs | Creates a new job. +[**job_service_delete_job**](JobServiceApi.md#job_service_delete_job) | **DELETE** /apis/v1/jobs/{id} | Deletes a job. +[**job_service_disable_job**](JobServiceApi.md#job_service_disable_job) | **POST** /apis/v1/jobs/{id}/disable | Stops a job and all its associated runs. The job is not deleted. +[**job_service_enable_job**](JobServiceApi.md#job_service_enable_job) | **POST** /apis/v1/jobs/{id}/enable | Restarts a job that was previously stopped. All runs associated with the job will continue. +[**job_service_get_job**](JobServiceApi.md#job_service_get_job) | **GET** /apis/v1/jobs/{id} | Finds a specific job by ID. +[**job_service_list_jobs**](JobServiceApi.md#job_service_list_jobs) | **GET** /apis/v1/jobs | Finds all jobs. -# **create_job** -> V1Job create_job(body) +# **job_service_create_job** +> V1Job job_service_create_job(job) Creates a new job. @@ -51,21 +51,21 @@ configuration = kfp_tekton_server_api.Configuration( with kfp_tekton_server_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = kfp_tekton_server_api.JobServiceApi(api_client) - body = kfp_tekton_server_api.V1Job() # V1Job | The job to be created + job = kfp_tekton_server_api.V1Job() # V1Job | The job to be created try: # Creates a new job. - api_response = api_instance.create_job(body) + api_response = api_instance.job_service_create_job(job) pprint(api_response) except ApiException as e: - print("Exception when calling JobServiceApi->create_job: %s\n" % e) + print("Exception when calling JobServiceApi->job_service_create_job: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**V1Job**](V1Job.md)| The job to be created | + **job** | [**V1Job**](V1Job.md)| The job to be created | ### Return type @@ -84,12 +84,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **job_service_delete_job** +> object job_service_delete_job(id) Deletes a job. @@ -131,10 +131,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Deletes a job. - api_response = api_instance.delete_job(id) + api_response = api_instance.job_service_delete_job(id) pprint(api_response) except ApiException as e: - print("Exception when calling JobServiceApi->delete_job: %s\n" % e) + print("Exception when calling JobServiceApi->job_service_delete_job: %s\n" % e) ``` ### Parameters @@ -160,12 +160,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **job_service_disable_job** +> object job_service_disable_job(id) Stops a job and all its associated runs. The job is not deleted. @@ -207,10 +207,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Stops a job and all its associated runs. The job is not deleted. - api_response = api_instance.disable_job(id) + api_response = api_instance.job_service_disable_job(id) pprint(api_response) except ApiException as e: - print("Exception when calling JobServiceApi->disable_job: %s\n" % e) + print("Exception when calling JobServiceApi->job_service_disable_job: %s\n" % e) ``` ### Parameters @@ -236,12 +236,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **job_service_enable_job** +> object job_service_enable_job(id) Restarts a job that was previously stopped. All runs associated with the job will continue. @@ -283,10 +283,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Restarts a job that was previously stopped. All runs associated with the job will continue. - api_response = api_instance.enable_job(id) + api_response = api_instance.job_service_enable_job(id) pprint(api_response) except ApiException as e: - print("Exception when calling JobServiceApi->enable_job: %s\n" % e) + print("Exception when calling JobServiceApi->job_service_enable_job: %s\n" % e) ``` ### Parameters @@ -312,12 +312,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1Job get_job(id) +# **job_service_get_job** +> V1Job job_service_get_job(id) Finds a specific job by ID. @@ -359,10 +359,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Finds a specific job by ID. - api_response = api_instance.get_job(id) + api_response = api_instance.job_service_get_job(id) pprint(api_response) except ApiException as e: - print("Exception when calling JobServiceApi->get_job: %s\n" % e) + print("Exception when calling JobServiceApi->job_service_get_job: %s\n" % e) ``` ### Parameters @@ -388,12 +388,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1ListJobsResponse 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) +# **job_service_list_jobs** +> V1ListJobsResponse job_service_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. @@ -440,10 +440,10 @@ filter = 'filter_example' # str | A url-encoded, JSON-serialized Filter protocol 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) + api_response = api_instance.job_service_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) + print("Exception when calling JobServiceApi->job_service_list_jobs: %s\n" % e) ``` ### Parameters @@ -474,7 +474,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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/v1/python_http_client/docs/PipelineServiceApi.md b/backend/api/v1/python_http_client/docs/PipelineServiceApi.md index bf877799c3..e4314ab36a 100644 --- a/backend/api/v1/python_http_client/docs/PipelineServiceApi.md +++ b/backend/api/v1/python_http_client/docs/PipelineServiceApi.md @@ -4,21 +4,21 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_pipeline**](PipelineServiceApi.md#create_pipeline) | **POST** /apis/v1/pipelines | Creates a pipeline. -[**create_pipeline_version**](PipelineServiceApi.md#create_pipeline_version) | **POST** /apis/v1/pipeline_versions | Adds a pipeline version to the specified pipeline. -[**delete_pipeline**](PipelineServiceApi.md#delete_pipeline) | **DELETE** /apis/v1/pipelines/{id} | Deletes a pipeline and its pipeline versions. -[**delete_pipeline_version**](PipelineServiceApi.md#delete_pipeline_version) | **DELETE** /apis/v1/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/v1/pipelines/{id} | Finds a specific pipeline by ID. -[**get_pipeline_version**](PipelineServiceApi.md#get_pipeline_version) | **GET** /apis/v1/pipeline_versions/{version_id} | Gets a pipeline version by pipeline version ID. -[**get_pipeline_version_template**](PipelineServiceApi.md#get_pipeline_version_template) | **GET** /apis/v1/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/v1/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/v1/pipeline_versions | Lists all pipeline versions of a given pipeline. -[**list_pipelines**](PipelineServiceApi.md#list_pipelines) | **GET** /apis/v1/pipelines | Finds all pipelines. -[**update_pipeline_default_version**](PipelineServiceApi.md#update_pipeline_default_version) | **POST** /apis/v1/pipelines/{pipeline_id}/default_version/{version_id} | Update the default pipeline version of a specific pipeline. - - -# **create_pipeline** -> V1Pipeline create_pipeline(body) +[**pipeline_service_create_pipeline**](PipelineServiceApi.md#pipeline_service_create_pipeline) | **POST** /apis/v1/pipelines | Creates a pipeline. +[**pipeline_service_create_pipeline_version**](PipelineServiceApi.md#pipeline_service_create_pipeline_version) | **POST** /apis/v1/pipeline_versions | Adds a pipeline version to the specified pipeline. +[**pipeline_service_delete_pipeline**](PipelineServiceApi.md#pipeline_service_delete_pipeline) | **DELETE** /apis/v1/pipelines/{id} | Deletes a pipeline and its pipeline versions. +[**pipeline_service_delete_pipeline_version**](PipelineServiceApi.md#pipeline_service_delete_pipeline_version) | **DELETE** /apis/v1/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). +[**pipeline_service_get_pipeline**](PipelineServiceApi.md#pipeline_service_get_pipeline) | **GET** /apis/v1/pipelines/{id} | Finds a specific pipeline by ID. +[**pipeline_service_get_pipeline_version**](PipelineServiceApi.md#pipeline_service_get_pipeline_version) | **GET** /apis/v1/pipeline_versions/{version_id} | Gets a pipeline version by pipeline version ID. +[**pipeline_service_get_pipeline_version_template**](PipelineServiceApi.md#pipeline_service_get_pipeline_version_template) | **GET** /apis/v1/pipeline_versions/{version_id}/templates | Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. +[**pipeline_service_get_template**](PipelineServiceApi.md#pipeline_service_get_template) | **GET** /apis/v1/pipelines/{id}/templates | Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. +[**pipeline_service_list_pipeline_versions**](PipelineServiceApi.md#pipeline_service_list_pipeline_versions) | **GET** /apis/v1/pipeline_versions | Lists all pipeline versions of a given pipeline. +[**pipeline_service_list_pipelines**](PipelineServiceApi.md#pipeline_service_list_pipelines) | **GET** /apis/v1/pipelines | Finds all pipelines. +[**pipeline_service_update_pipeline_default_version**](PipelineServiceApi.md#pipeline_service_update_pipeline_default_version) | **POST** /apis/v1/pipelines/{pipeline_id}/default_version/{version_id} | Update the default pipeline version of a specific pipeline. + + +# **pipeline_service_create_pipeline** +> V1Pipeline pipeline_service_create_pipeline(pipeline) Creates a pipeline. @@ -56,21 +56,21 @@ configuration = kfp_tekton_server_api.Configuration( with kfp_tekton_server_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = kfp_tekton_server_api.PipelineServiceApi(api_client) - body = kfp_tekton_server_api.V1Pipeline() # V1Pipeline | + pipeline = kfp_tekton_server_api.V1Pipeline() # V1Pipeline | try: # Creates a pipeline. - api_response = api_instance.create_pipeline(body) + api_response = api_instance.pipeline_service_create_pipeline(pipeline) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineServiceApi->create_pipeline: %s\n" % e) + print("Exception when calling PipelineServiceApi->pipeline_service_create_pipeline: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**V1Pipeline**](V1Pipeline.md)| | + **pipeline** | [**V1Pipeline**](V1Pipeline.md)| | ### Return type @@ -89,12 +89,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1PipelineVersion create_pipeline_version(body) +# **pipeline_service_create_pipeline_version** +> V1PipelineVersion pipeline_service_create_pipeline_version(version) Adds a pipeline version to the specified pipeline. @@ -132,21 +132,21 @@ configuration = kfp_tekton_server_api.Configuration( with kfp_tekton_server_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = kfp_tekton_server_api.PipelineServiceApi(api_client) - body = kfp_tekton_server_api.V1PipelineVersion() # V1PipelineVersion | ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. + version = kfp_tekton_server_api.V1PipelineVersion() # V1PipelineVersion | 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) + api_response = api_instance.pipeline_service_create_pipeline_version(version) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineServiceApi->create_pipeline_version: %s\n" % e) + print("Exception when calling PipelineServiceApi->pipeline_service_create_pipeline_version: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**V1PipelineVersion**](V1PipelineVersion.md)| ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. | + **version** | [**V1PipelineVersion**](V1PipelineVersion.md)| ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. | ### Return type @@ -165,12 +165,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **pipeline_service_delete_pipeline** +> object pipeline_service_delete_pipeline(id) Deletes a pipeline and its pipeline versions. @@ -212,10 +212,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Deletes a pipeline and its pipeline versions. - api_response = api_instance.delete_pipeline(id) + api_response = api_instance.pipeline_service_delete_pipeline(id) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineServiceApi->delete_pipeline: %s\n" % e) + print("Exception when calling PipelineServiceApi->pipeline_service_delete_pipeline: %s\n" % e) ``` ### Parameters @@ -241,12 +241,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **pipeline_service_delete_pipeline_version** +> object pipeline_service_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). @@ -288,10 +288,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: 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) + api_response = api_instance.pipeline_service_delete_pipeline_version(version_id) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineServiceApi->delete_pipeline_version: %s\n" % e) + print("Exception when calling PipelineServiceApi->pipeline_service_delete_pipeline_version: %s\n" % e) ``` ### Parameters @@ -317,12 +317,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1Pipeline get_pipeline(id) +# **pipeline_service_get_pipeline** +> V1Pipeline pipeline_service_get_pipeline(id) Finds a specific pipeline by ID. @@ -364,10 +364,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Finds a specific pipeline by ID. - api_response = api_instance.get_pipeline(id) + api_response = api_instance.pipeline_service_get_pipeline(id) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineServiceApi->get_pipeline: %s\n" % e) + print("Exception when calling PipelineServiceApi->pipeline_service_get_pipeline: %s\n" % e) ``` ### Parameters @@ -393,12 +393,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1PipelineVersion get_pipeline_version(version_id) +# **pipeline_service_get_pipeline_version** +> V1PipelineVersion pipeline_service_get_pipeline_version(version_id) Gets a pipeline version by pipeline version ID. @@ -440,10 +440,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Gets a pipeline version by pipeline version ID. - api_response = api_instance.get_pipeline_version(version_id) + api_response = api_instance.pipeline_service_get_pipeline_version(version_id) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineServiceApi->get_pipeline_version: %s\n" % e) + print("Exception when calling PipelineServiceApi->pipeline_service_get_pipeline_version: %s\n" % e) ``` ### Parameters @@ -469,12 +469,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1GetTemplateResponse get_pipeline_version_template(version_id) +# **pipeline_service_get_pipeline_version_template** +> V1GetTemplateResponse pipeline_service_get_pipeline_version_template(version_id) Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. @@ -516,10 +516,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: 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) + api_response = api_instance.pipeline_service_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) + print("Exception when calling PipelineServiceApi->pipeline_service_get_pipeline_version_template: %s\n" % e) ``` ### Parameters @@ -545,12 +545,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1GetTemplateResponse get_template(id) +# **pipeline_service_get_template** +> V1GetTemplateResponse pipeline_service_get_template(id) Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. @@ -592,10 +592,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: 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) + api_response = api_instance.pipeline_service_get_template(id) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineServiceApi->get_template: %s\n" % e) + print("Exception when calling PipelineServiceApi->pipeline_service_get_template: %s\n" % e) ``` ### Parameters @@ -621,12 +621,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1ListPipelineVersionsResponse 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) +# **pipeline_service_list_pipeline_versions** +> V1ListPipelineVersionsResponse pipeline_service_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. @@ -673,10 +673,10 @@ filter = 'filter_example' # str | A base-64 encoded, JSON-serialized Filter prot 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) + api_response = api_instance.pipeline_service_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) + print("Exception when calling PipelineServiceApi->pipeline_service_list_pipeline_versions: %s\n" % e) ``` ### Parameters @@ -707,12 +707,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1ListPipelinesResponse list_pipelines(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) +# **pipeline_service_list_pipelines** +> V1ListPipelinesResponse pipeline_service_list_pipelines(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 pipelines. @@ -759,10 +759,10 @@ resource_reference_key_id = 'resource_reference_key_id_example' # str | The ID o try: # Finds all pipelines. - api_response = api_instance.list_pipelines(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) + api_response = api_instance.pipeline_service_list_pipelines(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 PipelineServiceApi->list_pipelines: %s\n" % e) + print("Exception when calling PipelineServiceApi->pipeline_service_list_pipelines: %s\n" % e) ``` ### Parameters @@ -793,12 +793,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) -# **update_pipeline_default_version** -> object update_pipeline_default_version(pipeline_id, version_id) +# **pipeline_service_update_pipeline_default_version** +> object pipeline_service_update_pipeline_default_version(pipeline_id, version_id) Update the default pipeline version of a specific pipeline. @@ -841,10 +841,10 @@ version_id = 'version_id_example' # str | The ID of the default version. try: # Update the default pipeline version of a specific pipeline. - api_response = api_instance.update_pipeline_default_version(pipeline_id, version_id) + api_response = api_instance.pipeline_service_update_pipeline_default_version(pipeline_id, version_id) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineServiceApi->update_pipeline_default_version: %s\n" % e) + print("Exception when calling PipelineServiceApi->pipeline_service_update_pipeline_default_version: %s\n" % e) ``` ### Parameters @@ -871,7 +871,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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/v1/python_http_client/docs/PipelineUploadServiceApi.md b/backend/api/v1/python_http_client/docs/PipelineUploadServiceApi.md index 6086af8bd8..0fd9c4210e 100644 --- a/backend/api/v1/python_http_client/docs/PipelineUploadServiceApi.md +++ b/backend/api/v1/python_http_client/docs/PipelineUploadServiceApi.md @@ -4,12 +4,12 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**upload_pipeline**](PipelineUploadServiceApi.md#upload_pipeline) | **POST** /apis/v1/pipelines/upload | -[**upload_pipeline_version**](PipelineUploadServiceApi.md#upload_pipeline_version) | **POST** /apis/v1/pipelines/upload_version | +[**pipeline_service_upload_pipeline**](PipelineUploadServiceApi.md#pipeline_service_upload_pipeline) | **POST** /apis/v1/pipelines/upload | +[**pipeline_service_upload_pipeline_version**](PipelineUploadServiceApi.md#pipeline_service_upload_pipeline_version) | **POST** /apis/v1/pipelines/upload_version | -# **upload_pipeline** -> V1Pipeline upload_pipeline(uploadfile, name=name, description=description) +# **pipeline_service_upload_pipeline** +> V1Pipeline pipeline_service_upload_pipeline(uploadfile, name=name, description=description) @@ -52,10 +52,10 @@ name = 'name_example' # str | (optional) description = 'description_example' # str | (optional) try: - api_response = api_instance.upload_pipeline(uploadfile, name=name, description=description) + api_response = api_instance.pipeline_service_upload_pipeline(uploadfile, name=name, description=description) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineUploadServiceApi->upload_pipeline: %s\n" % e) + print("Exception when calling PipelineUploadServiceApi->pipeline_service_upload_pipeline: %s\n" % e) ``` ### Parameters @@ -83,12 +83,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1PipelineVersion upload_pipeline_version(uploadfile, name=name, pipelineid=pipelineid, description=description) +# **pipeline_service_upload_pipeline_version** +> V1PipelineVersion pipeline_service_upload_pipeline_version(uploadfile, name=name, pipelineid=pipelineid, description=description) @@ -132,10 +132,10 @@ pipelineid = 'pipelineid_example' # str | (optional) description = 'description_example' # str | (optional) try: - api_response = api_instance.upload_pipeline_version(uploadfile, name=name, pipelineid=pipelineid, description=description) + api_response = api_instance.pipeline_service_upload_pipeline_version(uploadfile, name=name, pipelineid=pipelineid, description=description) pprint(api_response) except ApiException as e: - print("Exception when calling PipelineUploadServiceApi->upload_pipeline_version: %s\n" % e) + print("Exception when calling PipelineUploadServiceApi->pipeline_service_upload_pipeline_version: %s\n" % e) ``` ### Parameters @@ -164,7 +164,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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/v1/python_http_client/docs/ProtobufAny.md b/backend/api/v1/python_http_client/docs/ProtobufAny.md index 7ac779f829..64fc4be496 100644 --- a/backend/api/v1/python_http_client/docs/ProtobufAny.md +++ b/backend/api/v1/python_http_client/docs/ProtobufAny.md @@ -4,8 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type_url** | **str** | A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. 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] +**type** | **str** | A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. 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] [[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/v1/python_http_client/docs/RunServiceApi.md b/backend/api/v1/python_http_client/docs/RunServiceApi.md index 0c360c2e71..666f43e696 100644 --- a/backend/api/v1/python_http_client/docs/RunServiceApi.md +++ b/backend/api/v1/python_http_client/docs/RunServiceApi.md @@ -4,20 +4,20 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**archive_run**](RunServiceApi.md#archive_run) | **POST** /apis/v1/runs/{id}:archive | Archives a run. -[**create_run**](RunServiceApi.md#create_run) | **POST** /apis/v1/runs | Creates a new run. -[**delete_run**](RunServiceApi.md#delete_run) | **DELETE** /apis/v1/runs/{id} | Deletes a run. -[**get_run**](RunServiceApi.md#get_run) | **GET** /apis/v1/runs/{run_id} | Finds a specific run by ID. -[**list_runs**](RunServiceApi.md#list_runs) | **GET** /apis/v1/runs | Finds all runs. -[**read_artifact**](RunServiceApi.md#read_artifact) | **GET** /apis/v1/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/v1/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/v1/runs/{run_id}/retry | Re-initiates a failed or terminated run. -[**terminate_run**](RunServiceApi.md#terminate_run) | **POST** /apis/v1/runs/{run_id}/terminate | Terminates an active run. -[**unarchive_run**](RunServiceApi.md#unarchive_run) | **POST** /apis/v1/runs/{id}:unarchive | Restores an archived run. +[**run_service_archive_run**](RunServiceApi.md#run_service_archive_run) | **POST** /apis/v1/runs/{id}:archive | Archives a run. +[**run_service_create_run**](RunServiceApi.md#run_service_create_run) | **POST** /apis/v1/runs | Creates a new run. +[**run_service_delete_run**](RunServiceApi.md#run_service_delete_run) | **DELETE** /apis/v1/runs/{id} | Deletes a run. +[**run_service_get_run**](RunServiceApi.md#run_service_get_run) | **GET** /apis/v1/runs/{run_id} | Finds a specific run by ID. +[**run_service_list_runs**](RunServiceApi.md#run_service_list_runs) | **GET** /apis/v1/runs | Finds all runs. +[**run_service_read_artifact**](RunServiceApi.md#run_service_read_artifact) | **GET** /apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read | Finds a run's artifact data. +[**run_service_report_run_metrics**](RunServiceApi.md#run_service_report_run_metrics) | **POST** /apis/v1/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. +[**run_service_retry_run**](RunServiceApi.md#run_service_retry_run) | **POST** /apis/v1/runs/{run_id}/retry | Re-initiates a failed or terminated run. +[**run_service_terminate_run**](RunServiceApi.md#run_service_terminate_run) | **POST** /apis/v1/runs/{run_id}/terminate | Terminates an active run. +[**run_service_unarchive_run**](RunServiceApi.md#run_service_unarchive_run) | **POST** /apis/v1/runs/{id}:unarchive | Restores an archived run. -# **archive_run** -> object archive_run(id) +# **run_service_archive_run** +> object run_service_archive_run(id) Archives a run. @@ -59,10 +59,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Archives a run. - api_response = api_instance.archive_run(id) + api_response = api_instance.run_service_archive_run(id) pprint(api_response) except ApiException as e: - print("Exception when calling RunServiceApi->archive_run: %s\n" % e) + print("Exception when calling RunServiceApi->run_service_archive_run: %s\n" % e) ``` ### Parameters @@ -88,12 +88,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1RunDetail create_run(body) +# **run_service_create_run** +> V1RunDetail run_service_create_run(run) Creates a new run. @@ -131,21 +131,21 @@ configuration = kfp_tekton_server_api.Configuration( with kfp_tekton_server_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = kfp_tekton_server_api.RunServiceApi(api_client) - body = kfp_tekton_server_api.V1Run() # V1Run | + run = kfp_tekton_server_api.V1Run() # V1Run | try: # Creates a new run. - api_response = api_instance.create_run(body) + api_response = api_instance.run_service_create_run(run) pprint(api_response) except ApiException as e: - print("Exception when calling RunServiceApi->create_run: %s\n" % e) + print("Exception when calling RunServiceApi->run_service_create_run: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**V1Run**](V1Run.md)| | + **run** | [**V1Run**](V1Run.md)| | ### Return type @@ -164,12 +164,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **run_service_delete_run** +> object run_service_delete_run(id) Deletes a run. @@ -211,10 +211,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Deletes a run. - api_response = api_instance.delete_run(id) + api_response = api_instance.run_service_delete_run(id) pprint(api_response) except ApiException as e: - print("Exception when calling RunServiceApi->delete_run: %s\n" % e) + print("Exception when calling RunServiceApi->run_service_delete_run: %s\n" % e) ``` ### Parameters @@ -240,12 +240,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1RunDetail get_run(run_id) +# **run_service_get_run** +> V1RunDetail run_service_get_run(run_id) Finds a specific run by ID. @@ -287,10 +287,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Finds a specific run by ID. - api_response = api_instance.get_run(run_id) + api_response = api_instance.run_service_get_run(run_id) pprint(api_response) except ApiException as e: - print("Exception when calling RunServiceApi->get_run: %s\n" % e) + print("Exception when calling RunServiceApi->run_service_get_run: %s\n" % e) ``` ### Parameters @@ -316,12 +316,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1ListRunsResponse 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) +# **run_service_list_runs** +> V1ListRunsResponse run_service_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. @@ -368,10 +368,10 @@ filter = 'filter_example' # str | A url-encoded, JSON-serialized Filter protocol 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) + api_response = api_instance.run_service_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) + print("Exception when calling RunServiceApi->run_service_list_runs: %s\n" % e) ``` ### Parameters @@ -402,12 +402,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1ReadArtifactResponse read_artifact(run_id, node_id, artifact_name) +# **run_service_read_artifact** +> V1ReadArtifactResponse run_service_read_artifact(run_id, node_id, artifact_name) Finds a run's artifact data. @@ -451,10 +451,10 @@ 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) + api_response = api_instance.run_service_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) + print("Exception when calling RunServiceApi->run_service_read_artifact: %s\n" % e) ``` ### Parameters @@ -482,12 +482,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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** -> V1ReportRunMetricsResponse report_run_metrics(run_id, body) +# **run_service_report_run_metrics** +> V1ReportRunMetricsResponse run_service_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. @@ -526,14 +526,14 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = kfp_tekton_server_api.RunServiceApi(api_client) run_id = 'run_id_example' # str | Required. The parent run ID of the metric. -body = kfp_tekton_server_api.V1ReportRunMetricsRequest() # V1ReportRunMetricsRequest | +body = kfp_tekton_server_api.InlineObject() # InlineObject | 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) + api_response = api_instance.run_service_report_run_metrics(run_id, body) pprint(api_response) except ApiException as e: - print("Exception when calling RunServiceApi->report_run_metrics: %s\n" % e) + print("Exception when calling RunServiceApi->run_service_report_run_metrics: %s\n" % e) ``` ### Parameters @@ -541,7 +541,7 @@ body = kfp_tekton_server_api.V1ReportRunMetricsRequest() # V1ReportRunMetricsReq Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **run_id** | **str**| Required. The parent run ID of the metric. | - **body** | [**V1ReportRunMetricsRequest**](V1ReportRunMetricsRequest.md)| | + **body** | [**InlineObject**](InlineObject.md)| | ### Return type @@ -560,12 +560,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **run_service_retry_run** +> object run_service_retry_run(run_id) Re-initiates a failed or terminated run. @@ -607,10 +607,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Re-initiates a failed or terminated run. - api_response = api_instance.retry_run(run_id) + api_response = api_instance.run_service_retry_run(run_id) pprint(api_response) except ApiException as e: - print("Exception when calling RunServiceApi->retry_run: %s\n" % e) + print("Exception when calling RunServiceApi->run_service_retry_run: %s\n" % e) ``` ### Parameters @@ -636,12 +636,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **run_service_terminate_run** +> object run_service_terminate_run(run_id) Terminates an active run. @@ -683,10 +683,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Terminates an active run. - api_response = api_instance.terminate_run(run_id) + api_response = api_instance.run_service_terminate_run(run_id) pprint(api_response) except ApiException as e: - print("Exception when calling RunServiceApi->terminate_run: %s\n" % e) + print("Exception when calling RunServiceApi->run_service_terminate_run: %s\n" % e) ``` ### Parameters @@ -712,12 +712,12 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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) +# **run_service_unarchive_run** +> object run_service_unarchive_run(id) Restores an archived run. @@ -759,10 +759,10 @@ with kfp_tekton_server_api.ApiClient(configuration) as api_client: try: # Restores an archived run. - api_response = api_instance.unarchive_run(id) + api_response = api_instance.run_service_unarchive_run(id) pprint(api_response) except ApiException as e: - print("Exception when calling RunServiceApi->unarchive_run: %s\n" % e) + print("Exception when calling RunServiceApi->run_service_unarchive_run: %s\n" % e) ``` ### Parameters @@ -788,7 +788,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A successful response. | - | -**0** | | - | +**0** | An unexpected error response. | - | [[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/v1/python_http_client/kfp_tekton_server_api/__init__.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/__init__.py index 0b4c78b751..2364445d38 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/__init__.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/__init__.py @@ -3,18 +3,18 @@ # flake8: noqa """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import -__version__ = "1.5.0" +__version__ = "1.8.0rc8" # import apis into sdk package from kfp_tekton_server_api.api.experiment_service_api import ExperimentServiceApi @@ -33,6 +33,8 @@ from kfp_tekton_server_api.exceptions import ApiKeyError from kfp_tekton_server_api.exceptions import ApiException # import models into sdk package +from kfp_tekton_server_api.models.googlerpc_status import GooglerpcStatus +from kfp_tekton_server_api.models.inline_object import InlineObject from kfp_tekton_server_api.models.job_mode import JobMode from kfp_tekton_server_api.models.pipeline_spec_runtime_config import PipelineSpecRuntimeConfig from kfp_tekton_server_api.models.protobuf_any import ProtobufAny @@ -58,7 +60,6 @@ from kfp_tekton_server_api.models.v1_pipeline_version import V1PipelineVersion from kfp_tekton_server_api.models.v1_read_artifact_response import V1ReadArtifactResponse from kfp_tekton_server_api.models.v1_relationship import V1Relationship -from kfp_tekton_server_api.models.v1_report_run_metrics_request import V1ReportRunMetricsRequest from kfp_tekton_server_api.models.v1_report_run_metrics_response import V1ReportRunMetricsResponse from kfp_tekton_server_api.models.v1_resource_key import V1ResourceKey from kfp_tekton_server_api.models.v1_resource_reference import V1ResourceReference @@ -67,7 +68,6 @@ from kfp_tekton_server_api.models.v1_run_detail import V1RunDetail from kfp_tekton_server_api.models.v1_run_metric import V1RunMetric from kfp_tekton_server_api.models.v1_run_storage_state import V1RunStorageState -from kfp_tekton_server_api.models.v1_status import V1Status from kfp_tekton_server_api.models.v1_trigger import V1Trigger from kfp_tekton_server_api.models.v1_url import V1Url from kfp_tekton_server_api.models.v1_value import V1Value diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/experiment_service_api.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/experiment_service_api.py index b897b7d2b9..2d0e2cec95 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/experiment_service_api.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/experiment_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -36,13 +36,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def archive_experiment(self, id, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_archive_experiment(id, async_req=True) >>> result = thread.get() :param id: The ID of the experiment to be archived. (required) @@ -62,15 +62,15 @@ def archive_experiment(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.archive_experiment_with_http_info(id, **kwargs) # noqa: E501 + return self.experiment_service_archive_experiment_with_http_info(id, **kwargs) # noqa: E501 - def archive_experiment_with_http_info(self, id, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_archive_experiment_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the experiment to be archived. (required) @@ -112,14 +112,14 @@ def archive_experiment_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method archive_experiment" % key + " to method experiment_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `experiment_service_archive_experiment`") # noqa: E501 collection_formats = {} @@ -158,17 +158,17 @@ def archive_experiment_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_experiment(self, body, **kwargs): # noqa: E501 + def experiment_service_create_experiment(self, experiment, **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) + >>> thread = api.experiment_service_create_experiment(experiment, async_req=True) >>> result = thread.get() - :param body: The experiment to be created. (required) - :type body: V1Experiment + :param experiment: The experiment to be created. (required) + :type experiment: V1Experiment :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -184,19 +184,19 @@ def create_experiment(self, body, **kwargs): # noqa: E501 :rtype: V1Experiment """ kwargs['_return_http_data_only'] = True - return self.create_experiment_with_http_info(body, **kwargs) # noqa: E501 + return self.experiment_service_create_experiment_with_http_info(experiment, **kwargs) # noqa: E501 - def create_experiment_with_http_info(self, body, **kwargs): # noqa: E501 + def experiment_service_create_experiment_with_http_info(self, experiment, **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) + >>> thread = api.experiment_service_create_experiment_with_http_info(experiment, async_req=True) >>> result = thread.get() - :param body: The experiment to be created. (required) - :type body: V1Experiment + :param experiment: The experiment to be created. (required) + :type experiment: V1Experiment :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code @@ -219,7 +219,7 @@ def create_experiment_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'body' + 'experiment' ] all_params.extend( [ @@ -234,14 +234,14 @@ def create_experiment_with_http_info(self, body, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_experiment" % key + " to method experiment_service_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 + # verify the required parameter 'experiment' is set + if self.api_client.client_side_validation and ('experiment' not in local_var_params or # noqa: E501 + local_var_params['experiment'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `experiment` when calling `experiment_service_create_experiment`") # noqa: E501 collection_formats = {} @@ -255,8 +255,8 @@ def create_experiment_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] + if 'experiment' in local_var_params: + body_params = local_var_params['experiment'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -284,13 +284,13 @@ def create_experiment_with_http_info(self, body, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def delete_experiment(self, id, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_delete_experiment(id, async_req=True) >>> result = thread.get() :param id: The ID of the experiment to be deleted. (required) @@ -310,15 +310,15 @@ def delete_experiment(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.delete_experiment_with_http_info(id, **kwargs) # noqa: E501 + return self.experiment_service_delete_experiment_with_http_info(id, **kwargs) # noqa: E501 - def delete_experiment_with_http_info(self, id, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_delete_experiment_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the experiment to be deleted. (required) @@ -360,14 +360,14 @@ def delete_experiment_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_experiment" % key + " to method experiment_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `experiment_service_delete_experiment`") # noqa: E501 collection_formats = {} @@ -406,13 +406,13 @@ def delete_experiment_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_experiment(self, id, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_get_experiment(id, async_req=True) >>> result = thread.get() :param id: The ID of the experiment to be retrieved. (required) @@ -432,15 +432,15 @@ def get_experiment(self, id, **kwargs): # noqa: E501 :rtype: V1Experiment """ kwargs['_return_http_data_only'] = True - return self.get_experiment_with_http_info(id, **kwargs) # noqa: E501 + return self.experiment_service_get_experiment_with_http_info(id, **kwargs) # noqa: E501 - def get_experiment_with_http_info(self, id, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_get_experiment_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the experiment to be retrieved. (required) @@ -482,14 +482,14 @@ def get_experiment_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_experiment" % key + " to method experiment_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `experiment_service_get_experiment`") # noqa: E501 collection_formats = {} @@ -528,13 +528,13 @@ def get_experiment_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_experiment(self, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_list_experiment(async_req=True) >>> result = thread.get() :param 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. @@ -564,15 +564,15 @@ def list_experiment(self, **kwargs): # noqa: E501 :rtype: V1ListExperimentsResponse """ kwargs['_return_http_data_only'] = True - return self.list_experiment_with_http_info(**kwargs) # noqa: E501 + return self.experiment_service_list_experiment_with_http_info(**kwargs) # noqa: E501 - def list_experiment_with_http_info(self, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_list_experiment_with_http_info(async_req=True) >>> result = thread.get() :param 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. @@ -629,7 +629,7 @@ def list_experiment_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_experiment" % key + " to method experiment_service_list_experiment" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -681,13 +681,13 @@ def list_experiment_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def unarchive_experiment(self, id, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_unarchive_experiment(id, async_req=True) >>> result = thread.get() :param id: The ID of the experiment to be restored. (required) @@ -707,15 +707,15 @@ def unarchive_experiment(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.unarchive_experiment_with_http_info(id, **kwargs) # noqa: E501 + return self.experiment_service_unarchive_experiment_with_http_info(id, **kwargs) # noqa: E501 - def unarchive_experiment_with_http_info(self, id, **kwargs): # noqa: E501 + def experiment_service_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) + >>> thread = api.experiment_service_unarchive_experiment_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the experiment to be restored. (required) @@ -757,14 +757,14 @@ def unarchive_experiment_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method unarchive_experiment" % key + " to method experiment_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `experiment_service_unarchive_experiment`") # noqa: E501 collection_formats = {} diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/healthz_service_api.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/healthz_service_api.py index 4b5d99347c..4148f46243 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/healthz_service_api.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/healthz_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -36,13 +36,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def get_healthz(self, **kwargs): # noqa: E501 + def healthz_service_get_healthz(self, **kwargs): # noqa: E501 """Get healthz 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.get_healthz(async_req=True) + >>> thread = api.healthz_service_get_healthz(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. @@ -60,15 +60,15 @@ def get_healthz(self, **kwargs): # noqa: E501 :rtype: V1GetHealthzResponse """ kwargs['_return_http_data_only'] = True - return self.get_healthz_with_http_info(**kwargs) # noqa: E501 + return self.healthz_service_get_healthz_with_http_info(**kwargs) # noqa: E501 - def get_healthz_with_http_info(self, **kwargs): # noqa: E501 + def healthz_service_get_healthz_with_http_info(self, **kwargs): # noqa: E501 """Get healthz 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.get_healthz_with_http_info(async_req=True) + >>> thread = api.healthz_service_get_healthz_with_http_info(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. @@ -107,7 +107,7 @@ def get_healthz_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_healthz" % key + " to method healthz_service_get_healthz" % key ) local_var_params[key] = val del local_var_params['kwargs'] diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/job_service_api.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/job_service_api.py index 33cfc9f03e..7bd86cc77e 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/job_service_api.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/job_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -36,17 +36,17 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_job(self, body, **kwargs): # noqa: E501 + def job_service_create_job(self, job, **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) + >>> thread = api.job_service_create_job(job, async_req=True) >>> result = thread.get() - :param body: The job to be created (required) - :type body: V1Job + :param job: The job to be created (required) + :type job: V1Job :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -62,19 +62,19 @@ def create_job(self, body, **kwargs): # noqa: E501 :rtype: V1Job """ kwargs['_return_http_data_only'] = True - return self.create_job_with_http_info(body, **kwargs) # noqa: E501 + return self.job_service_create_job_with_http_info(job, **kwargs) # noqa: E501 - def create_job_with_http_info(self, body, **kwargs): # noqa: E501 + def job_service_create_job_with_http_info(self, job, **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) + >>> thread = api.job_service_create_job_with_http_info(job, async_req=True) >>> result = thread.get() - :param body: The job to be created (required) - :type body: V1Job + :param job: The job to be created (required) + :type job: V1Job :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code @@ -97,7 +97,7 @@ def create_job_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'body' + 'job' ] all_params.extend( [ @@ -112,14 +112,14 @@ def create_job_with_http_info(self, body, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_job" % key + " to method job_service_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 + # verify the required parameter 'job' is set + if self.api_client.client_side_validation and ('job' not in local_var_params or # noqa: E501 + local_var_params['job'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job` when calling `job_service_create_job`") # noqa: E501 collection_formats = {} @@ -133,8 +133,8 @@ def create_job_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] + if 'job' in local_var_params: + body_params = local_var_params['job'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -162,13 +162,13 @@ def create_job_with_http_info(self, body, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def delete_job(self, id, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_delete_job(id, async_req=True) >>> result = thread.get() :param id: The ID of the job to be deleted (required) @@ -188,15 +188,15 @@ def delete_job(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.delete_job_with_http_info(id, **kwargs) # noqa: E501 + return self.job_service_delete_job_with_http_info(id, **kwargs) # noqa: E501 - def delete_job_with_http_info(self, id, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_delete_job_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the job to be deleted (required) @@ -238,14 +238,14 @@ def delete_job_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_job" % key + " to method job_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `job_service_delete_job`") # noqa: E501 collection_formats = {} @@ -284,13 +284,13 @@ def delete_job_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def disable_job(self, id, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_disable_job(id, async_req=True) >>> result = thread.get() :param id: The ID of the job to be disabled (required) @@ -310,15 +310,15 @@ def disable_job(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.disable_job_with_http_info(id, **kwargs) # noqa: E501 + return self.job_service_disable_job_with_http_info(id, **kwargs) # noqa: E501 - def disable_job_with_http_info(self, id, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_disable_job_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the job to be disabled (required) @@ -360,14 +360,14 @@ def disable_job_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method disable_job" % key + " to method job_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `job_service_disable_job`") # noqa: E501 collection_formats = {} @@ -406,13 +406,13 @@ def disable_job_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def enable_job(self, id, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_enable_job(id, async_req=True) >>> result = thread.get() :param id: The ID of the job to be enabled (required) @@ -432,15 +432,15 @@ def enable_job(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.enable_job_with_http_info(id, **kwargs) # noqa: E501 + return self.job_service_enable_job_with_http_info(id, **kwargs) # noqa: E501 - def enable_job_with_http_info(self, id, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_enable_job_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the job to be enabled (required) @@ -482,14 +482,14 @@ def enable_job_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method enable_job" % key + " to method job_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `job_service_enable_job`") # noqa: E501 collection_formats = {} @@ -528,13 +528,13 @@ def enable_job_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_job(self, id, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_get_job(id, async_req=True) >>> result = thread.get() :param id: The ID of the job to be retrieved (required) @@ -554,15 +554,15 @@ def get_job(self, id, **kwargs): # noqa: E501 :rtype: V1Job """ kwargs['_return_http_data_only'] = True - return self.get_job_with_http_info(id, **kwargs) # noqa: E501 + return self.job_service_get_job_with_http_info(id, **kwargs) # noqa: E501 - def get_job_with_http_info(self, id, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_get_job_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the job to be retrieved (required) @@ -604,14 +604,14 @@ def get_job_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_job" % key + " to method job_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `job_service_get_job`") # noqa: E501 collection_formats = {} @@ -650,13 +650,13 @@ def get_job_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_jobs(self, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_list_jobs(async_req=True) >>> result = thread.get() :param 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. @@ -686,15 +686,15 @@ def list_jobs(self, **kwargs): # noqa: E501 :rtype: V1ListJobsResponse """ kwargs['_return_http_data_only'] = True - return self.list_jobs_with_http_info(**kwargs) # noqa: E501 + return self.job_service_list_jobs_with_http_info(**kwargs) # noqa: E501 - def list_jobs_with_http_info(self, **kwargs): # noqa: E501 + def job_service_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) + >>> thread = api.job_service_list_jobs_with_http_info(async_req=True) >>> result = thread.get() :param 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. @@ -751,7 +751,7 @@ def list_jobs_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_jobs" % key + " to method job_service_list_jobs" % key ) local_var_params[key] = val del local_var_params['kwargs'] diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/pipeline_service_api.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/pipeline_service_api.py index a34222c72d..dc7f2d6401 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/pipeline_service_api.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/pipeline_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -36,17 +36,17 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_pipeline(self, body, **kwargs): # noqa: E501 + def pipeline_service_create_pipeline(self, pipeline, **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) + >>> thread = api.pipeline_service_create_pipeline(pipeline, async_req=True) >>> result = thread.get() - :param body: (required) - :type body: V1Pipeline + :param pipeline: (required) + :type pipeline: V1Pipeline :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -62,19 +62,19 @@ def create_pipeline(self, body, **kwargs): # noqa: E501 :rtype: V1Pipeline """ kwargs['_return_http_data_only'] = True - return self.create_pipeline_with_http_info(body, **kwargs) # noqa: E501 + return self.pipeline_service_create_pipeline_with_http_info(pipeline, **kwargs) # noqa: E501 - def create_pipeline_with_http_info(self, body, **kwargs): # noqa: E501 + def pipeline_service_create_pipeline_with_http_info(self, pipeline, **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) + >>> thread = api.pipeline_service_create_pipeline_with_http_info(pipeline, async_req=True) >>> result = thread.get() - :param body: (required) - :type body: V1Pipeline + :param pipeline: (required) + :type pipeline: V1Pipeline :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code @@ -97,7 +97,7 @@ def create_pipeline_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'body' + 'pipeline' ] all_params.extend( [ @@ -112,14 +112,14 @@ def create_pipeline_with_http_info(self, body, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_pipeline" % key + " to method pipeline_service_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 + # verify the required parameter 'pipeline' is set + if self.api_client.client_side_validation and ('pipeline' not in local_var_params or # noqa: E501 + local_var_params['pipeline'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `pipeline` when calling `pipeline_service_create_pipeline`") # noqa: E501 collection_formats = {} @@ -133,8 +133,8 @@ def create_pipeline_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] + if 'pipeline' in local_var_params: + body_params = local_var_params['pipeline'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -162,17 +162,17 @@ def create_pipeline_with_http_info(self, body, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_pipeline_version(self, body, **kwargs): # noqa: E501 + def pipeline_service_create_pipeline_version(self, version, **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) + >>> thread = api.pipeline_service_create_pipeline_version(version, async_req=True) >>> result = thread.get() - :param body: ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. (required) - :type body: V1PipelineVersion + :param version: ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. (required) + :type version: V1PipelineVersion :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -188,19 +188,19 @@ def create_pipeline_version(self, body, **kwargs): # noqa: E501 :rtype: V1PipelineVersion """ kwargs['_return_http_data_only'] = True - return self.create_pipeline_version_with_http_info(body, **kwargs) # noqa: E501 + return self.pipeline_service_create_pipeline_version_with_http_info(version, **kwargs) # noqa: E501 - def create_pipeline_version_with_http_info(self, body, **kwargs): # noqa: E501 + def pipeline_service_create_pipeline_version_with_http_info(self, version, **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) + >>> thread = api.pipeline_service_create_pipeline_version_with_http_info(version, async_req=True) >>> result = thread.get() - :param body: ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. (required) - :type body: V1PipelineVersion + :param version: ResourceReference inside PipelineVersion specifies the pipeline that this version belongs to. (required) + :type version: V1PipelineVersion :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code @@ -223,7 +223,7 @@ def create_pipeline_version_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'body' + 'version' ] all_params.extend( [ @@ -238,14 +238,14 @@ def create_pipeline_version_with_http_info(self, body, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_pipeline_version" % key + " to method pipeline_service_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 + # verify the required parameter 'version' is set + if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 + local_var_params['version'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `version` when calling `pipeline_service_create_pipeline_version`") # noqa: E501 collection_formats = {} @@ -259,8 +259,8 @@ def create_pipeline_version_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] + if 'version' in local_var_params: + body_params = local_var_params['version'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -288,13 +288,13 @@ def create_pipeline_version_with_http_info(self, body, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def delete_pipeline(self, id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_delete_pipeline(id, async_req=True) >>> result = thread.get() :param id: The ID of the pipeline to be deleted. (required) @@ -314,15 +314,15 @@ def delete_pipeline(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.delete_pipeline_with_http_info(id, **kwargs) # noqa: E501 + return self.pipeline_service_delete_pipeline_with_http_info(id, **kwargs) # noqa: E501 - def delete_pipeline_with_http_info(self, id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_delete_pipeline_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the pipeline to be deleted. (required) @@ -364,14 +364,14 @@ def delete_pipeline_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_pipeline" % key + " to method pipeline_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `pipeline_service_delete_pipeline`") # noqa: E501 collection_formats = {} @@ -410,13 +410,13 @@ def delete_pipeline_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def delete_pipeline_version(self, version_id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_delete_pipeline_version(version_id, async_req=True) >>> result = thread.get() :param version_id: The ID of the pipeline version to be deleted. (required) @@ -436,15 +436,15 @@ def delete_pipeline_version(self, version_id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.delete_pipeline_version_with_http_info(version_id, **kwargs) # noqa: E501 + return self.pipeline_service_delete_pipeline_version_with_http_info(version_id, **kwargs) # noqa: E501 - def delete_pipeline_version_with_http_info(self, version_id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_delete_pipeline_version_with_http_info(version_id, async_req=True) >>> result = thread.get() :param version_id: The ID of the pipeline version to be deleted. (required) @@ -486,14 +486,14 @@ def delete_pipeline_version_with_http_info(self, version_id, **kwargs): # noqa: if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_pipeline_version" % key + " to method pipeline_service_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 + raise ApiValueError("Missing the required parameter `version_id` when calling `pipeline_service_delete_pipeline_version`") # noqa: E501 collection_formats = {} @@ -532,13 +532,13 @@ def delete_pipeline_version_with_http_info(self, version_id, **kwargs): # noqa: _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_pipeline(self, id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_get_pipeline(id, async_req=True) >>> result = thread.get() :param id: The ID of the pipeline to be retrieved. (required) @@ -558,15 +558,15 @@ def get_pipeline(self, id, **kwargs): # noqa: E501 :rtype: V1Pipeline """ kwargs['_return_http_data_only'] = True - return self.get_pipeline_with_http_info(id, **kwargs) # noqa: E501 + return self.pipeline_service_get_pipeline_with_http_info(id, **kwargs) # noqa: E501 - def get_pipeline_with_http_info(self, id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_get_pipeline_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the pipeline to be retrieved. (required) @@ -608,14 +608,14 @@ def get_pipeline_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_pipeline" % key + " to method pipeline_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `pipeline_service_get_pipeline`") # noqa: E501 collection_formats = {} @@ -654,13 +654,13 @@ def get_pipeline_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_pipeline_version(self, version_id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_get_pipeline_version(version_id, async_req=True) >>> result = thread.get() :param version_id: The ID of the pipeline version to be retrieved. (required) @@ -680,15 +680,15 @@ def get_pipeline_version(self, version_id, **kwargs): # noqa: E501 :rtype: V1PipelineVersion """ kwargs['_return_http_data_only'] = True - return self.get_pipeline_version_with_http_info(version_id, **kwargs) # noqa: E501 + return self.pipeline_service_get_pipeline_version_with_http_info(version_id, **kwargs) # noqa: E501 - def get_pipeline_version_with_http_info(self, version_id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_get_pipeline_version_with_http_info(version_id, async_req=True) >>> result = thread.get() :param version_id: The ID of the pipeline version to be retrieved. (required) @@ -730,14 +730,14 @@ def get_pipeline_version_with_http_info(self, version_id, **kwargs): # noqa: E5 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_pipeline_version" % key + " to method pipeline_service_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 + raise ApiValueError("Missing the required parameter `version_id` when calling `pipeline_service_get_pipeline_version`") # noqa: E501 collection_formats = {} @@ -776,13 +776,13 @@ def get_pipeline_version_with_http_info(self, version_id, **kwargs): # noqa: E5 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_pipeline_version_template(self, version_id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_get_pipeline_version_template(version_id, async_req=True) >>> result = thread.get() :param version_id: The ID of the pipeline version whose template is to be retrieved. (required) @@ -802,15 +802,15 @@ def get_pipeline_version_template(self, version_id, **kwargs): # noqa: E501 :rtype: V1GetTemplateResponse """ kwargs['_return_http_data_only'] = True - return self.get_pipeline_version_template_with_http_info(version_id, **kwargs) # noqa: E501 + return self.pipeline_service_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 + def pipeline_service_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) + >>> thread = api.pipeline_service_get_pipeline_version_template_with_http_info(version_id, async_req=True) >>> result = thread.get() :param version_id: The ID of the pipeline version whose template is to be retrieved. (required) @@ -852,14 +852,14 @@ def get_pipeline_version_template_with_http_info(self, version_id, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_pipeline_version_template" % key + " to method pipeline_service_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 + raise ApiValueError("Missing the required parameter `version_id` when calling `pipeline_service_get_pipeline_version_template`") # noqa: E501 collection_formats = {} @@ -898,13 +898,13 @@ def get_pipeline_version_template_with_http_info(self, version_id, **kwargs): # _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_template(self, id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_get_template(id, async_req=True) >>> result = thread.get() :param id: The ID of the pipeline whose template is to be retrieved. (required) @@ -924,15 +924,15 @@ def get_template(self, id, **kwargs): # noqa: E501 :rtype: V1GetTemplateResponse """ kwargs['_return_http_data_only'] = True - return self.get_template_with_http_info(id, **kwargs) # noqa: E501 + return self.pipeline_service_get_template_with_http_info(id, **kwargs) # noqa: E501 - def get_template_with_http_info(self, id, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_get_template_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the pipeline whose template is to be retrieved. (required) @@ -974,14 +974,14 @@ def get_template_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_template" % key + " to method pipeline_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `pipeline_service_get_template`") # noqa: E501 collection_formats = {} @@ -1020,13 +1020,13 @@ def get_template_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_pipeline_versions(self, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_list_pipeline_versions(async_req=True) >>> result = thread.get() :param resource_key_type: The type of the resource that referred to. @@ -1056,15 +1056,15 @@ def list_pipeline_versions(self, **kwargs): # noqa: E501 :rtype: V1ListPipelineVersionsResponse """ kwargs['_return_http_data_only'] = True - return self.list_pipeline_versions_with_http_info(**kwargs) # noqa: E501 + return self.pipeline_service_list_pipeline_versions_with_http_info(**kwargs) # noqa: E501 - def list_pipeline_versions_with_http_info(self, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_list_pipeline_versions_with_http_info(async_req=True) >>> result = thread.get() :param resource_key_type: The type of the resource that referred to. @@ -1121,7 +1121,7 @@ def list_pipeline_versions_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_pipeline_versions" % key + " to method pipeline_service_list_pipeline_versions" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -1173,13 +1173,13 @@ def list_pipeline_versions_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_pipelines(self, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_list_pipelines(async_req=True) >>> result = thread.get() :param 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. @@ -1209,15 +1209,15 @@ def list_pipelines(self, **kwargs): # noqa: E501 :rtype: V1ListPipelinesResponse """ kwargs['_return_http_data_only'] = True - return self.list_pipelines_with_http_info(**kwargs) # noqa: E501 + return self.pipeline_service_list_pipelines_with_http_info(**kwargs) # noqa: E501 - def list_pipelines_with_http_info(self, **kwargs): # noqa: E501 + def pipeline_service_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) + >>> thread = api.pipeline_service_list_pipelines_with_http_info(async_req=True) >>> result = thread.get() :param 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. @@ -1274,7 +1274,7 @@ def list_pipelines_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_pipelines" % key + " to method pipeline_service_list_pipelines" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -1326,13 +1326,13 @@ def list_pipelines_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def update_pipeline_default_version(self, pipeline_id, version_id, **kwargs): # noqa: E501 + def pipeline_service_update_pipeline_default_version(self, pipeline_id, version_id, **kwargs): # noqa: E501 """Update the default pipeline version of a specific 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.update_pipeline_default_version(pipeline_id, version_id, async_req=True) + >>> thread = api.pipeline_service_update_pipeline_default_version(pipeline_id, version_id, async_req=True) >>> result = thread.get() :param pipeline_id: The ID of the pipeline to be updated. (required) @@ -1354,15 +1354,15 @@ def update_pipeline_default_version(self, pipeline_id, version_id, **kwargs): # :rtype: object """ kwargs['_return_http_data_only'] = True - return self.update_pipeline_default_version_with_http_info(pipeline_id, version_id, **kwargs) # noqa: E501 + return self.pipeline_service_update_pipeline_default_version_with_http_info(pipeline_id, version_id, **kwargs) # noqa: E501 - def update_pipeline_default_version_with_http_info(self, pipeline_id, version_id, **kwargs): # noqa: E501 + def pipeline_service_update_pipeline_default_version_with_http_info(self, pipeline_id, version_id, **kwargs): # noqa: E501 """Update the default pipeline version of a specific 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.update_pipeline_default_version_with_http_info(pipeline_id, version_id, async_req=True) + >>> thread = api.pipeline_service_update_pipeline_default_version_with_http_info(pipeline_id, version_id, async_req=True) >>> result = thread.get() :param pipeline_id: The ID of the pipeline to be updated. (required) @@ -1407,18 +1407,18 @@ def update_pipeline_default_version_with_http_info(self, pipeline_id, version_id if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_pipeline_default_version" % key + " to method pipeline_service_update_pipeline_default_version" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'pipeline_id' is set if self.api_client.client_side_validation and ('pipeline_id' not in local_var_params or # noqa: E501 local_var_params['pipeline_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `pipeline_id` when calling `update_pipeline_default_version`") # noqa: E501 + raise ApiValueError("Missing the required parameter `pipeline_id` when calling `pipeline_service_update_pipeline_default_version`") # noqa: E501 # 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 `update_pipeline_default_version`") # noqa: E501 + raise ApiValueError("Missing the required parameter `version_id` when calling `pipeline_service_update_pipeline_default_version`") # noqa: E501 collection_formats = {} diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/pipeline_upload_service_api.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/pipeline_upload_service_api.py index 7f77649ca9..d87861118b 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/pipeline_upload_service_api.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/pipeline_upload_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -36,13 +36,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def upload_pipeline(self, uploadfile, **kwargs): # noqa: E501 - """upload_pipeline # noqa: E501 + def pipeline_service_upload_pipeline(self, uploadfile, **kwargs): # noqa: E501 + """pipeline_service_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) + >>> thread = api.pipeline_service_upload_pipeline(uploadfile, async_req=True) >>> result = thread.get() :param uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) @@ -66,15 +66,15 @@ def upload_pipeline(self, uploadfile, **kwargs): # noqa: E501 :rtype: V1Pipeline """ kwargs['_return_http_data_only'] = True - return self.upload_pipeline_with_http_info(uploadfile, **kwargs) # noqa: E501 + return self.pipeline_service_upload_pipeline_with_http_info(uploadfile, **kwargs) # noqa: E501 - def upload_pipeline_with_http_info(self, uploadfile, **kwargs): # noqa: E501 - """upload_pipeline # noqa: E501 + def pipeline_service_upload_pipeline_with_http_info(self, uploadfile, **kwargs): # noqa: E501 + """pipeline_service_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) + >>> thread = api.pipeline_service_upload_pipeline_with_http_info(uploadfile, async_req=True) >>> result = thread.get() :param uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) @@ -122,14 +122,14 @@ def upload_pipeline_with_http_info(self, uploadfile, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method upload_pipeline" % key + " to method pipeline_service_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 + raise ApiValueError("Missing the required parameter `uploadfile` when calling `pipeline_service_upload_pipeline`") # noqa: E501 collection_formats = {} @@ -176,13 +176,13 @@ def upload_pipeline_with_http_info(self, uploadfile, **kwargs): # noqa: E501 _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 + def pipeline_service_upload_pipeline_version(self, uploadfile, **kwargs): # noqa: E501 + """pipeline_service_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) + >>> thread = api.pipeline_service_upload_pipeline_version(uploadfile, async_req=True) >>> result = thread.get() :param uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) @@ -208,15 +208,15 @@ def upload_pipeline_version(self, uploadfile, **kwargs): # noqa: E501 :rtype: V1PipelineVersion """ kwargs['_return_http_data_only'] = True - return self.upload_pipeline_version_with_http_info(uploadfile, **kwargs) # noqa: E501 + return self.pipeline_service_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 + def pipeline_service_upload_pipeline_version_with_http_info(self, uploadfile, **kwargs): # noqa: E501 + """pipeline_service_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) + >>> thread = api.pipeline_service_upload_pipeline_version_with_http_info(uploadfile, async_req=True) >>> result = thread.get() :param uploadfile: The pipeline to upload. Maximum size of 32MB is supported. (required) @@ -267,14 +267,14 @@ def upload_pipeline_version_with_http_info(self, uploadfile, **kwargs): # noqa: if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method upload_pipeline_version" % key + " to method pipeline_service_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 + raise ApiValueError("Missing the required parameter `uploadfile` when calling `pipeline_service_upload_pipeline_version`") # noqa: E501 collection_formats = {} diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/run_service_api.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/run_service_api.py index b8fd100e1e..8c5876be6f 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/api/run_service_api.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/api/run_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -36,13 +36,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def archive_run(self, id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_archive_run(id, async_req=True) >>> result = thread.get() :param id: The ID of the run to be archived. (required) @@ -62,15 +62,15 @@ def archive_run(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.archive_run_with_http_info(id, **kwargs) # noqa: E501 + return self.run_service_archive_run_with_http_info(id, **kwargs) # noqa: E501 - def archive_run_with_http_info(self, id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_archive_run_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the run to be archived. (required) @@ -112,14 +112,14 @@ def archive_run_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method archive_run" % key + " to method run_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `run_service_archive_run`") # noqa: E501 collection_formats = {} @@ -158,17 +158,17 @@ def archive_run_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def create_run(self, body, **kwargs): # noqa: E501 + def run_service_create_run(self, run, **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) + >>> thread = api.run_service_create_run(run, async_req=True) >>> result = thread.get() - :param body: (required) - :type body: V1Run + :param run: (required) + :type run: V1Run :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -184,19 +184,19 @@ def create_run(self, body, **kwargs): # noqa: E501 :rtype: V1RunDetail """ kwargs['_return_http_data_only'] = True - return self.create_run_with_http_info(body, **kwargs) # noqa: E501 + return self.run_service_create_run_with_http_info(run, **kwargs) # noqa: E501 - def create_run_with_http_info(self, body, **kwargs): # noqa: E501 + def run_service_create_run_with_http_info(self, run, **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) + >>> thread = api.run_service_create_run_with_http_info(run, async_req=True) >>> result = thread.get() - :param body: (required) - :type body: V1Run + :param run: (required) + :type run: V1Run :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code @@ -219,7 +219,7 @@ def create_run_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params = locals() all_params = [ - 'body' + 'run' ] all_params.extend( [ @@ -234,14 +234,14 @@ def create_run_with_http_info(self, body, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_run" % key + " to method run_service_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 + # verify the required parameter 'run' is set + if self.api_client.client_side_validation and ('run' not in local_var_params or # noqa: E501 + local_var_params['run'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run` when calling `run_service_create_run`") # noqa: E501 collection_formats = {} @@ -255,8 +255,8 @@ def create_run_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] + if 'run' in local_var_params: + body_params = local_var_params['run'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -284,13 +284,13 @@ def create_run_with_http_info(self, body, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def delete_run(self, id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_delete_run(id, async_req=True) >>> result = thread.get() :param id: The ID of the run to be deleted. (required) @@ -310,15 +310,15 @@ def delete_run(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.delete_run_with_http_info(id, **kwargs) # noqa: E501 + return self.run_service_delete_run_with_http_info(id, **kwargs) # noqa: E501 - def delete_run_with_http_info(self, id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_delete_run_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the run to be deleted. (required) @@ -360,14 +360,14 @@ def delete_run_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_run" % key + " to method run_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `run_service_delete_run`") # noqa: E501 collection_formats = {} @@ -406,13 +406,13 @@ def delete_run_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_run(self, run_id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_get_run(run_id, async_req=True) >>> result = thread.get() :param run_id: The ID of the run to be retrieved. (required) @@ -432,15 +432,15 @@ def get_run(self, run_id, **kwargs): # noqa: E501 :rtype: V1RunDetail """ kwargs['_return_http_data_only'] = True - return self.get_run_with_http_info(run_id, **kwargs) # noqa: E501 + return self.run_service_get_run_with_http_info(run_id, **kwargs) # noqa: E501 - def get_run_with_http_info(self, run_id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_get_run_with_http_info(run_id, async_req=True) >>> result = thread.get() :param run_id: The ID of the run to be retrieved. (required) @@ -482,14 +482,14 @@ def get_run_with_http_info(self, run_id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_run" % key + " to method run_service_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 + raise ApiValueError("Missing the required parameter `run_id` when calling `run_service_get_run`") # noqa: E501 collection_formats = {} @@ -528,13 +528,13 @@ def get_run_with_http_info(self, run_id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def list_runs(self, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_list_runs(async_req=True) >>> result = thread.get() :param 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. @@ -564,15 +564,15 @@ def list_runs(self, **kwargs): # noqa: E501 :rtype: V1ListRunsResponse """ kwargs['_return_http_data_only'] = True - return self.list_runs_with_http_info(**kwargs) # noqa: E501 + return self.run_service_list_runs_with_http_info(**kwargs) # noqa: E501 - def list_runs_with_http_info(self, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_list_runs_with_http_info(async_req=True) >>> result = thread.get() :param 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. @@ -629,7 +629,7 @@ def list_runs_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_runs" % key + " to method run_service_list_runs" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -681,13 +681,13 @@ def list_runs_with_http_info(self, **kwargs): # noqa: E501 _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 + def run_service_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) + >>> thread = api.run_service_read_artifact(run_id, node_id, artifact_name, async_req=True) >>> result = thread.get() :param run_id: The ID of the run. (required) @@ -711,15 +711,15 @@ def read_artifact(self, run_id, node_id, artifact_name, **kwargs): # noqa: E501 :rtype: V1ReadArtifactResponse """ kwargs['_return_http_data_only'] = True - return self.read_artifact_with_http_info(run_id, node_id, artifact_name, **kwargs) # noqa: E501 + return self.run_service_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 + def run_service_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) + >>> thread = api.run_service_read_artifact_with_http_info(run_id, node_id, artifact_name, async_req=True) >>> result = thread.get() :param run_id: The ID of the run. (required) @@ -767,22 +767,22 @@ def read_artifact_with_http_info(self, run_id, node_id, artifact_name, **kwargs) if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_artifact" % key + " to method run_service_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 + raise ApiValueError("Missing the required parameter `run_id` when calling `run_service_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 + raise ApiValueError("Missing the required parameter `node_id` when calling `run_service_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 + raise ApiValueError("Missing the required parameter `artifact_name` when calling `run_service_read_artifact`") # noqa: E501 collection_formats = {} @@ -825,19 +825,19 @@ def read_artifact_with_http_info(self, run_id, node_id, artifact_name, **kwargs) _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def report_run_metrics(self, run_id, body, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_report_run_metrics(run_id, body, async_req=True) >>> result = thread.get() :param run_id: Required. The parent run ID of the metric. (required) :type run_id: str :param body: (required) - :type body: V1ReportRunMetricsRequest + :type body: InlineObject :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will @@ -853,21 +853,21 @@ def report_run_metrics(self, run_id, body, **kwargs): # noqa: E501 :rtype: V1ReportRunMetricsResponse """ kwargs['_return_http_data_only'] = True - return self.report_run_metrics_with_http_info(run_id, body, **kwargs) # noqa: E501 + return self.run_service_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 + def run_service_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) + >>> thread = api.run_service_report_run_metrics_with_http_info(run_id, body, async_req=True) >>> result = thread.get() :param run_id: Required. The parent run ID of the metric. (required) :type run_id: str :param body: (required) - :type body: V1ReportRunMetricsRequest + :type body: InlineObject :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code @@ -906,18 +906,18 @@ def report_run_metrics_with_http_info(self, run_id, body, **kwargs): # noqa: E5 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method report_run_metrics" % key + " to method run_service_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 + raise ApiValueError("Missing the required parameter `run_id` when calling `run_service_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 + raise ApiValueError("Missing the required parameter `body` when calling `run_service_report_run_metrics`") # noqa: E501 collection_formats = {} @@ -962,13 +962,13 @@ def report_run_metrics_with_http_info(self, run_id, body, **kwargs): # noqa: E5 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def retry_run(self, run_id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_retry_run(run_id, async_req=True) >>> result = thread.get() :param run_id: The ID of the run to be retried. (required) @@ -988,15 +988,15 @@ def retry_run(self, run_id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.retry_run_with_http_info(run_id, **kwargs) # noqa: E501 + return self.run_service_retry_run_with_http_info(run_id, **kwargs) # noqa: E501 - def retry_run_with_http_info(self, run_id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_retry_run_with_http_info(run_id, async_req=True) >>> result = thread.get() :param run_id: The ID of the run to be retried. (required) @@ -1038,14 +1038,14 @@ def retry_run_with_http_info(self, run_id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method retry_run" % key + " to method run_service_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 + raise ApiValueError("Missing the required parameter `run_id` when calling `run_service_retry_run`") # noqa: E501 collection_formats = {} @@ -1084,13 +1084,13 @@ def retry_run_with_http_info(self, run_id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def terminate_run(self, run_id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_terminate_run(run_id, async_req=True) >>> result = thread.get() :param run_id: The ID of the run to be terminated. (required) @@ -1110,15 +1110,15 @@ def terminate_run(self, run_id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.terminate_run_with_http_info(run_id, **kwargs) # noqa: E501 + return self.run_service_terminate_run_with_http_info(run_id, **kwargs) # noqa: E501 - def terminate_run_with_http_info(self, run_id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_terminate_run_with_http_info(run_id, async_req=True) >>> result = thread.get() :param run_id: The ID of the run to be terminated. (required) @@ -1160,14 +1160,14 @@ def terminate_run_with_http_info(self, run_id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method terminate_run" % key + " to method run_service_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 + raise ApiValueError("Missing the required parameter `run_id` when calling `run_service_terminate_run`") # noqa: E501 collection_formats = {} @@ -1206,13 +1206,13 @@ def terminate_run_with_http_info(self, run_id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def unarchive_run(self, id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_unarchive_run(id, async_req=True) >>> result = thread.get() :param id: The ID of the run to be restored. (required) @@ -1232,15 +1232,15 @@ def unarchive_run(self, id, **kwargs): # noqa: E501 :rtype: object """ kwargs['_return_http_data_only'] = True - return self.unarchive_run_with_http_info(id, **kwargs) # noqa: E501 + return self.run_service_unarchive_run_with_http_info(id, **kwargs) # noqa: E501 - def unarchive_run_with_http_info(self, id, **kwargs): # noqa: E501 + def run_service_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) + >>> thread = api.run_service_unarchive_run_with_http_info(id, async_req=True) >>> result = thread.get() :param id: The ID of the run to be restored. (required) @@ -1282,14 +1282,14 @@ def unarchive_run_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method unarchive_run" % key + " to method run_service_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 + raise ApiValueError("Missing the required parameter `id` when calling `run_service_unarchive_run`") # noqa: E501 collection_formats = {} diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/api_client.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/api_client.py index b5d85bbfcb..93d06b71b9 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/api_client.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/api_client.py @@ -1,10 +1,10 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.5.0/python' + self.user_agent = 'OpenAPI-Generator/1.8.0rc8/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/configuration.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/configuration.py index d941fbf3dc..415a8dce18 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/configuration.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/configuration.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -351,8 +351,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.5.0\n"\ - "SDK Package Version: 1.5.0".\ + "Version of the API: 1.8.0rc8\n"\ + "SDK Package Version: 1.8.0rc8".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/exceptions.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/exceptions.py index a588c1dde0..daec329bdf 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/exceptions.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/exceptions.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/__init__.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/__init__.py index 9a8c0e5e2d..d39a1ecf2f 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/__init__.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/__init__.py @@ -2,11 +2,11 @@ # flake8: noqa """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -14,6 +14,8 @@ from __future__ import absolute_import # import models into model package +from kfp_tekton_server_api.models.googlerpc_status import GooglerpcStatus +from kfp_tekton_server_api.models.inline_object import InlineObject from kfp_tekton_server_api.models.job_mode import JobMode from kfp_tekton_server_api.models.pipeline_spec_runtime_config import PipelineSpecRuntimeConfig from kfp_tekton_server_api.models.protobuf_any import ProtobufAny @@ -39,7 +41,6 @@ from kfp_tekton_server_api.models.v1_pipeline_version import V1PipelineVersion from kfp_tekton_server_api.models.v1_read_artifact_response import V1ReadArtifactResponse from kfp_tekton_server_api.models.v1_relationship import V1Relationship -from kfp_tekton_server_api.models.v1_report_run_metrics_request import V1ReportRunMetricsRequest from kfp_tekton_server_api.models.v1_report_run_metrics_response import V1ReportRunMetricsResponse from kfp_tekton_server_api.models.v1_resource_key import V1ResourceKey from kfp_tekton_server_api.models.v1_resource_reference import V1ResourceReference @@ -48,7 +49,6 @@ from kfp_tekton_server_api.models.v1_run_detail import V1RunDetail from kfp_tekton_server_api.models.v1_run_metric import V1RunMetric from kfp_tekton_server_api.models.v1_run_storage_state import V1RunStorageState -from kfp_tekton_server_api.models.v1_status import V1Status from kfp_tekton_server_api.models.v1_trigger import V1Trigger from kfp_tekton_server_api.models.v1_url import V1Url from kfp_tekton_server_api.models.v1_value import V1Value diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_status.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/googlerpc_status.py similarity index 67% rename from backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_status.py rename to backend/api/v1/python_http_client/kfp_tekton_server_api/models/googlerpc_status.py index 8018b5a84b..f2430f5c01 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_status.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/googlerpc_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -18,7 +18,7 @@ from kfp_tekton_server_api.configuration import Configuration -class V1Status(object): +class GooglerpcStatus(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,93 +33,93 @@ class V1Status(object): and the value is json key in definition. """ openapi_types = { - 'error': 'str', 'code': 'int', + 'message': 'str', 'details': 'list[ProtobufAny]' } attribute_map = { - 'error': 'error', 'code': 'code', + 'message': 'message', 'details': 'details' } - def __init__(self, error=None, code=None, details=None, local_vars_configuration=None): # noqa: E501 - """V1Status - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, code=None, message=None, details=None, local_vars_configuration=None): # noqa: E501 + """GooglerpcStatus - 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._message = None self._details = None self.discriminator = None - if error is not None: - self.error = error if code is not None: self.code = code + if message is not None: + self.message = message if details is not None: self.details = details @property - def error(self): - """Gets the error of this V1Status. # noqa: E501 + def code(self): + """Gets the code of this GooglerpcStatus. # noqa: E501 - :return: The error of this V1Status. # noqa: E501 - :rtype: str + :return: The code of this GooglerpcStatus. # noqa: E501 + :rtype: int """ - return self._error + return self._code - @error.setter - def error(self, error): - """Sets the error of this V1Status. + @code.setter + def code(self, code): + """Sets the code of this GooglerpcStatus. - :param error: The error of this V1Status. # noqa: E501 - :type error: str + :param code: The code of this GooglerpcStatus. # noqa: E501 + :type code: int """ - self._error = error + self._code = code @property - def code(self): - """Gets the code of this V1Status. # noqa: E501 + def message(self): + """Gets the message of this GooglerpcStatus. # noqa: E501 - :return: The code of this V1Status. # noqa: E501 - :rtype: int + :return: The message of this GooglerpcStatus. # noqa: E501 + :rtype: str """ - return self._code + return self._message - @code.setter - def code(self, code): - """Sets the code of this V1Status. + @message.setter + def message(self, message): + """Sets the message of this GooglerpcStatus. - :param code: The code of this V1Status. # noqa: E501 - :type code: int + :param message: The message of this GooglerpcStatus. # noqa: E501 + :type message: str """ - self._code = code + self._message = message @property def details(self): - """Gets the details of this V1Status. # noqa: E501 + """Gets the details of this GooglerpcStatus. # noqa: E501 - :return: The details of this V1Status. # noqa: E501 + :return: The details of this GooglerpcStatus. # noqa: E501 :rtype: list[ProtobufAny] """ return self._details @details.setter def details(self, details): - """Sets the details of this V1Status. + """Sets the details of this GooglerpcStatus. - :param details: The details of this V1Status. # noqa: E501 + :param details: The details of this GooglerpcStatus. # noqa: E501 :type details: list[ProtobufAny] """ @@ -159,14 +159,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, V1Status): + if not isinstance(other, GooglerpcStatus): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, V1Status): + if not isinstance(other, GooglerpcStatus): return True return self.to_dict() != other.to_dict() diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_report_run_metrics_request.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/inline_object.py similarity index 64% rename from backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_report_run_metrics_request.py rename to backend/api/v1/python_http_client/kfp_tekton_server_api/models/inline_object.py index dd804d9108..4c1d68b8a1 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_report_run_metrics_request.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/inline_object.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -18,7 +18,7 @@ from kfp_tekton_server_api.configuration import Configuration -class V1ReportRunMetricsRequest(object): +class InlineObject(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,71 +33,43 @@ class V1ReportRunMetricsRequest(object): and the value is json key in definition. """ openapi_types = { - 'run_id': 'str', 'metrics': 'list[V1RunMetric]' } attribute_map = { - 'run_id': 'run_id', 'metrics': 'metrics' } - def __init__(self, run_id=None, metrics=None, local_vars_configuration=None): # noqa: E501 - """V1ReportRunMetricsRequest - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, metrics=None, local_vars_configuration=None): # noqa: E501 + """InlineObject - 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 V1ReportRunMetricsRequest. # noqa: E501 - - Required. The parent run ID of the metric. # noqa: E501 - - :return: The run_id of this V1ReportRunMetricsRequest. # noqa: E501 - :rtype: str - """ - return self._run_id - - @run_id.setter - def run_id(self, run_id): - """Sets the run_id of this V1ReportRunMetricsRequest. - - Required. The parent run ID of the metric. # noqa: E501 - - :param run_id: The run_id of this V1ReportRunMetricsRequest. # noqa: E501 - :type run_id: str - """ - - self._run_id = run_id - @property def metrics(self): - """Gets the metrics of this V1ReportRunMetricsRequest. # noqa: E501 + """Gets the metrics of this InlineObject. # noqa: E501 List of metrics to report. # noqa: E501 - :return: The metrics of this V1ReportRunMetricsRequest. # noqa: E501 + :return: The metrics of this InlineObject. # noqa: E501 :rtype: list[V1RunMetric] """ return self._metrics @metrics.setter def metrics(self, metrics): - """Sets the metrics of this V1ReportRunMetricsRequest. + """Sets the metrics of this InlineObject. List of metrics to report. # noqa: E501 - :param metrics: The metrics of this V1ReportRunMetricsRequest. # noqa: E501 + :param metrics: The metrics of this InlineObject. # noqa: E501 :type metrics: list[V1RunMetric] """ @@ -137,14 +109,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, V1ReportRunMetricsRequest): + if not isinstance(other, InlineObject): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, V1ReportRunMetricsRequest): + if not isinstance(other, InlineObject): return True return self.to_dict() != other.to_dict() diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/job_mode.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/job_mode.py index 880571b7ab..5fdcf4c9c9 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/job_mode.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/job_mode.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/pipeline_spec_runtime_config.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/pipeline_spec_runtime_config.py index 6d57e28055..f52385fac8 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/pipeline_spec_runtime_config.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/pipeline_spec_runtime_config.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/protobuf_any.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/protobuf_any.py index 39eb163079..02d18ce071 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/protobuf_any.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/protobuf_any.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -33,78 +33,47 @@ class ProtobufAny(object): and the value is json key in definition. """ openapi_types = { - 'type_url': 'str', - 'value': 'str' + 'type': 'str' } attribute_map = { - 'type_url': 'type_url', - 'value': 'value' + 'type': '@type' } - def __init__(self, type_url=None, value=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, type=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._type = None self.discriminator = None - if type_url is not None: - self.type_url = type_url - if value is not None: - self.value = value + if type is not None: + self.type = type @property - def type_url(self): - """Gets the type_url of this ProtobufAny. # noqa: E501 + def type(self): + """Gets the type of this ProtobufAny. # noqa: E501 A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. 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 + :return: The type of this ProtobufAny. # noqa: E501 :rtype: str """ - return self._type_url + return self._type - @type_url.setter - def type_url(self, type_url): - """Sets the type_url of this ProtobufAny. + @type.setter + def type(self, type): + """Sets the type of this ProtobufAny. A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. 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 type_url: str + :param type: The type of this ProtobufAny. # noqa: E501 + :type 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 value: 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 + self._type = type def to_dict(self): """Returns the model properties as a dict""" diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/report_run_metrics_response_report_run_metric_result.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/report_run_metrics_response_report_run_metric_result.py index d6f3b5e4d1..f7109e5e12 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/report_run_metrics_response_report_run_metric_result.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/report_run_metrics_response_report_run_metric_result.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/report_run_metrics_response_report_run_metric_result_status.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/report_run_metrics_response_report_run_metric_result_status.py index 05d2e3718b..f0185be750 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/report_run_metrics_response_report_run_metric_result_status.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/report_run_metrics_response_report_run_metric_result_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/run_metric_format.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/run_metric_format.py index 3c5460cdb2..240dba0f75 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/run_metric_format.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/run_metric_format.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_cron_schedule.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_cron_schedule.py index edd3fc7d85..05048d12bc 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_cron_schedule.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_cron_schedule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_experiment.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_experiment.py index 104234382b..f2c225f8a9 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_experiment.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_experiment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_experiment_storage_state.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_experiment_storage_state.py index 7583ff5f27..8c6f6f545c 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_experiment_storage_state.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_experiment_storage_state.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_get_healthz_response.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_get_healthz_response.py index e6f1746572..19d54cfa90 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_get_healthz_response.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_get_healthz_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_get_template_response.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_get_template_response.py index 7a85a38242..2451e6dd5d 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_get_template_response.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_get_template_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_job.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_job.py index 3d367b28ac..6d683a842c 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_job.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_job.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_experiments_response.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_experiments_response.py index 832662e2c3..bd37785577 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_experiments_response.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_experiments_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_jobs_response.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_jobs_response.py index 122b1c93cc..2acb853635 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_jobs_response.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_jobs_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_pipeline_versions_response.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_pipeline_versions_response.py index 1b3508ccf2..96ef9cf264 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_pipeline_versions_response.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_pipeline_versions_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_pipelines_response.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_pipelines_response.py index d13f0efe94..8570bc1db6 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_pipelines_response.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_pipelines_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_runs_response.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_runs_response.py index eb9aa5c01d..cdde0c72f7 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_runs_response.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_list_runs_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_parameter.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_parameter.py index 8bc0622463..1ebb71549b 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_parameter.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_parameter.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_periodic_schedule.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_periodic_schedule.py index 1dfbf80990..27bbfc8f44 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_periodic_schedule.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_periodic_schedule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline.py index b8a8a8db96..89f15e3665 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_runtime.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_runtime.py index cf6ffaebc5..b87b5a0e19 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_runtime.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_runtime.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_spec.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_spec.py index f234f7bf20..54d9b954e9 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_spec.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_version.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_version.py index 25cbff010c..57d1b0eda8 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_version.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_pipeline_version.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_read_artifact_response.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_read_artifact_response.py index d576950690..1f13780032 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_read_artifact_response.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_read_artifact_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_relationship.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_relationship.py index 44c1ac2412..1a6ebd59fd 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_relationship.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_relationship.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_report_run_metrics_response.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_report_run_metrics_response.py index e0a94fe709..0c1d23abc4 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_report_run_metrics_response.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_report_run_metrics_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_key.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_key.py index 346b142a2d..8a35341bea 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_key.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_key.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_reference.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_reference.py index 4420952ccc..cbd5113fc1 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_reference.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_reference.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_type.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_type.py index 0b262173b2..4bafe35af0 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_type.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_resource_type.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run.py index 071b2083e5..930541e9a0 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_detail.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_detail.py index b51d7c0c49..a5947e8ce3 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_detail.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_detail.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_metric.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_metric.py index 4152d9a314..e49b1449e8 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_metric.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_metric.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_storage_state.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_storage_state.py index cd340b2708..5dd38a8147 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_storage_state.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_run_storage_state.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_trigger.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_trigger.py index 27e923ddbb..210c892fd6 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_trigger.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_trigger.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_url.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_url.py index fa5ef1dddc..825f42a26c 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_url.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_url.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_value.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_value.py index 040a92790c..69c10866a2 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_value.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/models/v1_value.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/kfp_tekton_server_api/rest.py b/backend/api/v1/python_http_client/kfp_tekton_server_api/rest.py index 2ba405a2e2..cd12eba067 100644 --- a/backend/api/v1/python_http_client/kfp_tekton_server_api/rest.py +++ b/backend/api/v1/python_http_client/kfp_tekton_server_api/rest.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/setup.py b/backend/api/v1/python_http_client/setup.py index 74a61df479..9f1b2da3f4 100644 --- a/backend/api/v1/python_http_client/setup.py +++ b/backend/api/v1/python_http_client/setup.py @@ -5,7 +5,7 @@ This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: tommy.chaoping.li@ibm.com Generated by: https://openapi-generator.tech """ @@ -13,7 +13,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "kfp-tekton-server-api" -VERSION = "1.5.0" +VERSION = "1.8.0rc8" # To install the library, run the following # # python setup.py install @@ -28,7 +28,7 @@ version=VERSION, description="Kubeflow Pipelines on Tekton API", author="kfp-tekton", - author_email="youremail", + author_email="tommy.chaoping.li@ibm.com", url="https://github.com/kubeflow/kfp-tekton", keywords=["OpenAPI", "OpenAPI-Generator", "Kubeflow Pipelines on Tekton API"], install_requires=REQUIRES, diff --git a/backend/api/v1/python_http_client/test/test_experiment_service_api.py b/backend/api/v1/python_http_client/test/test_experiment_service_api.py index 9bacdc3438..dd4a417f88 100644 --- a/backend/api/v1/python_http_client/test/test_experiment_service_api.py +++ b/backend/api/v1/python_http_client/test/test_experiment_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -28,43 +28,43 @@ def setUp(self): def tearDown(self): pass - def test_archive_experiment(self): - """Test case for archive_experiment + def test_experiment_service_archive_experiment(self): + """Test case for experiment_service_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 + def test_experiment_service_create_experiment(self): + """Test case for experiment_service_create_experiment Creates a new experiment. # noqa: E501 """ pass - def test_delete_experiment(self): - """Test case for delete_experiment + def test_experiment_service_delete_experiment(self): + """Test case for experiment_service_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 + def test_experiment_service_get_experiment(self): + """Test case for experiment_service_get_experiment Finds a specific experiment by ID. # noqa: E501 """ pass - def test_list_experiment(self): - """Test case for list_experiment + def test_experiment_service_list_experiment(self): + """Test case for experiment_service_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 + def test_experiment_service_unarchive_experiment(self): + """Test case for experiment_service_unarchive_experiment Restores an archived experiment. The experiment's archived runs and jobs will stay archived. # noqa: E501 """ diff --git a/backend/api/v1/python_http_client/test/test_v1_status.py b/backend/api/v1/python_http_client/test/test_googlerpc_status.py similarity index 57% rename from backend/api/v1/python_http_client/test/test_v1_status.py rename to backend/api/v1/python_http_client/test/test_googlerpc_status.py index 0975fd72e6..54017a2ca6 100644 --- a/backend/api/v1/python_http_client/test/test_v1_status.py +++ b/backend/api/v1/python_http_client/test/test_googlerpc_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -16,11 +16,11 @@ import datetime import kfp_tekton_server_api -from kfp_tekton_server_api.models.v1_status import V1Status # noqa: E501 +from kfp_tekton_server_api.models.googlerpc_status import GooglerpcStatus # noqa: E501 from kfp_tekton_server_api.rest import ApiException -class TestV1Status(unittest.TestCase): - """V1Status unit test stubs""" +class TestGooglerpcStatus(unittest.TestCase): + """GooglerpcStatus unit test stubs""" def setUp(self): pass @@ -29,27 +29,27 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test V1Status + """Test GooglerpcStatus include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = kfp_tekton_server_api.models.v1_status.V1Status() # noqa: E501 + # model = kfp_tekton_server_api.models.googlerpc_status.GooglerpcStatus() # noqa: E501 if include_optional : - return V1Status( - error = '0', + return GooglerpcStatus( code = 56, + message = '0', details = [ - kfp_tekton_server_api.models.protobuf_any.protobufAny( - type_url = '0', - value = 'YQ==', ) + { + 'key' : None + } ] ) else : - return V1Status( + return GooglerpcStatus( ) - def testV1Status(self): - """Test V1Status""" + def testGooglerpcStatus(self): + """Test GooglerpcStatus""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/backend/api/v1/python_http_client/test/test_healthz_service_api.py b/backend/api/v1/python_http_client/test/test_healthz_service_api.py index bff670efa3..36d01a4b63 100644 --- a/backend/api/v1/python_http_client/test/test_healthz_service_api.py +++ b/backend/api/v1/python_http_client/test/test_healthz_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -28,8 +28,8 @@ def setUp(self): def tearDown(self): pass - def test_get_healthz(self): - """Test case for get_healthz + def test_healthz_service_get_healthz(self): + """Test case for healthz_service_get_healthz Get healthz data. # noqa: E501 """ diff --git a/backend/api/v1/python_http_client/test/test_v1_report_run_metrics_request.py b/backend/api/v1/python_http_client/test/test_inline_object.py similarity index 61% rename from backend/api/v1/python_http_client/test/test_v1_report_run_metrics_request.py rename to backend/api/v1/python_http_client/test/test_inline_object.py index ddddd4dd07..4d54a04db2 100644 --- a/backend/api/v1/python_http_client/test/test_v1_report_run_metrics_request.py +++ b/backend/api/v1/python_http_client/test/test_inline_object.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -16,11 +16,11 @@ import datetime import kfp_tekton_server_api -from kfp_tekton_server_api.models.v1_report_run_metrics_request import V1ReportRunMetricsRequest # noqa: E501 +from kfp_tekton_server_api.models.inline_object import InlineObject # noqa: E501 from kfp_tekton_server_api.rest import ApiException -class TestV1ReportRunMetricsRequest(unittest.TestCase): - """V1ReportRunMetricsRequest unit test stubs""" +class TestInlineObject(unittest.TestCase): + """InlineObject unit test stubs""" def setUp(self): pass @@ -29,14 +29,13 @@ def tearDown(self): pass def make_instance(self, include_optional): - """Test V1ReportRunMetricsRequest + """Test InlineObject include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = kfp_tekton_server_api.models.v1_report_run_metrics_request.V1ReportRunMetricsRequest() # noqa: E501 + # model = kfp_tekton_server_api.models.inline_object.InlineObject() # noqa: E501 if include_optional : - return V1ReportRunMetricsRequest( - run_id = '0', + return InlineObject( metrics = [ kfp_tekton_server_api.models.v1_run_metric.v1RunMetric( name = '0', @@ -46,11 +45,11 @@ def make_instance(self, include_optional): ] ) else : - return V1ReportRunMetricsRequest( + return InlineObject( ) - def testV1ReportRunMetricsRequest(self): - """Test V1ReportRunMetricsRequest""" + def testInlineObject(self): + """Test InlineObject""" inst_req_only = self.make_instance(include_optional=False) inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/backend/api/v1/python_http_client/test/test_job_mode.py b/backend/api/v1/python_http_client/test/test_job_mode.py index a028214139..8dc4cd819d 100644 --- a/backend/api/v1/python_http_client/test/test_job_mode.py +++ b/backend/api/v1/python_http_client/test/test_job_mode.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_job_service_api.py b/backend/api/v1/python_http_client/test/test_job_service_api.py index 4af1e857db..467ad33cd7 100644 --- a/backend/api/v1/python_http_client/test/test_job_service_api.py +++ b/backend/api/v1/python_http_client/test/test_job_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -28,43 +28,43 @@ def setUp(self): def tearDown(self): pass - def test_create_job(self): - """Test case for create_job + def test_job_service_create_job(self): + """Test case for job_service_create_job Creates a new job. # noqa: E501 """ pass - def test_delete_job(self): - """Test case for delete_job + def test_job_service_delete_job(self): + """Test case for job_service_delete_job Deletes a job. # noqa: E501 """ pass - def test_disable_job(self): - """Test case for disable_job + def test_job_service_disable_job(self): + """Test case for job_service_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 + def test_job_service_enable_job(self): + """Test case for job_service_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 + def test_job_service_get_job(self): + """Test case for job_service_get_job Finds a specific job by ID. # noqa: E501 """ pass - def test_list_jobs(self): - """Test case for list_jobs + def test_job_service_list_jobs(self): + """Test case for job_service_list_jobs Finds all jobs. # noqa: E501 """ diff --git a/backend/api/v1/python_http_client/test/test_pipeline_service_api.py b/backend/api/v1/python_http_client/test/test_pipeline_service_api.py index b11fdf0364..3a3dda8833 100644 --- a/backend/api/v1/python_http_client/test/test_pipeline_service_api.py +++ b/backend/api/v1/python_http_client/test/test_pipeline_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -28,78 +28,78 @@ def setUp(self): def tearDown(self): pass - def test_create_pipeline(self): - """Test case for create_pipeline + def test_pipeline_service_create_pipeline(self): + """Test case for pipeline_service_create_pipeline Creates a pipeline. # noqa: E501 """ pass - def test_create_pipeline_version(self): - """Test case for create_pipeline_version + def test_pipeline_service_create_pipeline_version(self): + """Test case for pipeline_service_create_pipeline_version Adds a pipeline version to the specified pipeline. # noqa: E501 """ pass - def test_delete_pipeline(self): - """Test case for delete_pipeline + def test_pipeline_service_delete_pipeline(self): + """Test case for pipeline_service_delete_pipeline Deletes a pipeline and its pipeline versions. # noqa: E501 """ pass - def test_delete_pipeline_version(self): - """Test case for delete_pipeline_version + def test_pipeline_service_delete_pipeline_version(self): + """Test case for pipeline_service_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 + def test_pipeline_service_get_pipeline(self): + """Test case for pipeline_service_get_pipeline Finds a specific pipeline by ID. # noqa: E501 """ pass - def test_get_pipeline_version(self): - """Test case for get_pipeline_version + def test_pipeline_service_get_pipeline_version(self): + """Test case for pipeline_service_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 + def test_pipeline_service_get_pipeline_version_template(self): + """Test case for pipeline_service_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 + def test_pipeline_service_get_template(self): + """Test case for pipeline_service_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 + def test_pipeline_service_list_pipeline_versions(self): + """Test case for pipeline_service_list_pipeline_versions Lists all pipeline versions of a given pipeline. # noqa: E501 """ pass - def test_list_pipelines(self): - """Test case for list_pipelines + def test_pipeline_service_list_pipelines(self): + """Test case for pipeline_service_list_pipelines Finds all pipelines. # noqa: E501 """ pass - def test_update_pipeline_default_version(self): - """Test case for update_pipeline_default_version + def test_pipeline_service_update_pipeline_default_version(self): + """Test case for pipeline_service_update_pipeline_default_version Update the default pipeline version of a specific pipeline. # noqa: E501 """ diff --git a/backend/api/v1/python_http_client/test/test_pipeline_spec_runtime_config.py b/backend/api/v1/python_http_client/test/test_pipeline_spec_runtime_config.py index f07a1b9c5c..9a7525f2e3 100644 --- a/backend/api/v1/python_http_client/test/test_pipeline_spec_runtime_config.py +++ b/backend/api/v1/python_http_client/test/test_pipeline_spec_runtime_config.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_pipeline_upload_service_api.py b/backend/api/v1/python_http_client/test/test_pipeline_upload_service_api.py index 4462c24d52..b411503844 100644 --- a/backend/api/v1/python_http_client/test/test_pipeline_upload_service_api.py +++ b/backend/api/v1/python_http_client/test/test_pipeline_upload_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -28,14 +28,14 @@ def setUp(self): def tearDown(self): pass - def test_upload_pipeline(self): - """Test case for upload_pipeline + def test_pipeline_service_upload_pipeline(self): + """Test case for pipeline_service_upload_pipeline """ pass - def test_upload_pipeline_version(self): - """Test case for upload_pipeline_version + def test_pipeline_service_upload_pipeline_version(self): + """Test case for pipeline_service_upload_pipeline_version """ pass diff --git a/backend/api/v1/python_http_client/test/test_protobuf_any.py b/backend/api/v1/python_http_client/test/test_protobuf_any.py index 48f3b06db2..4826a0f221 100644 --- a/backend/api/v1/python_http_client/test/test_protobuf_any.py +++ b/backend/api/v1/python_http_client/test/test_protobuf_any.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -36,8 +36,7 @@ def make_instance(self, include_optional): # model = kfp_tekton_server_api.models.protobuf_any.ProtobufAny() # noqa: E501 if include_optional : return ProtobufAny( - type_url = '0', - value = 'YQ==' + type = '0' ) else : return ProtobufAny( diff --git a/backend/api/v1/python_http_client/test/test_report_run_metrics_response_report_run_metric_result.py b/backend/api/v1/python_http_client/test/test_report_run_metrics_response_report_run_metric_result.py index a311b3fd31..cf733ce4db 100644 --- a/backend/api/v1/python_http_client/test/test_report_run_metrics_response_report_run_metric_result.py +++ b/backend/api/v1/python_http_client/test/test_report_run_metrics_response_report_run_metric_result.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_report_run_metrics_response_report_run_metric_result_status.py b/backend/api/v1/python_http_client/test/test_report_run_metrics_response_report_run_metric_result_status.py index 6cf9d77512..d80bd81710 100644 --- a/backend/api/v1/python_http_client/test/test_report_run_metrics_response_report_run_metric_result_status.py +++ b/backend/api/v1/python_http_client/test/test_report_run_metrics_response_report_run_metric_result_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_run_metric_format.py b/backend/api/v1/python_http_client/test/test_run_metric_format.py index 51641f5468..9b3bf2953f 100644 --- a/backend/api/v1/python_http_client/test/test_run_metric_format.py +++ b/backend/api/v1/python_http_client/test/test_run_metric_format.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_run_service_api.py b/backend/api/v1/python_http_client/test/test_run_service_api.py index f1c699d09e..50f03603b5 100644 --- a/backend/api/v1/python_http_client/test/test_run_service_api.py +++ b/backend/api/v1/python_http_client/test/test_run_service_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ @@ -28,71 +28,71 @@ def setUp(self): def tearDown(self): pass - def test_archive_run(self): - """Test case for archive_run + def test_run_service_archive_run(self): + """Test case for run_service_archive_run Archives a run. # noqa: E501 """ pass - def test_create_run(self): - """Test case for create_run + def test_run_service_create_run(self): + """Test case for run_service_create_run Creates a new run. # noqa: E501 """ pass - def test_delete_run(self): - """Test case for delete_run + def test_run_service_delete_run(self): + """Test case for run_service_delete_run Deletes a run. # noqa: E501 """ pass - def test_get_run(self): - """Test case for get_run + def test_run_service_get_run(self): + """Test case for run_service_get_run Finds a specific run by ID. # noqa: E501 """ pass - def test_list_runs(self): - """Test case for list_runs + def test_run_service_list_runs(self): + """Test case for run_service_list_runs Finds all runs. # noqa: E501 """ pass - def test_read_artifact(self): - """Test case for read_artifact + def test_run_service_read_artifact(self): + """Test case for run_service_read_artifact Finds a run's artifact data. # noqa: E501 """ pass - def test_report_run_metrics(self): - """Test case for report_run_metrics + def test_run_service_report_run_metrics(self): + """Test case for run_service_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 + def test_run_service_retry_run(self): + """Test case for run_service_retry_run Re-initiates a failed or terminated run. # noqa: E501 """ pass - def test_terminate_run(self): - """Test case for terminate_run + def test_run_service_terminate_run(self): + """Test case for run_service_terminate_run Terminates an active run. # noqa: E501 """ pass - def test_unarchive_run(self): - """Test case for unarchive_run + def test_run_service_unarchive_run(self): + """Test case for run_service_unarchive_run Restores an archived run. # noqa: E501 """ diff --git a/backend/api/v1/python_http_client/test/test_v1_cron_schedule.py b/backend/api/v1/python_http_client/test/test_v1_cron_schedule.py index 85825ea7bd..a74ea95f37 100644 --- a/backend/api/v1/python_http_client/test/test_v1_cron_schedule.py +++ b/backend/api/v1/python_http_client/test/test_v1_cron_schedule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_experiment.py b/backend/api/v1/python_http_client/test/test_v1_experiment.py index 3db9d7e7ed..38b13bde99 100644 --- a/backend/api/v1/python_http_client/test/test_v1_experiment.py +++ b/backend/api/v1/python_http_client/test/test_v1_experiment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_experiment_storage_state.py b/backend/api/v1/python_http_client/test/test_v1_experiment_storage_state.py index 0ade9bac8c..15208e85e9 100644 --- a/backend/api/v1/python_http_client/test/test_v1_experiment_storage_state.py +++ b/backend/api/v1/python_http_client/test/test_v1_experiment_storage_state.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_get_healthz_response.py b/backend/api/v1/python_http_client/test/test_v1_get_healthz_response.py index ae9dae6220..aeee37bfdb 100644 --- a/backend/api/v1/python_http_client/test/test_v1_get_healthz_response.py +++ b/backend/api/v1/python_http_client/test/test_v1_get_healthz_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_get_template_response.py b/backend/api/v1/python_http_client/test/test_v1_get_template_response.py index e940aa3896..6b1e2b1ccc 100644 --- a/backend/api/v1/python_http_client/test/test_v1_get_template_response.py +++ b/backend/api/v1/python_http_client/test/test_v1_get_template_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_job.py b/backend/api/v1/python_http_client/test/test_v1_job.py index 458451018b..15dd490f6b 100644 --- a/backend/api/v1/python_http_client/test/test_v1_job.py +++ b/backend/api/v1/python_http_client/test/test_v1_job.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_list_experiments_response.py b/backend/api/v1/python_http_client/test/test_v1_list_experiments_response.py index 2f67f3f097..28771c32c1 100644 --- a/backend/api/v1/python_http_client/test/test_v1_list_experiments_response.py +++ b/backend/api/v1/python_http_client/test/test_v1_list_experiments_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_list_jobs_response.py b/backend/api/v1/python_http_client/test/test_v1_list_jobs_response.py index 8bddb86b0d..4b1a42de16 100644 --- a/backend/api/v1/python_http_client/test/test_v1_list_jobs_response.py +++ b/backend/api/v1/python_http_client/test/test_v1_list_jobs_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_list_pipeline_versions_response.py b/backend/api/v1/python_http_client/test/test_v1_list_pipeline_versions_response.py index 7c995f7937..f66c95010f 100644 --- a/backend/api/v1/python_http_client/test/test_v1_list_pipeline_versions_response.py +++ b/backend/api/v1/python_http_client/test/test_v1_list_pipeline_versions_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_list_pipelines_response.py b/backend/api/v1/python_http_client/test/test_v1_list_pipelines_response.py index ce66e23950..0d28113a02 100644 --- a/backend/api/v1/python_http_client/test/test_v1_list_pipelines_response.py +++ b/backend/api/v1/python_http_client/test/test_v1_list_pipelines_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_list_runs_response.py b/backend/api/v1/python_http_client/test/test_v1_list_runs_response.py index 9e50162ce2..c9aed592da 100644 --- a/backend/api/v1/python_http_client/test/test_v1_list_runs_response.py +++ b/backend/api/v1/python_http_client/test/test_v1_list_runs_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_parameter.py b/backend/api/v1/python_http_client/test/test_v1_parameter.py index f9fa318b57..384e210448 100644 --- a/backend/api/v1/python_http_client/test/test_v1_parameter.py +++ b/backend/api/v1/python_http_client/test/test_v1_parameter.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_periodic_schedule.py b/backend/api/v1/python_http_client/test/test_v1_periodic_schedule.py index 9cf0d37748..971534a790 100644 --- a/backend/api/v1/python_http_client/test/test_v1_periodic_schedule.py +++ b/backend/api/v1/python_http_client/test/test_v1_periodic_schedule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_pipeline.py b/backend/api/v1/python_http_client/test/test_v1_pipeline.py index cbf7173aaf..2ed32e642e 100644 --- a/backend/api/v1/python_http_client/test/test_v1_pipeline.py +++ b/backend/api/v1/python_http_client/test/test_v1_pipeline.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_pipeline_runtime.py b/backend/api/v1/python_http_client/test/test_v1_pipeline_runtime.py index 81e86c0552..cfab7b4c79 100644 --- a/backend/api/v1/python_http_client/test/test_v1_pipeline_runtime.py +++ b/backend/api/v1/python_http_client/test/test_v1_pipeline_runtime.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_pipeline_spec.py b/backend/api/v1/python_http_client/test/test_v1_pipeline_spec.py index 1e3d7c25ec..fe5b722c57 100644 --- a/backend/api/v1/python_http_client/test/test_v1_pipeline_spec.py +++ b/backend/api/v1/python_http_client/test/test_v1_pipeline_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_pipeline_version.py b/backend/api/v1/python_http_client/test/test_v1_pipeline_version.py index b3f051e880..246d30c700 100644 --- a/backend/api/v1/python_http_client/test/test_v1_pipeline_version.py +++ b/backend/api/v1/python_http_client/test/test_v1_pipeline_version.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_read_artifact_response.py b/backend/api/v1/python_http_client/test/test_v1_read_artifact_response.py index faccd02412..2d7cdf7257 100644 --- a/backend/api/v1/python_http_client/test/test_v1_read_artifact_response.py +++ b/backend/api/v1/python_http_client/test/test_v1_read_artifact_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_relationship.py b/backend/api/v1/python_http_client/test/test_v1_relationship.py index 3f27b8f69c..1a407d957d 100644 --- a/backend/api/v1/python_http_client/test/test_v1_relationship.py +++ b/backend/api/v1/python_http_client/test/test_v1_relationship.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_report_run_metrics_response.py b/backend/api/v1/python_http_client/test/test_v1_report_run_metrics_response.py index 6bc01c6966..da84e5a74b 100644 --- a/backend/api/v1/python_http_client/test/test_v1_report_run_metrics_response.py +++ b/backend/api/v1/python_http_client/test/test_v1_report_run_metrics_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_resource_key.py b/backend/api/v1/python_http_client/test/test_v1_resource_key.py index b5108cb3df..075573d8b0 100644 --- a/backend/api/v1/python_http_client/test/test_v1_resource_key.py +++ b/backend/api/v1/python_http_client/test/test_v1_resource_key.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_resource_reference.py b/backend/api/v1/python_http_client/test/test_v1_resource_reference.py index 6f901edf5b..ed988d461c 100644 --- a/backend/api/v1/python_http_client/test/test_v1_resource_reference.py +++ b/backend/api/v1/python_http_client/test/test_v1_resource_reference.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_resource_type.py b/backend/api/v1/python_http_client/test/test_v1_resource_type.py index 95e05771f5..a53d8601d8 100644 --- a/backend/api/v1/python_http_client/test/test_v1_resource_type.py +++ b/backend/api/v1/python_http_client/test/test_v1_resource_type.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_run.py b/backend/api/v1/python_http_client/test/test_v1_run.py index a3e85dbf36..5d651c3829 100644 --- a/backend/api/v1/python_http_client/test/test_v1_run.py +++ b/backend/api/v1/python_http_client/test/test_v1_run.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_run_detail.py b/backend/api/v1/python_http_client/test/test_v1_run_detail.py index 898f284dd1..eed42d9dd1 100644 --- a/backend/api/v1/python_http_client/test/test_v1_run_detail.py +++ b/backend/api/v1/python_http_client/test/test_v1_run_detail.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_run_metric.py b/backend/api/v1/python_http_client/test/test_v1_run_metric.py index 579f118a14..e337eba0dc 100644 --- a/backend/api/v1/python_http_client/test/test_v1_run_metric.py +++ b/backend/api/v1/python_http_client/test/test_v1_run_metric.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_run_storage_state.py b/backend/api/v1/python_http_client/test/test_v1_run_storage_state.py index 73ba5ed6ab..4d7715e2eb 100644 --- a/backend/api/v1/python_http_client/test/test_v1_run_storage_state.py +++ b/backend/api/v1/python_http_client/test/test_v1_run_storage_state.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_trigger.py b/backend/api/v1/python_http_client/test/test_v1_trigger.py index e598853784..9a442cfcc5 100644 --- a/backend/api/v1/python_http_client/test/test_v1_trigger.py +++ b/backend/api/v1/python_http_client/test/test_v1_trigger.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_url.py b/backend/api/v1/python_http_client/test/test_v1_url.py index 265b9f6976..7357bd6f3d 100644 --- a/backend/api/v1/python_http_client/test/test_v1_url.py +++ b/backend/api/v1/python_http_client/test/test_v1_url.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/python_http_client/test/test_v1_value.py b/backend/api/v1/python_http_client/test/test_v1_value.py index c0329b11a9..67d982349a 100644 --- a/backend/api/v1/python_http_client/test/test_v1_value.py +++ b/backend/api/v1/python_http_client/test/test_v1_value.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - Kubeflow Pipelines on Tekton API + Kubeflow Pipelines API - This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition. + This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition. - Contact: prashsh1@in.ibm.com + Contact: kubeflow-pipelines@google.com Generated by: https://openapi-generator.tech """ diff --git a/backend/api/v1/report.proto b/backend/api/v1/report.proto index 32fbbf2162..bf7489661c 100644 --- a/backend/api/v1/report.proto +++ b/backend/api/v1/report.proto @@ -43,5 +43,5 @@ message ReportWorkflowRequest{ message ReportScheduledWorkflowRequest{ // ScheduledWorkflow a ScheduledWorkflow resource marshalled into a json string. - string scheduled_workflow = 1; + string scheduled_workflow = 1 [json_name = "scheduled_workflow"]; } diff --git a/backend/api/v1/run.proto b/backend/api/v1/run.proto index c131d6f9a4..7fb98443e1 100644 --- a/backend/api/v1/run.proto +++ b/backend/api/v1/run.proto @@ -23,9 +23,9 @@ import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "backend/api/v1/pipeline_spec.proto"; import "backend/api/v1/resource_reference.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { responses: { key: "default"; value: { @@ -144,28 +144,28 @@ message CreateRunRequest { message GetRunRequest { // The ID of the run to be retrieved. - string run_id = 1; + string run_id = 1 [json_name = "run_id"]; } message ListRunsRequest { // 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. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // 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. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // (Example, "name asc" or "id desc"). Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // What resource reference to filter on. // E.g. If listing run for an experiment, the query string would be // resource_reference_key.type=EXPERIMENT&resource_reference_key.id=123 - ResourceKey resource_reference_key = 4; + ResourceKey resource_reference_key = 4 [json_name = "resource_reference_key"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). @@ -174,22 +174,22 @@ message ListRunsRequest { message TerminateRunRequest { // The ID of the run to be terminated. - string run_id = 1; + string run_id = 1 [json_name = "run_id"]; } message RetryRunRequest { // The ID of the run to be retried. - string run_id = 1; + string run_id = 1 [json_name = "run_id"]; } message ListRunsResponse { repeated Run runs = 1; // The total number of runs for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; // The token to list the next page of runs. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; } message ArchiveRunRequest { @@ -221,34 +221,34 @@ message Run { } // Output. Specify whether this run is in archived or available mode. - StorageState storage_state = 10; + StorageState storage_state = 10 [json_name = "storage_state"]; // Optional input field. Describing the purpose of the run string description = 3; // Required input field. // Describing what the pipeline manifest and parameters to use for the run. - PipelineSpec pipeline_spec = 4; + PipelineSpec pipeline_spec = 4 [json_name = "pipeline_spec"]; // 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. - repeated ResourceReference resource_references = 5; + repeated ResourceReference resource_references = 5 [json_name = "resource_references"]; // Optional input field. Specify which Kubernetes service account this run uses. - string service_account = 14; + string service_account = 14 [json_name = "service_account"]; // Output. The time that the run created. - google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp created_at = 6 [json_name = "created_at"]; // 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. - google.protobuf.Timestamp scheduled_at = 7; + google.protobuf.Timestamp scheduled_at = 7 [json_name = "scheduled_at"]; // Output. The time this run is finished. - google.protobuf.Timestamp finished_at = 13; + google.protobuf.Timestamp finished_at = 13 [json_name = "finished_at"]; // Output. The status of the run. // One of [Pending, Running, Succeeded, Skipped, Failed, Error] @@ -268,16 +268,16 @@ message Run { message PipelineRuntime { // Output. The runtime JSON manifest of the pipeline, including the status // of pipeline steps and fields need for UI visualization etc. - string pipeline_manifest = 10; + string pipeline_manifest = 10 [json_name = "pipeline_manifest"]; // Output. The runtime JSON manifest of the argo workflow. // This is deprecated after pipeline_runtime_manifest is in use. - string workflow_manifest = 11; + string workflow_manifest = 11 [json_name = "workflow_manifest"]; } message RunDetail { Run run = 1; - PipelineRuntime pipeline_runtime = 2; + PipelineRuntime pipeline_runtime = 2 [json_name = "pipeline_runtime"]; } message RunMetric { @@ -290,11 +290,11 @@ message RunMetric { // 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. - string node_id = 2; + string node_id = 2 [json_name = "node_id"]; oneof value { // The number value of the metric. - double number_value = 3; + double number_value = 3 [json_name = "number_value"]; } enum Format { @@ -320,10 +320,10 @@ message ReportRunMetricsRequest { message ReportRunMetricsResponse { message ReportRunMetricResult { // Output. The name of the metric. - string metric_name = 1; + string metric_name = 1 [json_name = "metric_name"]; // Output. The ID of the node which reports the metric. - string metric_node_id = 2; + string metric_node_id = 2 [json_name = "metric_node_id"]; enum Status { // Default value if not present. @@ -348,11 +348,11 @@ message ReportRunMetricsResponse { message ReadArtifactRequest { // The ID of the run. - string run_id = 1; + string run_id = 1 [json_name = "run_id"]; // The ID of the running node. - string node_id = 2; + string node_id = 2 [json_name = "node_id"]; // The name of the artifact. - string artifact_name = 3; + string artifact_name = 3 [json_name = "artifact_name"]; } message ReadArtifactResponse { diff --git a/backend/api/v1/swagger/auth.swagger.json b/backend/api/v1/swagger/auth.swagger.json index f9d7853799..df740ac68e 100644 --- a/backend/api/v1/swagger/auth.swagger.json +++ b/backend/api/v1/swagger/auth.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/auth.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "AuthService" + } ], "consumes": [ "application/json" @@ -17,18 +18,19 @@ "paths": { "/apis/v1/auth": { "get": { - "operationId": "Authorize", + "operationId": "AuthService_Authorize", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -91,31 +93,16 @@ "default": "UNASSIGNED_VERB", "description": "Type of verbs that act on the resources." }, - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "v1Status": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" }, + "message": { + "type": "string" + }, "details": { "type": "array", "items": { @@ -123,6 +110,17 @@ } } } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } }, "securityDefinitions": { diff --git a/backend/api/v1/swagger/error.swagger.json b/backend/api/v1/swagger/error.swagger.json index f7dbd82cdb..0dd07f52ba 100644 --- a/backend/api/v1/swagger/error.swagger.json +++ b/backend/api/v1/swagger/error.swagger.json @@ -4,10 +4,6 @@ "title": "backend/api/v1/error.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" - ], "consumes": [ "application/json" ], @@ -15,5 +11,35 @@ "application/json" ], "paths": {}, - "definitions": {} + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + } + } } diff --git a/backend/api/v1/swagger/experiment.swagger.json b/backend/api/v1/swagger/experiment.swagger.json index 2da65eedde..bce0e75b3e 100644 --- a/backend/api/v1/swagger/experiment.swagger.json +++ b/backend/api/v1/swagger/experiment.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/experiment.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "ExperimentService" + } ], "consumes": [ "application/json" @@ -18,7 +19,7 @@ "/apis/v1/experiments": { "get": { "summary": "Finds all experiments. Supports pagination, and sorting on certain fields.", - "operationId": "ListExperiment", + "operationId": "ExperimentService_ListExperiment", "responses": { "200": { "description": "A successful response.", @@ -27,9 +28,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -93,7 +94,7 @@ }, "post": { "summary": "Creates a new experiment.", - "operationId": "CreateExperiment", + "operationId": "ExperimentService_CreateExperiment", "responses": { "200": { "description": "A successful response.", @@ -102,15 +103,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "experiment", "description": "The experiment to be created.", "in": "body", "required": true, @@ -127,7 +128,7 @@ "/apis/v1/experiments/{id}": { "get": { "summary": "Finds a specific experiment by ID.", - "operationId": "GetExperiment", + "operationId": "ExperimentService_GetExperiment", "responses": { "200": { "description": "A successful response.", @@ -136,9 +137,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -157,18 +158,19 @@ }, "delete": { "summary": "Deletes an experiment without deleting the experiment's runs and jobs. To\navoid unexpected behaviors, delete an experiment's runs and jobs before\ndeleting the experiment.", - "operationId": "DeleteExperiment", + "operationId": "ExperimentService_DeleteExperiment", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -189,18 +191,19 @@ "/apis/v1/experiments/{id}:archive": { "post": { "summary": "Archives an experiment and the experiment's runs and jobs.", - "operationId": "ArchiveExperiment", + "operationId": "ExperimentService_ArchiveExperiment", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -221,18 +224,19 @@ "/apis/v1/experiments/{id}:unarchive": { "post": { "summary": "Restores an archived experiment. The experiment's archived runs and jobs\nwill stay archived.", - "operationId": "UnarchiveExperiment", + "operationId": "ExperimentService_UnarchiveExperiment", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -252,19 +256,33 @@ } }, "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." } }, + "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v1Experiment": { @@ -379,24 +397,6 @@ "NAMESPACE" ], "default": "UNKNOWN_RESOURCE_TYPE" - }, - "v1Status": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } } }, "securityDefinitions": { diff --git a/backend/api/v1/swagger/filter.swagger.json b/backend/api/v1/swagger/filter.swagger.json index 8afdf76145..f616577efa 100644 --- a/backend/api/v1/swagger/filter.swagger.json +++ b/backend/api/v1/swagger/filter.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/filter.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "DummyFilterService" + } ], "consumes": [ "application/json" @@ -32,6 +33,35 @@ "default": "UNKNOWN", "description": "Op is the operation to apply.\n\n - EQUALS: Operators on scalar values. Only applies to one of |int_value|,\n|long_value|, |string_value| or |timestamp_value|.\n - IN: Checks if the value is a member of a given array, which should be one of\n|int_values|, |long_values| or |string_values|.\n - IS_SUBSTRING: Checks if the value contains |string_value| as a substring match. Only\napplies to |string_value|." }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, "v1Filter": { "type": "object", "properties": { diff --git a/backend/api/v1/swagger/healthz.swagger.json b/backend/api/v1/swagger/healthz.swagger.json index e602dfd715..c41cd8273b 100644 --- a/backend/api/v1/swagger/healthz.swagger.json +++ b/backend/api/v1/swagger/healthz.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/healthz.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "HealthzService" + } ], "consumes": [ "application/json" @@ -18,7 +19,7 @@ "/apis/v1/healthz": { "get": { "summary": "Get healthz data.", - "operationId": "GetHealthz", + "operationId": "HealthzService_GetHealthz", "responses": { "200": { "description": "A successful response.", @@ -27,9 +28,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -40,19 +41,33 @@ } }, "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." } }, + "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v1GetHealthzResponse": { @@ -60,28 +75,9 @@ "properties": { "multi_user": { "type": "boolean", - "format": "boolean", "title": "Returns if KFP in multi-user mode" } } - }, - "v1Status": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } } }, "securityDefinitions": { diff --git a/backend/api/v1/swagger/job.swagger.json b/backend/api/v1/swagger/job.swagger.json index d8e5c5d1d4..b65c64cf99 100644 --- a/backend/api/v1/swagger/job.swagger.json +++ b/backend/api/v1/swagger/job.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/job.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "JobService" + } ], "consumes": [ "application/json" @@ -18,7 +19,7 @@ "/apis/v1/jobs": { "get": { "summary": "Finds all jobs.", - "operationId": "ListJobs", + "operationId": "JobService_ListJobs", "responses": { "200": { "description": "A successful response.", @@ -27,9 +28,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -93,7 +94,7 @@ }, "post": { "summary": "Creates a new job.", - "operationId": "CreateJob", + "operationId": "JobService_CreateJob", "responses": { "200": { "description": "A successful response.", @@ -102,15 +103,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "job", "description": "The job to be created", "in": "body", "required": true, @@ -127,7 +128,7 @@ "/apis/v1/jobs/{id}": { "get": { "summary": "Finds a specific job by ID.", - "operationId": "GetJob", + "operationId": "JobService_GetJob", "responses": { "200": { "description": "A successful response.", @@ -136,9 +137,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -157,18 +158,19 @@ }, "delete": { "summary": "Deletes a job.", - "operationId": "DeleteJob", + "operationId": "JobService_DeleteJob", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -189,18 +191,19 @@ "/apis/v1/jobs/{id}/disable": { "post": { "summary": "Stops a job and all its associated runs. The job is not deleted.", - "operationId": "DisableJob", + "operationId": "JobService_DisableJob", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -221,18 +224,19 @@ "/apis/v1/jobs/{id}/enable": { "post": { "summary": "Restarts a job that was previously stopped. All runs associated with the job will continue.", - "operationId": "EnableJob", + "operationId": "JobService_EnableJob", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -279,19 +283,33 @@ }, "description": "The runtime config of a PipelineSpec." }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." } }, + "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v1CronSchedule": { @@ -376,12 +394,10 @@ }, "enabled": { "type": "boolean", - "format": "boolean", "description": "Input. Whether the job is enabled or not." }, "no_catchup": { "type": "boolean", - "format": "boolean", "description": "Optional input field. Whether the job should catch up if behind schedule.\nIf true, the job will only schedule the latest interval if behind schedule.\nIf false, the job will catch up on each past interval." } } @@ -521,24 +537,6 @@ ], "default": "UNKNOWN_RESOURCE_TYPE" }, - "v1Status": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, "v1Trigger": { "type": "object", "properties": { diff --git a/backend/api/v1/swagger/kfp_api_single_file.swagger.json b/backend/api/v1/swagger/kfp_api_single_file.swagger.json index fa0b7691d0..df05e54bb4 100644 --- a/backend/api/v1/swagger/kfp_api_single_file.swagger.json +++ b/backend/api/v1/swagger/kfp_api_single_file.swagger.json @@ -1,22 +1,23 @@ { "swagger": "2.0", "info": { - "title": "Kubeflow Pipelines on Tekton API", - "version": "1.5.0", - "description": "This file contains REST API specification for Kubeflow Pipelines on Tekton. The file is autogenerated from the swagger definition.", + "title": "Kubeflow Pipelines API", + "version": "1.8.0", + "description": "This file contains REST API specification for Kubeflow Pipelines. The file is autogenerated from the swagger definition.", "contact": { - "name": "kfp-tekton", - "email": "youremail", - "url": "https://github.com/kubeflow/kfp-tekton" + "name": "google", + "email": "kubeflow-pipelines@google.com", + "url": "https://www.google.com" }, "license": { "name": "Apache 2.0", - "url": "https://raw.githubusercontent.com/kubeflow/kfp-tekton/master/LICENSE" + "url": "https://raw.githubusercontent.com/kubeflow/pipelines/master/LICENSE" } }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "HealthzService" + } ], "consumes": [ "application/json" @@ -28,7 +29,7 @@ "/apis/v1/runs": { "get": { "summary": "Finds all runs.", - "operationId": "ListRuns", + "operationId": "RunService_ListRuns", "responses": { "200": { "description": "A successful response.", @@ -37,9 +38,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -103,7 +104,7 @@ }, "post": { "summary": "Creates a new run.", - "operationId": "CreateRun", + "operationId": "RunService_CreateRun", "responses": { "200": { "description": "A successful response.", @@ -112,15 +113,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "run", "in": "body", "required": true, "schema": { @@ -136,18 +137,19 @@ "/apis/v1/runs/{id}": { "delete": { "summary": "Deletes a run.", - "operationId": "DeleteRun", + "operationId": "RunService_DeleteRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -168,18 +170,19 @@ "/apis/v1/runs/{id}:archive": { "post": { "summary": "Archives a run.", - "operationId": "ArchiveRun", + "operationId": "RunService_ArchiveRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -200,18 +203,19 @@ "/apis/v1/runs/{id}:unarchive": { "post": { "summary": "Restores an archived run.", - "operationId": "UnarchiveRun", + "operationId": "RunService_UnarchiveRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -232,7 +236,7 @@ "/apis/v1/runs/{run_id}": { "get": { "summary": "Finds a specific run by ID.", - "operationId": "GetRun", + "operationId": "RunService_GetRun", "responses": { "200": { "description": "A successful response.", @@ -241,9 +245,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -264,7 +268,7 @@ "/apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read": { "get": { "summary": "Finds a run's artifact data.", - "operationId": "ReadArtifact", + "operationId": "RunService_ReadArtifact", "responses": { "200": { "description": "A successful response.", @@ -273,9 +277,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -310,18 +314,19 @@ "/apis/v1/runs/{run_id}/retry": { "post": { "summary": "Re-initiates a failed or terminated run.", - "operationId": "RetryRun", + "operationId": "RunService_RetryRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -342,18 +347,19 @@ "/apis/v1/runs/{run_id}/terminate": { "post": { "summary": "Terminates an active run.", - "operationId": "TerminateRun", + "operationId": "RunService_TerminateRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -374,7 +380,7 @@ "/apis/v1/runs/{run_id}:reportMetrics": { "post": { "summary": "ReportRunMetrics reports metrics of a run. Each metric is reported in its\nown transaction, so this API accepts partial failures. Metric can be\nuniquely identified by (run_id, node_id, name). Duplicate reporting will be\nignored by the API. First reporting wins.", - "operationId": "ReportRunMetrics", + "operationId": "RunService_ReportRunMetrics", "responses": { "200": { "description": "A successful response.", @@ -383,9 +389,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -402,7 +408,16 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1ReportRunMetricsRequest" + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1RunMetric" + }, + "description": "List of metrics to report." + } + } } } ], @@ -414,7 +429,7 @@ "/apis/v1/jobs": { "get": { "summary": "Finds all jobs.", - "operationId": "ListJobs", + "operationId": "JobService_ListJobs", "responses": { "200": { "description": "A successful response.", @@ -423,9 +438,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -489,7 +504,7 @@ }, "post": { "summary": "Creates a new job.", - "operationId": "CreateJob", + "operationId": "JobService_CreateJob", "responses": { "200": { "description": "A successful response.", @@ -498,15 +513,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "job", "description": "The job to be created", "in": "body", "required": true, @@ -523,7 +538,7 @@ "/apis/v1/jobs/{id}": { "get": { "summary": "Finds a specific job by ID.", - "operationId": "GetJob", + "operationId": "JobService_GetJob", "responses": { "200": { "description": "A successful response.", @@ -532,9 +547,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -553,18 +568,19 @@ }, "delete": { "summary": "Deletes a job.", - "operationId": "DeleteJob", + "operationId": "JobService_DeleteJob", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -585,18 +601,19 @@ "/apis/v1/jobs/{id}/disable": { "post": { "summary": "Stops a job and all its associated runs. The job is not deleted.", - "operationId": "DisableJob", + "operationId": "JobService_DisableJob", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -617,18 +634,19 @@ "/apis/v1/jobs/{id}/enable": { "post": { "summary": "Restarts a job that was previously stopped. All runs associated with the job will continue.", - "operationId": "EnableJob", + "operationId": "JobService_EnableJob", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -649,7 +667,7 @@ "/apis/v1/experiments": { "get": { "summary": "Finds all experiments. Supports pagination, and sorting on certain fields.", - "operationId": "ListExperiment", + "operationId": "ExperimentService_ListExperiment", "responses": { "200": { "description": "A successful response.", @@ -658,9 +676,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -724,7 +742,7 @@ }, "post": { "summary": "Creates a new experiment.", - "operationId": "CreateExperiment", + "operationId": "ExperimentService_CreateExperiment", "responses": { "200": { "description": "A successful response.", @@ -733,15 +751,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "experiment", "description": "The experiment to be created.", "in": "body", "required": true, @@ -758,7 +776,7 @@ "/apis/v1/experiments/{id}": { "get": { "summary": "Finds a specific experiment by ID.", - "operationId": "GetExperiment", + "operationId": "ExperimentService_GetExperiment", "responses": { "200": { "description": "A successful response.", @@ -767,9 +785,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -788,18 +806,19 @@ }, "delete": { "summary": "Deletes an experiment without deleting the experiment's runs and jobs. To\navoid unexpected behaviors, delete an experiment's runs and jobs before\ndeleting the experiment.", - "operationId": "DeleteExperiment", + "operationId": "ExperimentService_DeleteExperiment", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -820,18 +839,19 @@ "/apis/v1/experiments/{id}:archive": { "post": { "summary": "Archives an experiment and the experiment's runs and jobs.", - "operationId": "ArchiveExperiment", + "operationId": "ExperimentService_ArchiveExperiment", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -852,18 +872,19 @@ "/apis/v1/experiments/{id}:unarchive": { "post": { "summary": "Restores an archived experiment. The experiment's archived runs and jobs\nwill stay archived.", - "operationId": "UnarchiveExperiment", + "operationId": "ExperimentService_UnarchiveExperiment", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -884,7 +905,7 @@ "/apis/v1/pipeline_versions": { "get": { "summary": "Lists all pipeline versions of a given pipeline.", - "operationId": "ListPipelineVersions", + "operationId": "PipelineService_ListPipelineVersions", "responses": { "200": { "description": "A successful response.", @@ -893,9 +914,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -959,7 +980,7 @@ }, "post": { "summary": "Adds a pipeline version to the specified pipeline.", - "operationId": "CreatePipelineVersion", + "operationId": "PipelineService_CreatePipelineVersion", "responses": { "200": { "description": "A successful response.", @@ -968,15 +989,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "version", "description": "ResourceReference inside PipelineVersion specifies the pipeline that this\nversion belongs to.", "in": "body", "required": true, @@ -993,7 +1014,7 @@ "/apis/v1/pipeline_versions/{version_id}": { "get": { "summary": "Gets a pipeline version by pipeline version ID.", - "operationId": "GetPipelineVersion", + "operationId": "PipelineService_GetPipelineVersion", "responses": { "200": { "description": "A successful response.", @@ -1002,9 +1023,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1023,18 +1044,19 @@ }, "delete": { "summary": "Deletes a pipeline version by pipeline version ID. If the deleted pipeline\nversion is the default pipeline version, the pipeline's default version\nchanges to the pipeline's most recent pipeline version. If there are no\nremaining pipeline versions, the pipeline will have no default version.\nExamines the run_service_api.ipynb notebook to learn more about creating a\nrun using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb).", - "operationId": "DeletePipelineVersion", + "operationId": "PipelineService_DeletePipelineVersion", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1055,7 +1077,7 @@ "/apis/v1/pipeline_versions/{version_id}/templates": { "get": { "summary": "Returns a YAML template that contains the specified pipeline version's description, parameters and metadata.", - "operationId": "GetPipelineVersionTemplate", + "operationId": "PipelineService_GetPipelineVersionTemplate", "responses": { "200": { "description": "A successful response.", @@ -1064,9 +1086,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1087,7 +1109,7 @@ "/apis/v1/pipelines": { "get": { "summary": "Finds all pipelines.", - "operationId": "ListPipelines", + "operationId": "PipelineService_ListPipelines", "responses": { "200": { "description": "A successful response.", @@ -1096,9 +1118,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1162,7 +1184,7 @@ }, "post": { "summary": "Creates a pipeline.", - "operationId": "CreatePipeline", + "operationId": "PipelineService_CreatePipeline", "responses": { "200": { "description": "A successful response.", @@ -1171,15 +1193,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "pipeline", "in": "body", "required": true, "schema": { @@ -1195,7 +1217,7 @@ "/apis/v1/pipelines/{id}": { "get": { "summary": "Finds a specific pipeline by ID.", - "operationId": "GetPipeline", + "operationId": "PipelineService_GetPipeline", "responses": { "200": { "description": "A successful response.", @@ -1204,9 +1226,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1225,18 +1247,19 @@ }, "delete": { "summary": "Deletes a pipeline and its pipeline versions.", - "operationId": "DeletePipeline", + "operationId": "PipelineService_DeletePipeline", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1257,7 +1280,7 @@ "/apis/v1/pipelines/{id}/templates": { "get": { "summary": "Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided.", - "operationId": "GetTemplate", + "operationId": "PipelineService_GetTemplate", "responses": { "200": { "description": "A successful response.", @@ -1266,9 +1289,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1289,18 +1312,19 @@ "/apis/v1/pipelines/{pipeline_id}/default_version/{version_id}": { "post": { "summary": "Update the default pipeline version of a specific pipeline.", - "operationId": "UpdatePipelineDefaultVersion", + "operationId": "PipelineService_UpdatePipelineDefaultVersion", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1327,7 +1351,7 @@ }, "/apis/v1/pipelines/upload": { "post": { - "operationId": "UploadPipeline", + "operationId": "PipelineService_UploadPipeline", "consumes": [ "multipart/form-data" ], @@ -1342,9 +1366,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1376,7 +1400,7 @@ }, "/apis/v1/pipelines/upload_version": { "post": { - "operationId": "UploadPipelineVersion", + "operationId": "PipelineService_UploadPipelineVersion", "consumes": [ "multipart/form-data" ], @@ -1391,9 +1415,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1432,7 +1456,7 @@ "/apis/v1/healthz": { "get": { "summary": "Get healthz data.", - "operationId": "GetHealthz", + "operationId": "HealthzService_GetHealthz", "responses": { "200": { "description": "A successful response.", @@ -1441,9 +1465,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1514,19 +1538,33 @@ "default": "UNSPECIFIED", "description": " - UNSPECIFIED: Default value if not present.\n - RAW: Display value as its raw format.\n - PERCENTAGE: Display value in percentage format." }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." } }, + "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v1ListRunsResponse": { @@ -1624,22 +1662,6 @@ ], "default": "UNKNOWN_RELATIONSHIP" }, - "v1ReportRunMetricsRequest": { - "type": "object", - "properties": { - "run_id": { - "type": "string", - "description": "Required. The parent run ID of the metric." - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/v1RunMetric" - }, - "description": "List of metrics to report." - } - } - }, "v1ReportRunMetricsResponse": { "type": "object", "properties": { @@ -1799,24 +1821,6 @@ ], "default": "STORAGESTATE_AVAILABLE" }, - "v1Status": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, "v1Value": { "type": "object", "properties": { @@ -1929,12 +1933,10 @@ }, "enabled": { "type": "boolean", - "format": "boolean", "description": "Input. Whether the job is enabled or not." }, "no_catchup": { "type": "boolean", - "format": "boolean", "description": "Optional input field. Whether the job should catch up if behind schedule.\nIf true, the job will only schedule the latest interval if behind schedule.\nIf false, the job will catch up on each past interval." } } @@ -2212,7 +2214,6 @@ "properties": { "multi_user": { "type": "boolean", - "format": "boolean", "title": "Returns if KFP in multi-user mode" } } diff --git a/backend/api/v1/swagger/parameter.swagger.json b/backend/api/v1/swagger/parameter.swagger.json index 07abfd8a62..1d6bdbb66a 100644 --- a/backend/api/v1/swagger/parameter.swagger.json +++ b/backend/api/v1/swagger/parameter.swagger.json @@ -4,10 +4,6 @@ "title": "backend/api/v1/parameter.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" - ], "consumes": [ "application/json" ], @@ -15,5 +11,35 @@ "application/json" ], "paths": {}, - "definitions": {} + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + } + } } diff --git a/backend/api/v1/swagger/pipeline.swagger.json b/backend/api/v1/swagger/pipeline.swagger.json index c33241647b..59a5a80103 100644 --- a/backend/api/v1/swagger/pipeline.swagger.json +++ b/backend/api/v1/swagger/pipeline.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/pipeline.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "PipelineService" + } ], "consumes": [ "application/json" @@ -18,7 +19,7 @@ "/apis/v1/pipeline_versions": { "get": { "summary": "Lists all pipeline versions of a given pipeline.", - "operationId": "ListPipelineVersions", + "operationId": "PipelineService_ListPipelineVersions", "responses": { "200": { "description": "A successful response.", @@ -27,9 +28,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -93,7 +94,7 @@ }, "post": { "summary": "Adds a pipeline version to the specified pipeline.", - "operationId": "CreatePipelineVersion", + "operationId": "PipelineService_CreatePipelineVersion", "responses": { "200": { "description": "A successful response.", @@ -102,15 +103,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "version", "description": "ResourceReference inside PipelineVersion specifies the pipeline that this\nversion belongs to.", "in": "body", "required": true, @@ -127,7 +128,7 @@ "/apis/v1/pipeline_versions/{version_id}": { "get": { "summary": "Gets a pipeline version by pipeline version ID.", - "operationId": "GetPipelineVersion", + "operationId": "PipelineService_GetPipelineVersion", "responses": { "200": { "description": "A successful response.", @@ -136,9 +137,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -157,18 +158,19 @@ }, "delete": { "summary": "Deletes a pipeline version by pipeline version ID. If the deleted pipeline\nversion is the default pipeline version, the pipeline's default version\nchanges to the pipeline's most recent pipeline version. If there are no\nremaining pipeline versions, the pipeline will have no default version.\nExamines the run_service_api.ipynb notebook to learn more about creating a\nrun using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb).", - "operationId": "DeletePipelineVersion", + "operationId": "PipelineService_DeletePipelineVersion", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -189,7 +191,7 @@ "/apis/v1/pipeline_versions/{version_id}/templates": { "get": { "summary": "Returns a YAML template that contains the specified pipeline version's description, parameters and metadata.", - "operationId": "GetPipelineVersionTemplate", + "operationId": "PipelineService_GetPipelineVersionTemplate", "responses": { "200": { "description": "A successful response.", @@ -198,9 +200,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -221,7 +223,7 @@ "/apis/v1/pipelines": { "get": { "summary": "Finds all pipelines.", - "operationId": "ListPipelines", + "operationId": "PipelineService_ListPipelines", "responses": { "200": { "description": "A successful response.", @@ -230,9 +232,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -296,7 +298,7 @@ }, "post": { "summary": "Creates a pipeline.", - "operationId": "CreatePipeline", + "operationId": "PipelineService_CreatePipeline", "responses": { "200": { "description": "A successful response.", @@ -305,15 +307,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "pipeline", "in": "body", "required": true, "schema": { @@ -329,7 +331,7 @@ "/apis/v1/pipelines/{id}": { "get": { "summary": "Finds a specific pipeline by ID.", - "operationId": "GetPipeline", + "operationId": "PipelineService_GetPipeline", "responses": { "200": { "description": "A successful response.", @@ -338,9 +340,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -359,18 +361,19 @@ }, "delete": { "summary": "Deletes a pipeline and its pipeline versions.", - "operationId": "DeletePipeline", + "operationId": "PipelineService_DeletePipeline", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -391,7 +394,7 @@ "/apis/v1/pipelines/{id}/templates": { "get": { "summary": "Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided.", - "operationId": "GetTemplate", + "operationId": "PipelineService_GetTemplate", "responses": { "200": { "description": "A successful response.", @@ -400,9 +403,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -423,18 +426,19 @@ "/apis/v1/pipelines/{pipeline_id}/default_version/{version_id}": { "post": { "summary": "Update the default pipeline version of a specific pipeline.", - "operationId": "UpdatePipelineDefaultVersion", + "operationId": "PipelineService_UpdatePipelineDefaultVersion", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -461,19 +465,33 @@ } }, "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." } }, + "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v1GetTemplateResponse": { @@ -679,24 +697,6 @@ ], "default": "UNKNOWN_RESOURCE_TYPE" }, - "v1Status": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, "v1Url": { "type": "object", "properties": { diff --git a/backend/api/v1/swagger/pipeline.upload.swagger.json b/backend/api/v1/swagger/pipeline.upload.swagger.json index 99727644d2..f0cc3a6f30 100644 --- a/backend/api/v1/swagger/pipeline.upload.swagger.json +++ b/backend/api/v1/swagger/pipeline.upload.swagger.json @@ -4,14 +4,15 @@ "title": "pipeline upload", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "PipelineService" + } ], "paths": { "/apis/v1/pipelines/upload": { "post": { - "operationId": "UploadPipeline", + "operationId": "PipelineService_UploadPipeline", "consumes": [ "multipart/form-data" ], @@ -26,9 +27,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -60,7 +61,7 @@ }, "/apis/v1/pipelines/upload_version": { "post": { - "operationId": "UploadPipelineVersion", + "operationId": "PipelineService_UploadPipelineVersion", "consumes": [ "multipart/form-data" ], @@ -75,9 +76,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -244,16 +245,24 @@ ], "default": "UNKNOWN_RESOURCE_TYPE" }, - "v1Status": { + "v1Url": { "type": "object", "properties": { - "error": { + "pipeline_url": { "type": "string" - }, + } + } + }, + "googlerpcStatus": { + "type": "object", + "properties": { "code": { "type": "integer", "format": "int32" }, + "message": { + "type": "string" + }, "details": { "type": "array", "items": { @@ -262,27 +271,15 @@ } } }, - "v1Url": { - "type": "object", - "properties": { - "pipeline_url": { - "type": "string" - } - } - }, "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." } }, + "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } }, diff --git a/backend/api/v1/swagger/pipeline_spec.swagger.json b/backend/api/v1/swagger/pipeline_spec.swagger.json index b0f741010a..a242bf7bd3 100644 --- a/backend/api/v1/swagger/pipeline_spec.swagger.json +++ b/backend/api/v1/swagger/pipeline_spec.swagger.json @@ -4,10 +4,6 @@ "title": "backend/api/v1/pipeline_spec.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" - ], "consumes": [ "application/json" ], @@ -15,5 +11,35 @@ "application/json" ], "paths": {}, - "definitions": {} + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + } + } } diff --git a/backend/api/v1/swagger/report.swagger.json b/backend/api/v1/swagger/report.swagger.json index 47fc542483..60abb66b15 100644 --- a/backend/api/v1/swagger/report.swagger.json +++ b/backend/api/v1/swagger/report.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/report.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "ReportService" + } ], "consumes": [ "application/json" @@ -17,18 +18,25 @@ "paths": { "/apis/v1/scheduledworkflows": { "post": { - "operationId": "ReportScheduledWorkflow", + "operationId": "ReportService_ReportScheduledWorkflow", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ { - "name": "body", + "name": "scheduled_workflow", "description": "ScheduledWorkflow a ScheduledWorkflow resource marshalled into a json string.", "in": "body", "required": true, @@ -44,18 +52,25 @@ }, "/apis/v1/workflows": { "post": { - "operationId": "ReportWorkflow", + "operationId": "ReportService_ReportWorkflow", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ { - "name": "body", + "name": "workflow", "description": "Workflow is a workflow custom resource marshalled into a json string.", "in": "body", "required": true, @@ -70,5 +85,35 @@ } } }, - "definitions": {} + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + } + } } diff --git a/backend/api/v1/swagger/resource_reference.swagger.json b/backend/api/v1/swagger/resource_reference.swagger.json index 6d6710c29b..6bda41ac92 100644 --- a/backend/api/v1/swagger/resource_reference.swagger.json +++ b/backend/api/v1/swagger/resource_reference.swagger.json @@ -4,10 +4,6 @@ "title": "backend/api/v1/resource_reference.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" - ], "consumes": [ "application/json" ], @@ -15,5 +11,35 @@ "application/json" ], "paths": {}, - "definitions": {} + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + } + } } diff --git a/backend/api/v1/swagger/run.swagger.json b/backend/api/v1/swagger/run.swagger.json index 38cfdeecc6..387f6d8cc2 100644 --- a/backend/api/v1/swagger/run.swagger.json +++ b/backend/api/v1/swagger/run.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/run.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "RunService" + } ], "consumes": [ "application/json" @@ -18,7 +19,7 @@ "/apis/v1/runs": { "get": { "summary": "Finds all runs.", - "operationId": "ListRuns", + "operationId": "RunService_ListRuns", "responses": { "200": { "description": "A successful response.", @@ -27,9 +28,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -93,7 +94,7 @@ }, "post": { "summary": "Creates a new run.", - "operationId": "CreateRun", + "operationId": "RunService_CreateRun", "responses": { "200": { "description": "A successful response.", @@ -102,15 +103,15 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "run", "in": "body", "required": true, "schema": { @@ -126,18 +127,19 @@ "/apis/v1/runs/{id}": { "delete": { "summary": "Deletes a run.", - "operationId": "DeleteRun", + "operationId": "RunService_DeleteRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -158,18 +160,19 @@ "/apis/v1/runs/{id}:archive": { "post": { "summary": "Archives a run.", - "operationId": "ArchiveRun", + "operationId": "RunService_ArchiveRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -190,18 +193,19 @@ "/apis/v1/runs/{id}:unarchive": { "post": { "summary": "Restores an archived run.", - "operationId": "UnarchiveRun", + "operationId": "RunService_UnarchiveRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -222,7 +226,7 @@ "/apis/v1/runs/{run_id}": { "get": { "summary": "Finds a specific run by ID.", - "operationId": "GetRun", + "operationId": "RunService_GetRun", "responses": { "200": { "description": "A successful response.", @@ -231,9 +235,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -254,7 +258,7 @@ "/apis/v1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read": { "get": { "summary": "Finds a run's artifact data.", - "operationId": "ReadArtifact", + "operationId": "RunService_ReadArtifact", "responses": { "200": { "description": "A successful response.", @@ -263,9 +267,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -300,18 +304,19 @@ "/apis/v1/runs/{run_id}/retry": { "post": { "summary": "Re-initiates a failed or terminated run.", - "operationId": "RetryRun", + "operationId": "RunService_RetryRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -332,18 +337,19 @@ "/apis/v1/runs/{run_id}/terminate": { "post": { "summary": "Terminates an active run.", - "operationId": "TerminateRun", + "operationId": "RunService_TerminateRun", "responses": { "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -364,7 +370,7 @@ "/apis/v1/runs/{run_id}:reportMetrics": { "post": { "summary": "ReportRunMetrics reports metrics of a run. Each metric is reported in its\nown transaction, so this API accepts partial failures. Metric can be\nuniquely identified by (run_id, node_id, name). Duplicate reporting will be\nignored by the API. First reporting wins.", - "operationId": "ReportRunMetrics", + "operationId": "RunService_ReportRunMetrics", "responses": { "200": { "description": "A successful response.", @@ -373,9 +379,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -392,7 +398,16 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1ReportRunMetricsRequest" + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1RunMetric" + }, + "description": "List of metrics to report." + } + } } } ], @@ -463,19 +478,33 @@ "default": "UNSPECIFIED", "description": " - UNSPECIFIED: Default value if not present.\n - RAW: Display value as its raw format.\n - PERCENTAGE: Display value in percentage format." }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." } }, + "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v1ListRunsResponse": { @@ -573,22 +602,6 @@ ], "default": "UNKNOWN_RELATIONSHIP" }, - "v1ReportRunMetricsRequest": { - "type": "object", - "properties": { - "run_id": { - "type": "string", - "description": "Required. The parent run ID of the metric." - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/v1RunMetric" - }, - "description": "List of metrics to report." - } - } - }, "v1ReportRunMetricsResponse": { "type": "object", "properties": { @@ -748,24 +761,6 @@ ], "default": "STORAGESTATE_AVAILABLE" }, - "v1Status": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, "v1Value": { "type": "object", "properties": { diff --git a/backend/api/v1/swagger/task.swagger.json b/backend/api/v1/swagger/task.swagger.json index 2548f7f861..da902490ae 100644 --- a/backend/api/v1/swagger/task.swagger.json +++ b/backend/api/v1/swagger/task.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/task.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "TaskService" + } ], "consumes": [ "application/json" @@ -18,13 +19,19 @@ "/apis/v1/tasks": { "get": { "summary": "Finds all tasks. Supports pagination, and sorting on certain fields.", - "operationId": "ListTasks", + "operationId": "TaskService_ListTasks", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1ListTasksResponse" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ @@ -87,18 +94,24 @@ }, "post": { "summary": "Creates a new task.", - "operationId": "CreateTask", + "operationId": "TaskService_CreateTask", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1Task" } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } } }, "parameters": [ { - "name": "body", + "name": "task", "in": "body", "required": true, "schema": { @@ -113,6 +126,35 @@ } }, "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, "v1ListTasksResponse": { "type": "object", "properties": { diff --git a/backend/api/v1/swagger/visualization.swagger.json b/backend/api/v1/swagger/visualization.swagger.json index 8982a84aa9..ba9c44a1eb 100644 --- a/backend/api/v1/swagger/visualization.swagger.json +++ b/backend/api/v1/swagger/visualization.swagger.json @@ -4,9 +4,10 @@ "title": "backend/api/v1/visualization.proto", "version": "version not set" }, - "schemes": [ - "http", - "https" + "tags": [ + { + "name": "VisualizationService" + } ], "consumes": [ "application/json" @@ -17,7 +18,7 @@ "paths": { "/apis/v1/visualizations/{namespace}": { "post": { - "operationId": "CreateVisualization", + "operationId": "VisualizationService_CreateVisualization", "responses": { "200": { "description": "A successful response.", @@ -26,9 +27,9 @@ } }, "default": { - "description": "", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/v1Status" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -40,7 +41,7 @@ "type": "string" }, { - "name": "body", + "name": "visualization", "in": "body", "required": true, "schema": { @@ -55,31 +56,16 @@ } }, "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "v1Status": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" }, + "message": { + "type": "string" + }, "details": { "type": "array", "items": { @@ -88,6 +74,17 @@ } } }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, "v1Visualization": { "type": "object", "properties": { diff --git a/backend/api/v1/task.proto b/backend/api/v1/task.proto index f4d832febb..7b3f2eac0e 100644 --- a/backend/api/v1/task.proto +++ b/backend/api/v1/task.proto @@ -41,10 +41,10 @@ message Task { string mlmdExecutionID = 5; // Required input field. The time this task is created. - google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp created_at = 6 [json_name = "created_at"]; // Optional input field. The time this task is finished. - google.protobuf.Timestamp finished_at = 7; + google.protobuf.Timestamp finished_at = 7 [json_name = "finished_at"]; // Required input field. string fingerprint = 8; @@ -75,21 +75,21 @@ message ListTasksRequest { // 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. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // 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. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // What resource reference to filter on. // E.g. If listing tasks for an pipeline run, the query string would be // resource_reference_key.type="PIPELINE"&resource_reference_key.id=123 - ResourceKey resource_reference_key = 4; + ResourceKey resource_reference_key = 4 [json_name = "resource_reference_key"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1/filter.proto)). @@ -103,8 +103,8 @@ message ListTasksResponse { repeated Task tasks = 1; // The token to list the next page of experiments. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; // The total number of experiments for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; } diff --git a/backend/api/v1/visualization.proto b/backend/api/v1/visualization.proto index 133b6bdd0e..21954c51eb 100644 --- a/backend/api/v1/visualization.proto +++ b/backend/api/v1/visualization.proto @@ -19,9 +19,9 @@ package v1; import "google/api/annotations.proto"; import "backend/api/v1/error.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { responses: { key: "default"; value: { diff --git a/backend/src/apiserver/filter/filter.go b/backend/src/apiserver/filter/filter.go index 2283a31940..75b2ebef3d 100644 --- a/backend/src/apiserver/filter/filter.go +++ b/backend/src/apiserver/filter/filter.go @@ -64,7 +64,7 @@ type filterForMarshaling struct { // MarshalJSON implements JSON Marshaler for Filter. func (f *Filter) MarshalJSON() ([]byte, error) { - m := &jsonpb.Marshaler{} + m := &jsonpb.Marshaler{EnumsAsInts: false, OrigName: true} s, err := m.MarshalToString(f.filterProto) if err != nil { return nil, err diff --git a/backend/src/apiserver/filter/filter_test.go b/backend/src/apiserver/filter/filter_test.go index 91fa6eab0e..93fd47642f 100644 --- a/backend/src/apiserver/filter/filter_test.go +++ b/backend/src/apiserver/filter/filter_test.go @@ -2,9 +2,10 @@ package filter import ( "encoding/json" - "google.golang.org/protobuf/testing/protocmp" "testing" + "google.golang.org/protobuf/testing/protocmp" + "github.com/Masterminds/squirrel" "github.com/golang/protobuf/proto" "github.com/google/go-cmp/cmp" @@ -323,7 +324,7 @@ func TestMarshalJSON(t *testing.T) { eq: map[string][]interface{}{"name": {"SomeName"}}, } - want := `{"FilterProto":"{\"predicates\":[{\"op\":\"EQUALS\",\"key\":\"Name\",\"stringValue\":\"SomeName\"}]}","EQ":{"name":["SomeName"]},"NEQ":null,"GT":null,"GTE":null,"LT":null,"LTE":null,"IN":null,"SUBSTRING":null}` + want := `{"FilterProto":"{\"predicates\":[{\"op\":\"EQUALS\",\"key\":\"Name\",\"string_value\":\"SomeName\"}]}","EQ":{"name":["SomeName"]},"NEQ":null,"GT":null,"GTE":null,"LT":null,"LTE":null,"IN":null,"SUBSTRING":null}` got, err := json.Marshal(f) if err != nil || string(got) != want { @@ -332,7 +333,7 @@ func TestMarshalJSON(t *testing.T) { } func TestUnmarshalJSON(t *testing.T) { - in := `{"FilterProto":"{\"predicates\":[{\"op\":\"EQUALS\",\"key\":\"Name\",\"stringValue\":\"SomeName\"}]}","EQ":{"name":["SomeName"]},"NEQ":null,"GT":null,"GTE":null,"LT":null,"LTE":null,"IN":null,"SUBSTRING":null}` + in := `{"FilterProto":"{\"predicates\":[{\"op\":\"EQUALS\",\"key\":\"Name\",\"string_value\":\"SomeName\"}]}","EQ":{"name":["SomeName"]},"NEQ":null,"GT":null,"GTE":null,"LT":null,"LTE":null,"IN":null,"SUBSTRING":null}` want := &Filter{ filterProto: &api.Filter{ @@ -348,7 +349,7 @@ func TestUnmarshalJSON(t *testing.T) { got := &Filter{} err := json.Unmarshal([]byte(in), got) - if err != nil || !cmp.Equal(got, want, cmpopts.EquateEmpty(), protocmp.Transform(),cmp.AllowUnexported(Filter{})) { + if err != nil || !cmp.Equal(got, want, cmpopts.EquateEmpty(), protocmp.Transform(), cmp.AllowUnexported(Filter{})) { t.Errorf("json.Unmarshal(%+v):\nGot: %v, Error: %v\nWant:\n%+v, Error: nil\nDiff:%s\n", in, got, err, want, cmp.Diff(want, got, cmp.AllowUnexported(Filter{}))) } } diff --git a/backend/src/apiserver/main.go b/backend/src/apiserver/main.go index 60a1194cd6..aa0b5e7054 100644 --- a/backend/src/apiserver/main.go +++ b/backend/src/apiserver/main.go @@ -32,7 +32,7 @@ import ( "github.com/fsnotify/fsnotify" "github.com/golang/glog" "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" api "github.com/kubeflow/pipelines/backend/api/v1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" "github.com/kubeflow/pipelines/backend/src/apiserver/resource" diff --git a/backend/src/apiserver/server/list_request_util_test.go b/backend/src/apiserver/server/list_request_util_test.go index acd942c9e7..ce92e427b0 100644 --- a/backend/src/apiserver/server/list_request_util_test.go +++ b/backend/src/apiserver/server/list_request_util_test.go @@ -201,7 +201,7 @@ func TestParseAPIFilter_DecodesEncodedString(t *testing.T) { // the browser on the following JSON string: // {"predicates":[{"op":"EQUALS","key":"testkey","stringValue":"testvalue"}]} - in := "%7B%22predicates%22%3A%5B%7B%22op%22%3A%22EQUALS%22%2C%22key%22%3A%22testkey%22%2C%22stringValue%22%3A%22testvalue%22%7D%5D%7D" + in := "%7B%22predicates%22%3A%5B%7B%22op%22%3A%22EQUALS%22%2C%22key%22%3A%22testkey%22%2C%22string_value%22%3A%22testvalue%22%7D%5D%7D" // The above should correspond the following filter: want := &api.Filter{ diff --git a/backend/src/common/client/api_server/experiment_client.go b/backend/src/common/client/api_server/experiment_client.go index aa15aebc80..b1debe4fd4 100644 --- a/backend/src/common/client/api_server/experiment_client.go +++ b/backend/src/common/client/api_server/experiment_client.go @@ -14,12 +14,12 @@ import ( ) type ExperimentInterface interface { - Create(params *params.CreateExperimentParams) (*model.V1Experiment, error) - Get(params *params.GetExperimentParams) (*model.V1Experiment, error) - List(params *params.ListExperimentParams) ([]*model.V1Experiment, int, string, error) - ListAll(params *params.ListExperimentParams, maxResultSize int) ([]*model.V1Experiment, error) - Archive(params *params.ArchiveExperimentParams) error - Unarchive(params *params.UnarchiveExperimentParams) error + Create(params *params.ExperimentServiceCreateExperimentParams) (*model.V1Experiment, error) + Get(params *params.ExperimentServiceGetExperimentParams) (*model.V1Experiment, error) + List(params *params.ExperimentServiceListExperimentParams) ([]*model.V1Experiment, int, string, error) + ListAll(params *params.ExperimentServiceListExperimentParams, maxResultSize int) ([]*model.V1Experiment, error) + Archive(params *params.ExperimentServiceArchiveExperimentParams) error + Unarchive(params *params.ExperimentServiceUnarchiveExperimentParams) error } type ExperimentClient struct { @@ -42,7 +42,7 @@ func NewExperimentClient(clientConfig clientcmd.ClientConfig, debug bool) ( }, nil } -func (c *ExperimentClient) Create(parameters *params.CreateExperimentParams) (*model.V1Experiment, +func (c *ExperimentClient) Create(parameters *params.ExperimentServiceCreateExperimentParams) (*model.V1Experiment, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -50,23 +50,23 @@ func (c *ExperimentClient) Create(parameters *params.CreateExperimentParams) (*m // Make service call parameters.Context = ctx - response, err := c.apiClient.ExperimentService.CreateExperiment(parameters, PassThroughAuth) + response, err := c.apiClient.ExperimentService.ExperimentServiceCreateExperiment(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.CreateExperimentDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.ExperimentServiceCreateExperimentDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, - fmt.Sprintf("Failed to create experiment. Params: '%+v'. Body: '%+v'", parameters, parameters.Body), - fmt.Sprintf("Failed to create experiment '%v'", parameters.Body.Name)) + fmt.Sprintf("Failed to create experiment. Params: '%+v'. Body: '%+v'", parameters, parameters.Experiment), + fmt.Sprintf("Failed to create experiment '%v'", parameters.Experiment.Name)) } return response.Payload, nil } -func (c *ExperimentClient) Get(parameters *params.GetExperimentParams) (*model.V1Experiment, +func (c *ExperimentClient) Get(parameters *params.ExperimentServiceGetExperimentParams) (*model.V1Experiment, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -74,10 +74,10 @@ func (c *ExperimentClient) Get(parameters *params.GetExperimentParams) (*model.V // Make service call parameters.Context = ctx - response, err := c.apiClient.ExperimentService.GetExperiment(parameters, PassThroughAuth) + response, err := c.apiClient.ExperimentService.ExperimentServiceGetExperiment(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.GetExperimentDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.ExperimentServiceGetExperimentDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -90,7 +90,7 @@ func (c *ExperimentClient) Get(parameters *params.GetExperimentParams) (*model.V return response.Payload, nil } -func (c *ExperimentClient) List(parameters *params.ListExperimentParams) ( +func (c *ExperimentClient) List(parameters *params.ExperimentServiceListExperimentParams) ( []*model.V1Experiment, int, string, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -98,10 +98,10 @@ func (c *ExperimentClient) List(parameters *params.ListExperimentParams) ( // Make service call parameters.Context = ctx - response, err := c.apiClient.ExperimentService.ListExperiment(parameters, PassThroughAuth) + response, err := c.apiClient.ExperimentService.ExperimentServiceListExperiment(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.ListExperimentDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.ExperimentServiceListExperimentDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -114,17 +114,17 @@ func (c *ExperimentClient) List(parameters *params.ListExperimentParams) ( return response.Payload.Experiments, int(response.Payload.TotalSize), response.Payload.NextPageToken, nil } -func (c *ExperimentClient) Delete(parameters *params.DeleteExperimentParams) error { +func (c *ExperimentClient) Delete(parameters *params.ExperimentServiceDeleteExperimentParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.ExperimentService.DeleteExperiment(parameters, PassThroughAuth) + _, err := c.apiClient.ExperimentService.ExperimentServiceDeleteExperiment(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.DeleteExperimentDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.ExperimentServiceDeleteExperimentDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -137,12 +137,12 @@ func (c *ExperimentClient) Delete(parameters *params.DeleteExperimentParams) err return nil } -func (c *ExperimentClient) ListAll(parameters *params.ListExperimentParams, maxResultSize int) ( +func (c *ExperimentClient) ListAll(parameters *params.ExperimentServiceListExperimentParams, maxResultSize int) ( []*model.V1Experiment, error) { return listAllForExperiment(c, parameters, maxResultSize) } -func listAllForExperiment(client ExperimentInterface, parameters *params.ListExperimentParams, +func listAllForExperiment(client ExperimentInterface, parameters *params.ExperimentServiceListExperimentParams, maxResultSize int) ([]*model.V1Experiment, error) { if maxResultSize < 0 { maxResultSize = 0 @@ -167,18 +167,18 @@ func listAllForExperiment(client ExperimentInterface, parameters *params.ListExp return allResults, nil } -func (c *ExperimentClient) Archive(parameters *params.ArchiveExperimentParams) error { +func (c *ExperimentClient) Archive(parameters *params.ExperimentServiceArchiveExperimentParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.ExperimentService.ArchiveExperiment(parameters, PassThroughAuth) + _, err := c.apiClient.ExperimentService.ExperimentServiceArchiveExperiment(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.ArchiveExperimentDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.ExperimentServiceArchiveExperimentDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -191,18 +191,18 @@ func (c *ExperimentClient) Archive(parameters *params.ArchiveExperimentParams) e return nil } -func (c *ExperimentClient) Unarchive(parameters *params.UnarchiveExperimentParams) error { +func (c *ExperimentClient) Unarchive(parameters *params.ExperimentServiceUnarchiveExperimentParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.ExperimentService.UnarchiveExperiment(parameters, PassThroughAuth) + _, err := c.apiClient.ExperimentService.ExperimentServiceUnarchiveExperiment(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.UnarchiveExperimentDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.ExperimentServiceUnarchiveExperimentDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } diff --git a/backend/src/common/client/api_server/experiment_client_fake.go b/backend/src/common/client/api_server/experiment_client_fake.go index b2ddc8b5a6..a902dccfaa 100644 --- a/backend/src/common/client/api_server/experiment_client_fake.go +++ b/backend/src/common/client/api_server/experiment_client_fake.go @@ -28,17 +28,17 @@ func NewExperimentClientFake() *ExperimentClientFake { return &ExperimentClientFake{} } -func (c *ExperimentClientFake) Create(params *experimentparams.CreateExperimentParams) ( +func (c *ExperimentClientFake) Create(params *experimentparams.ExperimentServiceCreateExperimentParams) ( *experimentmodel.V1Experiment, error) { - switch params.Body.Name { + switch params.Experiment.Name { case ExperimentForClientErrorTest: return nil, fmt.Errorf(ClientErrorString) default: - return getDefaultExperiment("500", params.Body.Name), nil + return getDefaultExperiment("500", params.Experiment.Name), nil } } -func (c *ExperimentClientFake) Get(params *experimentparams.GetExperimentParams) ( +func (c *ExperimentClientFake) Get(params *experimentparams.ExperimentServiceGetExperimentParams) ( *experimentmodel.V1Experiment, error) { switch params.ID { case ExperimentForClientErrorTest: @@ -48,7 +48,7 @@ func (c *ExperimentClientFake) Get(params *experimentparams.GetExperimentParams) } } -func (c *ExperimentClientFake) List(params *experimentparams.ListExperimentParams) ( +func (c *ExperimentClientFake) List(params *experimentparams.ExperimentServiceListExperimentParams) ( []*experimentmodel.V1Experiment, int, string, error) { const ( FirstToken = "" @@ -76,15 +76,15 @@ func (c *ExperimentClientFake) List(params *experimentparams.ListExperimentParam } } -func (c *ExperimentClientFake) ListAll(params *experimentparams.ListExperimentParams, +func (c *ExperimentClientFake) ListAll(params *experimentparams.ExperimentServiceListExperimentParams, maxResultSize int) ([]*experimentmodel.V1Experiment, error) { return listAllForExperiment(c, params, maxResultSize) } -func (c *ExperimentClientFake) Archive(params *experimentparams.ArchiveExperimentParams) error { +func (c *ExperimentClientFake) Archive(params *experimentparams.ExperimentServiceArchiveExperimentParams) error { return nil } -func (c *ExperimentClientFake) Unarchive(params *experimentparams.UnarchiveExperimentParams) error { +func (c *ExperimentClientFake) Unarchive(params *experimentparams.ExperimentServiceUnarchiveExperimentParams) error { return nil } diff --git a/backend/src/common/client/api_server/job_client.go b/backend/src/common/client/api_server/job_client.go index 1fc98c6a87..a208d479ed 100644 --- a/backend/src/common/client/api_server/job_client.go +++ b/backend/src/common/client/api_server/job_client.go @@ -14,13 +14,13 @@ import ( ) type JobInterface interface { - Create(params *params.CreateJobParams) (*model.V1Job, error) - Get(params *params.GetJobParams) (*model.V1Job, error) - Delete(params *params.DeleteJobParams) error - Enable(params *params.EnableJobParams) error - Disable(params *params.DisableJobParams) error - List(params *params.ListJobsParams) ([]*model.V1Job, int, string, error) - ListAll(params *params.ListJobsParams, maxResultSize int) ([]*model.V1Job, error) + Create(params *params.JobServiceCreateJobParams) (*model.V1Job, error) + Get(params *params.JobServiceGetJobParams) (*model.V1Job, error) + Delete(params *params.JobServiceDeleteJobParams) error + Enable(params *params.JobServiceEnableJobParams) error + Disable(params *params.JobServiceDisableJobParams) error + List(params *params.JobServiceListJobsParams) ([]*model.V1Job, int, string, error) + ListAll(params *params.JobServiceListJobsParams, maxResultSize int) ([]*model.V1Job, error) } type JobClient struct { @@ -43,7 +43,7 @@ func NewJobClient(clientConfig clientcmd.ClientConfig, debug bool) ( }, nil } -func (c *JobClient) Create(parameters *params.CreateJobParams) (*model.V1Job, +func (c *JobClient) Create(parameters *params.JobServiceCreateJobParams) (*model.V1Job, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -51,23 +51,23 @@ func (c *JobClient) Create(parameters *params.CreateJobParams) (*model.V1Job, // Make service call parameters.Context = ctx - response, err := c.apiClient.JobService.CreateJob(parameters, PassThroughAuth) + response, err := c.apiClient.JobService.JobServiceCreateJob(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.CreateJobDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.JobServiceCreateJobDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, - fmt.Sprintf("Failed to create job. Params: '%+v'. Body: '%+v'", parameters, parameters.Body), - fmt.Sprintf("Failed to create job '%v'", parameters.Body.Name)) + fmt.Sprintf("Failed to create job. Params: '%+v'. Body: '%+v'", parameters, parameters.Job), + fmt.Sprintf("Failed to create job '%v'", parameters.Job.Name)) } return response.Payload, nil } -func (c *JobClient) Get(parameters *params.GetJobParams) (*model.V1Job, +func (c *JobClient) Get(parameters *params.JobServiceGetJobParams) (*model.V1Job, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -75,10 +75,10 @@ func (c *JobClient) Get(parameters *params.GetJobParams) (*model.V1Job, // Make service call parameters.Context = ctx - response, err := c.apiClient.JobService.GetJob(parameters, PassThroughAuth) + response, err := c.apiClient.JobService.JobServiceGetJob(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.GetJobDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.JobServiceGetJobDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -91,17 +91,17 @@ func (c *JobClient) Get(parameters *params.GetJobParams) (*model.V1Job, return response.Payload, nil } -func (c *JobClient) Delete(parameters *params.DeleteJobParams) error { +func (c *JobClient) Delete(parameters *params.JobServiceDeleteJobParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.JobService.DeleteJob(parameters, PassThroughAuth) + _, err := c.apiClient.JobService.JobServiceDeleteJob(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.DeleteJobDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.JobServiceDeleteJobDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -114,17 +114,17 @@ func (c *JobClient) Delete(parameters *params.DeleteJobParams) error { return nil } -func (c *JobClient) Enable(parameters *params.EnableJobParams) error { +func (c *JobClient) Enable(parameters *params.JobServiceEnableJobParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.JobService.EnableJob(parameters, PassThroughAuth) + _, err := c.apiClient.JobService.JobServiceEnableJob(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.EnableJobDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.JobServiceEnableJobDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -137,17 +137,17 @@ func (c *JobClient) Enable(parameters *params.EnableJobParams) error { return nil } -func (c *JobClient) Disable(parameters *params.DisableJobParams) error { +func (c *JobClient) Disable(parameters *params.JobServiceDisableJobParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.JobService.DisableJob(parameters, PassThroughAuth) + _, err := c.apiClient.JobService.JobServiceDisableJob(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.DisableJobDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.JobServiceDisableJobDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -160,7 +160,7 @@ func (c *JobClient) Disable(parameters *params.DisableJobParams) error { return nil } -func (c *JobClient) List(parameters *params.ListJobsParams) ( +func (c *JobClient) List(parameters *params.JobServiceListJobsParams) ( []*model.V1Job, int, string, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -168,10 +168,10 @@ func (c *JobClient) List(parameters *params.ListJobsParams) ( // Make service call parameters.Context = ctx - response, err := c.apiClient.JobService.ListJobs(parameters, PassThroughAuth) + response, err := c.apiClient.JobService.JobServiceListJobs(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.ListJobsDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.JobServiceListJobsDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -184,12 +184,12 @@ func (c *JobClient) List(parameters *params.ListJobsParams) ( return response.Payload.Jobs, int(response.Payload.TotalSize), response.Payload.NextPageToken, nil } -func (c *JobClient) ListAll(parameters *params.ListJobsParams, maxResultSize int) ( +func (c *JobClient) ListAll(parameters *params.JobServiceListJobsParams, maxResultSize int) ( []*model.V1Job, error) { return listAllForJob(c, parameters, maxResultSize) } -func listAllForJob(client JobInterface, parameters *params.ListJobsParams, +func listAllForJob(client JobInterface, parameters *params.JobServiceListJobsParams, maxResultSize int) ([]*model.V1Job, error) { if maxResultSize < 0 { maxResultSize = 0 diff --git a/backend/src/common/client/api_server/job_client_fake.go b/backend/src/common/client/api_server/job_client_fake.go index 7a5776eef5..e6a1bc3c9c 100644 --- a/backend/src/common/client/api_server/job_client_fake.go +++ b/backend/src/common/client/api_server/job_client_fake.go @@ -28,17 +28,17 @@ func NewJobClientFake() *JobClientFake { return &JobClientFake{} } -func (c *JobClientFake) Create(params *jobparams.CreateJobParams) ( +func (c *JobClientFake) Create(params *jobparams.JobServiceCreateJobParams) ( *jobmodel.V1Job, error) { - switch params.Body.Name { + switch params.Job.Name { case JobForClientErrorTest: return nil, fmt.Errorf(ClientErrorString) default: - return getDefaultJob("500", params.Body.Name), nil + return getDefaultJob("500", params.Job.Name), nil } } -func (c *JobClientFake) Get(params *jobparams.GetJobParams) ( +func (c *JobClientFake) Get(params *jobparams.JobServiceGetJobParams) ( *jobmodel.V1Job, error) { switch params.ID { case JobForClientErrorTest: @@ -48,7 +48,7 @@ func (c *JobClientFake) Get(params *jobparams.GetJobParams) ( } } -func (c *JobClientFake) Delete(params *jobparams.DeleteJobParams) error { +func (c *JobClientFake) Delete(params *jobparams.JobServiceDeleteJobParams) error { switch params.ID { case JobForClientErrorTest: return fmt.Errorf(ClientErrorString) @@ -57,7 +57,7 @@ func (c *JobClientFake) Delete(params *jobparams.DeleteJobParams) error { } } -func (c *JobClientFake) Enable(params *jobparams.EnableJobParams) error { +func (c *JobClientFake) Enable(params *jobparams.JobServiceEnableJobParams) error { switch params.ID { case JobForClientErrorTest: return fmt.Errorf(ClientErrorString) @@ -66,7 +66,7 @@ func (c *JobClientFake) Enable(params *jobparams.EnableJobParams) error { } } -func (c *JobClientFake) Disable(params *jobparams.DisableJobParams) error { +func (c *JobClientFake) Disable(params *jobparams.JobServiceDisableJobParams) error { switch params.ID { case JobForClientErrorTest: return fmt.Errorf(ClientErrorString) @@ -75,7 +75,7 @@ func (c *JobClientFake) Disable(params *jobparams.DisableJobParams) error { } } -func (c *JobClientFake) List(params *jobparams.ListJobsParams) ( +func (c *JobClientFake) List(params *jobparams.JobServiceListJobsParams) ( []*jobmodel.V1Job, int, string, error) { const ( FirstToken = "" @@ -103,7 +103,7 @@ func (c *JobClientFake) List(params *jobparams.ListJobsParams) ( } } -func (c *JobClientFake) ListAll(params *jobparams.ListJobsParams, +func (c *JobClientFake) ListAll(params *jobparams.JobServiceListJobsParams, maxResultSize int) ([]*jobmodel.V1Job, error) { return listAllForJob(c, params, maxResultSize) } diff --git a/backend/src/common/client/api_server/pipeline_client.go b/backend/src/common/client/api_server/pipeline_client.go index 913efa545e..479a613c5a 100644 --- a/backend/src/common/client/api_server/pipeline_client.go +++ b/backend/src/common/client/api_server/pipeline_client.go @@ -15,30 +15,30 @@ import ( ) type PipelineInterface interface { - Create(params *params.CreatePipelineParams) (*model.V1Pipeline, error) - Get(params *params.GetPipelineParams) (*model.V1Pipeline, error) - Delete(params *params.DeletePipelineParams) error - GetTemplate(params *params.GetTemplateParams) (template.Template, error) - List(params *params.ListPipelinesParams) ([]*model.V1Pipeline, int, string, error) - ListAll(params *params.ListPipelinesParams, maxResultSize int) ( + Create(params *params.PipelineServiceCreatePipelineParams) (*model.V1Pipeline, error) + Get(params *params.PipelineServiceGetPipelineParams) (*model.V1Pipeline, error) + Delete(params *params.PipelineServiceDeletePipelineParams) error + GetTemplate(params *params.PipelineServiceGetTemplateParams) (template.Template, error) + List(params *params.PipelineServiceListPipelinesParams) ([]*model.V1Pipeline, int, string, error) + ListAll(params *params.PipelineServiceListPipelinesParams, maxResultSize int) ( []*model.V1Pipeline, error) - UpdateDefaultVersion(params *params.UpdatePipelineDefaultVersionParams) error + UpdateDefaultVersion(params *params.PipelineServiceUpdatePipelineDefaultVersionParams) error } type PipelineClient struct { apiClient *apiclient.Pipeline } -func (c *PipelineClient) UpdateDefaultVersion(parameters *params.UpdatePipelineDefaultVersionParams) error { +func (c *PipelineClient) UpdateDefaultVersion(parameters *params.PipelineServiceUpdatePipelineDefaultVersionParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.PipelineService.UpdatePipelineDefaultVersion(parameters, PassThroughAuth) + _, err := c.apiClient.PipelineService.PipelineServiceUpdatePipelineDefaultVersion(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.GetPipelineDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceGetPipelineDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -67,30 +67,30 @@ func NewPipelineClient(clientConfig clientcmd.ClientConfig, debug bool) ( }, nil } -func (c *PipelineClient) Create(parameters *params.CreatePipelineParams) (*model.V1Pipeline, +func (c *PipelineClient) Create(parameters *params.PipelineServiceCreatePipelineParams) (*model.V1Pipeline, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() parameters.Context = ctx - response, err := c.apiClient.PipelineService.CreatePipeline(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineService.PipelineServiceCreatePipeline(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.CreatePipelineDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceCreatePipelineDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, fmt.Sprintf("Failed to create pipeline. Params: '%v'", parameters), - fmt.Sprintf("Failed to create pipeline from URL '%v'", parameters.Body.URL.PipelineURL)) + fmt.Sprintf("Failed to create pipeline from URL '%v'", parameters.Pipeline.URL.PipelineURL)) } return response.Payload, nil } -func (c *PipelineClient) Get(parameters *params.GetPipelineParams) (*model.V1Pipeline, +func (c *PipelineClient) Get(parameters *params.PipelineServiceGetPipelineParams) (*model.V1Pipeline, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -98,10 +98,10 @@ func (c *PipelineClient) Get(parameters *params.GetPipelineParams) (*model.V1Pip // Make service call parameters.Context = ctx - response, err := c.apiClient.PipelineService.GetPipeline(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineService.PipelineServiceGetPipeline(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.GetPipelineDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceGetPipelineDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -114,17 +114,17 @@ func (c *PipelineClient) Get(parameters *params.GetPipelineParams) (*model.V1Pip return response.Payload, nil } -func (c *PipelineClient) Delete(parameters *params.DeletePipelineParams) error { +func (c *PipelineClient) Delete(parameters *params.PipelineServiceDeletePipelineParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.PipelineService.DeletePipeline(parameters, PassThroughAuth) + _, err := c.apiClient.PipelineService.PipelineServiceDeletePipeline(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.DeletePipelineDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceDeletePipelineDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -137,17 +137,17 @@ func (c *PipelineClient) Delete(parameters *params.DeletePipelineParams) error { return nil } -func (c *PipelineClient) GetTemplate(parameters *params.GetTemplateParams) (template.Template, error) { +func (c *PipelineClient) GetTemplate(parameters *params.PipelineServiceGetTemplateParams) (template.Template, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - response, err := c.apiClient.PipelineService.GetTemplate(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineService.PipelineServiceGetTemplate(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.GetTemplateDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceGetTemplateDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -161,7 +161,7 @@ func (c *PipelineClient) GetTemplate(parameters *params.GetTemplateParams) (temp return template.New([]byte(response.Payload.Template)) } -func (c *PipelineClient) List(parameters *params.ListPipelinesParams) ( +func (c *PipelineClient) List(parameters *params.PipelineServiceListPipelinesParams) ( []*model.V1Pipeline, int, string, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -169,10 +169,10 @@ func (c *PipelineClient) List(parameters *params.ListPipelinesParams) ( // Make service call parameters.Context = ctx - response, err := c.apiClient.PipelineService.ListPipelines(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineService.PipelineServiceListPipelines(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.ListPipelinesDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceListPipelinesDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -185,12 +185,12 @@ func (c *PipelineClient) List(parameters *params.ListPipelinesParams) ( return response.Payload.Pipelines, int(response.Payload.TotalSize), response.Payload.NextPageToken, nil } -func (c *PipelineClient) ListAll(parameters *params.ListPipelinesParams, maxResultSize int) ( +func (c *PipelineClient) ListAll(parameters *params.PipelineServiceListPipelinesParams, maxResultSize int) ( []*model.V1Pipeline, error) { return listAllForPipeline(c, parameters, maxResultSize) } -func listAllForPipeline(client PipelineInterface, parameters *params.ListPipelinesParams, +func listAllForPipeline(client PipelineInterface, parameters *params.PipelineServiceListPipelinesParams, maxResultSize int) ([]*model.V1Pipeline, error) { if maxResultSize < 0 { maxResultSize = 0 @@ -215,30 +215,30 @@ func listAllForPipeline(client PipelineInterface, parameters *params.ListPipelin return allResults, nil } -func (c *PipelineClient) CreatePipelineVersion(parameters *params.CreatePipelineVersionParams) (*model.V1PipelineVersion, +func (c *PipelineClient) CreatePipelineVersion(parameters *params.PipelineServiceCreatePipelineVersionParams) (*model.V1PipelineVersion, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() parameters.Context = ctx - response, err := c.apiClient.PipelineService.CreatePipelineVersion(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineService.PipelineServiceCreatePipelineVersion(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.CreatePipelineVersionDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceCreatePipelineVersionDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, fmt.Sprintf("Failed to create pipeline version. Params: '%v'", parameters), - fmt.Sprintf("Failed to create pipeline version from URL '%v'", parameters.Body.PackageURL.PipelineURL)) + fmt.Sprintf("Failed to create pipeline version from URL '%v'", parameters.Version.PackageURL.PipelineURL)) } return response.Payload, nil } -func (c *PipelineClient) ListPipelineVersions(parameters *params.ListPipelineVersionsParams) ( +func (c *PipelineClient) ListPipelineVersions(parameters *params.PipelineServiceListPipelineVersionsParams) ( []*model.V1PipelineVersion, int, string, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -246,10 +246,10 @@ func (c *PipelineClient) ListPipelineVersions(parameters *params.ListPipelineVer // Make service call parameters.Context = ctx - response, err := c.apiClient.PipelineService.ListPipelineVersions(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineService.PipelineServiceListPipelineVersions(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.ListPipelineVersionsDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceListPipelineVersionsDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -262,7 +262,7 @@ func (c *PipelineClient) ListPipelineVersions(parameters *params.ListPipelineVer return response.Payload.Versions, int(response.Payload.TotalSize), response.Payload.NextPageToken, nil } -func (c *PipelineClient) GetPipelineVersion(parameters *params.GetPipelineVersionParams) (*model.V1PipelineVersion, +func (c *PipelineClient) GetPipelineVersion(parameters *params.PipelineServiceGetPipelineVersionParams) (*model.V1PipelineVersion, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -270,10 +270,10 @@ func (c *PipelineClient) GetPipelineVersion(parameters *params.GetPipelineVersio // Make service call parameters.Context = ctx - response, err := c.apiClient.PipelineService.GetPipelineVersion(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineService.PipelineServiceGetPipelineVersion(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.GetPipelineVersionDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceGetPipelineVersionDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -286,7 +286,7 @@ func (c *PipelineClient) GetPipelineVersion(parameters *params.GetPipelineVersio return response.Payload, nil } -func (c *PipelineClient) GetPipelineVersionTemplate(parameters *params.GetPipelineVersionTemplateParams) ( +func (c *PipelineClient) GetPipelineVersionTemplate(parameters *params.PipelineServiceGetPipelineVersionTemplateParams) ( template.Template, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -294,10 +294,10 @@ func (c *PipelineClient) GetPipelineVersionTemplate(parameters *params.GetPipeli // Make service call parameters.Context = ctx - response, err := c.apiClient.PipelineService.GetPipelineVersionTemplate(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineService.PipelineServiceGetPipelineVersionTemplate(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.GetPipelineVersionTemplateDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceGetPipelineVersionTemplateDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } diff --git a/backend/src/common/client/api_server/pipeline_client_fake.go b/backend/src/common/client/api_server/pipeline_client_fake.go index e463ccf63b..e11961c1c1 100644 --- a/backend/src/common/client/api_server/pipeline_client_fake.go +++ b/backend/src/common/client/api_server/pipeline_client_fake.go @@ -29,7 +29,7 @@ func getDefaultPipeline(id string) *pipelinemodel.V1Pipeline { Description: "PIPELINE_DESCRIPTION", ID: id, Name: "PIPELINE_NAME", - Parameters: []*pipelinemodel.V1Parameter{&pipelinemodel.V1Parameter{ + Parameters: []*pipelinemodel.V1Parameter{{ Name: "PARAM_NAME", Value: "PARAM_VALUE", }}, @@ -64,17 +64,17 @@ func NewPipelineClientFake() *PipelineClientFake { return &PipelineClientFake{} } -func (c *PipelineClientFake) Create(params *pipelineparams.CreatePipelineParams) ( +func (c *PipelineClientFake) Create(params *pipelineparams.PipelineServiceCreatePipelineParams) ( *pipelinemodel.V1Pipeline, error) { - switch params.Body.URL.PipelineURL { + switch params.Pipeline.URL.PipelineURL { case PipelineInvalidURL: return nil, fmt.Errorf(ClientErrorString) default: - return getDefaultPipeline(path.Base(params.Body.URL.PipelineURL)), nil + return getDefaultPipeline(path.Base(params.Pipeline.URL.PipelineURL)), nil } } -func (c *PipelineClientFake) Get(params *pipelineparams.GetPipelineParams) ( +func (c *PipelineClientFake) Get(params *pipelineparams.PipelineServiceGetPipelineParams) ( *pipelinemodel.V1Pipeline, error) { switch params.ID { case PipelineForClientErrorTest: @@ -84,7 +84,7 @@ func (c *PipelineClientFake) Get(params *pipelineparams.GetPipelineParams) ( } } -func (c *PipelineClientFake) Delete(params *pipelineparams.DeletePipelineParams) error { +func (c *PipelineClientFake) Delete(params *pipelineparams.PipelineServiceDeletePipelineParams) error { switch params.ID { case PipelineForClientErrorTest: return fmt.Errorf(ClientErrorString) @@ -93,7 +93,7 @@ func (c *PipelineClientFake) Delete(params *pipelineparams.DeletePipelineParams) } } -func (c *PipelineClientFake) GetTemplate(params *pipelineparams.GetTemplateParams) ( +func (c *PipelineClientFake) GetTemplate(params *pipelineparams.PipelineServiceGetTemplateParams) ( template.Template, error) { switch params.ID { case PipelineForClientErrorTest: @@ -103,7 +103,7 @@ func (c *PipelineClientFake) GetTemplate(params *pipelineparams.GetTemplateParam } } -func (c *PipelineClientFake) List(params *pipelineparams.ListPipelinesParams) ( +func (c *PipelineClientFake) List(params *pipelineparams.PipelineServiceListPipelinesParams) ( []*pipelinemodel.V1Pipeline, int, string, error) { const ( @@ -132,12 +132,12 @@ func (c *PipelineClientFake) List(params *pipelineparams.ListPipelinesParams) ( } } -func (c *PipelineClientFake) ListAll(params *pipelineparams.ListPipelinesParams, +func (c *PipelineClientFake) ListAll(params *pipelineparams.PipelineServiceListPipelinesParams, maxResultSize int) ([]*pipelinemodel.V1Pipeline, error) { return listAllForPipeline(c, params, maxResultSize) } -func (c *PipelineClientFake) UpdateDefaultVersion(params *params.UpdatePipelineDefaultVersionParams) error { +func (c *PipelineClientFake) UpdateDefaultVersion(params *params.PipelineServiceUpdatePipelineDefaultVersionParams) error { switch params.PipelineID { case PipelineForClientErrorTest: return fmt.Errorf(ClientErrorString) diff --git a/backend/src/common/client/api_server/pipeline_upload_client.go b/backend/src/common/client/api_server/pipeline_upload_client.go index 39b58bfb01..38dacac1d2 100644 --- a/backend/src/common/client/api_server/pipeline_upload_client.go +++ b/backend/src/common/client/api_server/pipeline_upload_client.go @@ -24,7 +24,7 @@ const ( ) type PipelineUploadInterface interface { - UploadFile(filePath string, parameters *params.UploadPipelineParams) (*model.V1Pipeline, error) + UploadFile(filePath string, parameters *params.PipelineServiceUploadPipelineParams) (*model.V1Pipeline, error) } type PipelineUploadClient struct { @@ -47,7 +47,7 @@ func NewPipelineUploadClient(clientConfig clientcmd.ClientConfig, debug bool) ( }, nil } -func (c *PipelineUploadClient) UploadFile(filePath string, parameters *params.UploadPipelineParams) ( +func (c *PipelineUploadClient) UploadFile(filePath string, parameters *params.PipelineServiceUploadPipelineParams) ( *model.V1Pipeline, error) { file, err := os.Open(filePath) if err != nil { @@ -60,7 +60,7 @@ func (c *PipelineUploadClient) UploadFile(filePath string, parameters *params.Up return c.Upload(parameters) } -func (c *PipelineUploadClient) Upload(parameters *params.UploadPipelineParams) (*model.V1Pipeline, +func (c *PipelineUploadClient) Upload(parameters *params.PipelineServiceUploadPipelineParams) (*model.V1Pipeline, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -68,11 +68,11 @@ func (c *PipelineUploadClient) Upload(parameters *params.UploadPipelineParams) ( // Make service call parameters.Context = ctx - response, err := c.apiClient.PipelineUploadService.UploadPipeline(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineUploadService.PipelineServiceUploadPipeline(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.UploadPipelineDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceUploadPipelineDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -86,7 +86,7 @@ func (c *PipelineUploadClient) Upload(parameters *params.UploadPipelineParams) ( } // UploadPipelineVersion uploads pipeline version from local file. -func (c *PipelineUploadClient) UploadPipelineVersion(filePath string, parameters *params.UploadPipelineVersionParams) (*model.V1PipelineVersion, +func (c *PipelineUploadClient) UploadPipelineVersion(filePath string, parameters *params.PipelineServiceUploadPipelineVersionParams) (*model.V1PipelineVersion, error) { // Get file file, err := os.Open(filePath) @@ -103,11 +103,11 @@ func (c *PipelineUploadClient) UploadPipelineVersion(filePath string, parameters // Make service call parameters.Context = ctx - response, err := c.apiClient.PipelineUploadService.UploadPipelineVersion(parameters, PassThroughAuth) + response, err := c.apiClient.PipelineUploadService.PipelineServiceUploadPipelineVersion(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.UploadPipelineVersionDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.PipelineServiceUploadPipelineVersionDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } diff --git a/backend/src/common/client/api_server/pipeline_upload_client_fake.go b/backend/src/common/client/api_server/pipeline_upload_client_fake.go index 2610df4064..33581ce454 100644 --- a/backend/src/common/client/api_server/pipeline_upload_client_fake.go +++ b/backend/src/common/client/api_server/pipeline_upload_client_fake.go @@ -22,7 +22,7 @@ func getDefaultUploadedPipeline() *model.V1Pipeline { CreatedAt: strfmt.NewDateTime(), Name: "PIPELINE_NAME", Description: "PIPELINE_DESCRIPTION", - Parameters: []*model.V1Parameter{&model.V1Parameter{ + Parameters: []*model.V1Parameter{{ Name: "PARAM_NAME", Value: "PARAM_VALUE", }}, @@ -36,7 +36,7 @@ func NewPipelineUploadClientFake() *PipelineUploadClientFake { } func (c *PipelineUploadClientFake) UploadFile(filePath string, - parameters *params.UploadPipelineParams) (*model.V1Pipeline, error) { + parameters *params.PipelineServiceUploadPipelineParams) (*model.V1Pipeline, error) { switch filePath { case FileForClientErrorTest: return nil, fmt.Errorf(ClientErrorString) diff --git a/backend/src/common/client/api_server/run_client.go b/backend/src/common/client/api_server/run_client.go index 7e70be3d12..8426a8ee2f 100644 --- a/backend/src/common/client/api_server/run_client.go +++ b/backend/src/common/client/api_server/run_client.go @@ -16,12 +16,12 @@ import ( ) type RunInterface interface { - Archive(params *params.ArchiveRunParams) error - Get(params *params.GetRunParams) (*model.V1RunDetail, *workflowapi.PipelineRun, error) - List(params *params.ListRunsParams) ([]*model.V1Run, int, string, error) - ListAll(params *params.ListRunsParams, maxResultSize int) ([]*model.V1Run, error) - Unarchive(params *params.UnarchiveRunParams) error - Terminate(params *params.TerminateRunParams) error + Archive(params *params.RunServiceArchiveRunParams) error + Get(params *params.RunServiceGetRunParams) (*model.V1RunDetail, *workflowapi.PipelineRun, error) + List(params *params.RunServiceListRunsParams) ([]*model.V1Run, int, string, error) + ListAll(params *params.RunServiceListRunsParams, maxResultSize int) ([]*model.V1Run, error) + Unarchive(params *params.RunServiceUnarchiveRunParams) error + Terminate(params *params.RunServiceTerminateRunParams) error } type RunClient struct { @@ -44,7 +44,7 @@ func NewRunClient(clientConfig clientcmd.ClientConfig, debug bool) ( }, nil } -func (c *RunClient) Create(parameters *params.CreateRunParams) (*model.V1RunDetail, +func (c *RunClient) Create(parameters *params.RunServiceCreateRunParams) (*model.V1RunDetail, *workflowapi.PipelineRun, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -52,17 +52,17 @@ func (c *RunClient) Create(parameters *params.CreateRunParams) (*model.V1RunDeta // Make service call parameters.Context = ctx - response, err := c.apiClient.RunService.CreateRun(parameters, PassThroughAuth) + response, err := c.apiClient.RunService.RunServiceCreateRun(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.GetRunDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.RunServiceGetRunDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } return nil, nil, util.NewUserError(err, fmt.Sprintf("Failed to create run. Params: '%+v'", parameters), - fmt.Sprintf("Failed to create run '%v'", parameters.Body.Name)) + fmt.Sprintf("Failed to create run '%v'", parameters.Run.Name)) } // Unmarshal response @@ -78,7 +78,7 @@ func (c *RunClient) Create(parameters *params.CreateRunParams) (*model.V1RunDeta return response.Payload, &workflow, nil } -func (c *RunClient) Get(parameters *params.GetRunParams) (*model.V1RunDetail, +func (c *RunClient) Get(parameters *params.RunServiceGetRunParams) (*model.V1RunDetail, *workflowapi.PipelineRun, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -86,10 +86,10 @@ func (c *RunClient) Get(parameters *params.GetRunParams) (*model.V1RunDetail, // Make service call parameters.Context = ctx - response, err := c.apiClient.RunService.GetRun(parameters, PassThroughAuth) + response, err := c.apiClient.RunService.RunServiceGetRun(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.GetRunDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.RunServiceGetRunDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -112,18 +112,18 @@ func (c *RunClient) Get(parameters *params.GetRunParams) (*model.V1RunDetail, return response.Payload, &workflow, nil } -func (c *RunClient) Archive(parameters *params.ArchiveRunParams) error { +func (c *RunClient) Archive(parameters *params.RunServiceArchiveRunParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.RunService.ArchiveRun(parameters, PassThroughAuth) + _, err := c.apiClient.RunService.RunServiceArchiveRun(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.ListRunsDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.RunServiceListRunsDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -136,18 +136,18 @@ func (c *RunClient) Archive(parameters *params.ArchiveRunParams) error { return nil } -func (c *RunClient) Unarchive(parameters *params.UnarchiveRunParams) error { +func (c *RunClient) Unarchive(parameters *params.RunServiceUnarchiveRunParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.RunService.UnarchiveRun(parameters, PassThroughAuth) + _, err := c.apiClient.RunService.RunServiceUnarchiveRun(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.ListRunsDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.RunServiceListRunsDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -160,18 +160,18 @@ func (c *RunClient) Unarchive(parameters *params.UnarchiveRunParams) error { return nil } -func (c *RunClient) Delete(parameters *params.DeleteRunParams) error { +func (c *RunClient) Delete(parameters *params.RunServiceDeleteRunParams) error { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.RunService.DeleteRun(parameters, PassThroughAuth) + _, err := c.apiClient.RunService.RunServiceDeleteRun(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.ListRunsDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.RunServiceListRunsDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -184,7 +184,7 @@ func (c *RunClient) Delete(parameters *params.DeleteRunParams) error { return nil } -func (c *RunClient) List(parameters *params.ListRunsParams) ( +func (c *RunClient) List(parameters *params.RunServiceListRunsParams) ( []*model.V1Run, int, string, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -192,11 +192,11 @@ func (c *RunClient) List(parameters *params.ListRunsParams) ( // Make service call parameters.Context = ctx - response, err := c.apiClient.RunService.ListRuns(parameters, PassThroughAuth) + response, err := c.apiClient.RunService.RunServiceListRuns(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.ListRunsDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.RunServiceListRunsDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } @@ -209,12 +209,12 @@ func (c *RunClient) List(parameters *params.ListRunsParams) ( return response.Payload.Runs, int(response.Payload.TotalSize), response.Payload.NextPageToken, nil } -func (c *RunClient) ListAll(parameters *params.ListRunsParams, maxResultSize int) ( +func (c *RunClient) ListAll(parameters *params.RunServiceListRunsParams, maxResultSize int) ( []*model.V1Run, error) { return listAllForRun(c, parameters, maxResultSize) } -func listAllForRun(client RunInterface, parameters *params.ListRunsParams, maxResultSize int) ( +func listAllForRun(client RunInterface, parameters *params.RunServiceListRunsParams, maxResultSize int) ( []*model.V1Run, error) { if maxResultSize < 0 { maxResultSize = 0 @@ -239,13 +239,13 @@ func listAllForRun(client RunInterface, parameters *params.ListRunsParams, maxRe return allResults, nil } -func (c *RunClient) Terminate(parameters *params.TerminateRunParams) error { +func (c *RunClient) Terminate(parameters *params.RunServiceTerminateRunParams) error { ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) defer cancel() // Make service call parameters.Context = ctx - _, err := c.apiClient.RunService.TerminateRun(parameters, PassThroughAuth) + _, err := c.apiClient.RunService.RunServiceTerminateRun(parameters, PassThroughAuth) if err != nil { return util.NewUserError(err, fmt.Sprintf("Failed to terminate run. Params: %+v", parameters), diff --git a/backend/src/common/client/api_server/run_client_fake.go b/backend/src/common/client/api_server/run_client_fake.go index 1bf4c54c3d..dadf59c11f 100644 --- a/backend/src/common/client/api_server/run_client_fake.go +++ b/backend/src/common/client/api_server/run_client_fake.go @@ -34,7 +34,7 @@ func NewRunClientFake() *RunClientFake { return &RunClientFake{} } -func (c *RunClientFake) Get(params *runparams.GetRunParams) (*runmodel.V1RunDetail, +func (c *RunClientFake) Get(params *runparams.RunServiceGetRunParams) (*runmodel.V1RunDetail, *workflowapi.PipelineRun, error) { switch params.RunID { case RunForClientErrorTest: @@ -44,7 +44,7 @@ func (c *RunClientFake) Get(params *runparams.GetRunParams) (*runmodel.V1RunDeta } } -func (c *RunClientFake) List(params *runparams.ListRunsParams) ( +func (c *RunClientFake) List(params *runparams.RunServiceListRunsParams) ( []*runmodel.V1Run, int, string, error) { const ( FirstToken = "" @@ -72,20 +72,20 @@ func (c *RunClientFake) List(params *runparams.ListRunsParams) ( } } -func (c *RunClientFake) ListAll(params *runparams.ListRunsParams, maxResultSize int) ( +func (c *RunClientFake) ListAll(params *runparams.RunServiceListRunsParams, maxResultSize int) ( []*runmodel.V1Run, error) { return listAllForRun(c, params, maxResultSize) } -func (c *RunClientFake) Archive(params *runparams.ArchiveRunParams) error { +func (c *RunClientFake) Archive(params *runparams.RunServiceArchiveRunParams) error { return nil } -func (c *RunClientFake) Unarchive(params *runparams.UnarchiveRunParams) error { +func (c *RunClientFake) Unarchive(params *runparams.RunServiceUnarchiveRunParams) error { return nil } -func (c *RunClientFake) Terminate(params *runparams.TerminateRunParams) error { +func (c *RunClientFake) Terminate(params *runparams.RunServiceTerminateRunParams) error { switch params.RunID { case RunForClientErrorTest: return fmt.Errorf(ClientErrorString) diff --git a/backend/src/common/client/api_server/visualization_client.go b/backend/src/common/client/api_server/visualization_client.go index df3be34240..f1dae7085d 100644 --- a/backend/src/common/client/api_server/visualization_client.go +++ b/backend/src/common/client/api_server/visualization_client.go @@ -14,7 +14,7 @@ import ( ) type VisualizationInterface interface { - Create(params *params.CreateVisualizationParams) (*model.V1Visualization, error) + Create(params *params.VisualizationServiceCreateVisualizationParams) (*model.V1Visualization, error) } type VisualizationClient struct { @@ -37,7 +37,7 @@ func NewVisualizationClient(clientConfig clientcmd.ClientConfig, debug bool) ( }, nil } -func (c *VisualizationClient) Create(parameters *params.CreateVisualizationParams) (*model.V1Visualization, +func (c *VisualizationClient) Create(parameters *params.VisualizationServiceCreateVisualizationParams) (*model.V1Visualization, error) { // Create context with timeout ctx, cancel := context.WithTimeout(context.Background(), apiServerDefaultTimeout) @@ -45,17 +45,17 @@ func (c *VisualizationClient) Create(parameters *params.CreateVisualizationParam // Make service call parameters.Context = ctx - response, err := c.apiClient.VisualizationService.CreateVisualization(parameters, PassThroughAuth) + response, err := c.apiClient.VisualizationService.VisualizationServiceCreateVisualization(parameters, PassThroughAuth) if err != nil { - if defaultError, ok := err.(*params.CreateVisualizationDefault); ok { - err = CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + if defaultError, ok := err.(*params.VisualizationServiceCreateVisualizationDefault); ok { + err = CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, - fmt.Sprintf("Failed to create visualizaiton. Params: '%+v'. Body: '%+v'", parameters, parameters.Body), - fmt.Sprintf("Failed to create visualization '%v'", parameters.Body.Type)) + fmt.Sprintf("Failed to create visualizaiton. Params: '%+v'. Body: '%+v'", parameters, parameters.Visualization), + fmt.Sprintf("Failed to create visualization '%v'", parameters.Visualization.Type)) } return response.Payload, nil diff --git a/backend/src/common/client/api_server/visualization_client_fake.go b/backend/src/common/client/api_server/visualization_client_fake.go index 3bd6daad8e..b510853bc0 100644 --- a/backend/src/common/client/api_server/visualization_client_fake.go +++ b/backend/src/common/client/api_server/visualization_client_fake.go @@ -18,15 +18,15 @@ func NewVisualizationClientFake() *VisualizationClientFake { return &VisualizationClientFake{} } -func (c *VisualizationClientFake) Create(params *params.CreateVisualizationParams) ( +func (c *VisualizationClientFake) Create(params *params.VisualizationServiceCreateVisualizationParams) ( *model.V1Visualization, error) { var arguments VisualizationArguments - err := json.Unmarshal([]byte(params.Body.Arguments), &arguments) + err := json.Unmarshal([]byte(params.Visualization.Arguments), &arguments) if err != nil { return nil, err } if arguments.fail { return nil, fmt.Errorf(ClientErrorString) } - return params.Body, nil + return params.Visualization, nil } diff --git a/backend/third_party_licenses/apiserver.csv b/backend/third_party_licenses/apiserver.csv index 9a29822674..697556643c 100644 --- a/backend/third_party_licenses/apiserver.csv +++ b/backend/third_party_licenses/apiserver.csv @@ -33,7 +33,6 @@ github.com/google/go-containerregistry/pkg/name,https://github.com/google/go-con github.com/google/gofuzz,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0 github.com/google/uuid,https://github.com/google/uuid/blob/v1.3.0/LICENSE,BSD-3-Clause github.com/gorilla/mux,https://github.com/gorilla/mux/blob/v1.8.0/LICENSE,BSD-3-Clause -github.com/grpc-ecosystem/grpc-gateway,https://github.com/grpc-ecosystem/grpc-gateway/blob/v1.16.0/LICENSE.txt,BSD-3-Clause github.com/grpc-ecosystem/grpc-gateway/v2,https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.11.3/LICENSE.txt,BSD-3-Clause github.com/hashicorp/errwrap,https://github.com/hashicorp/errwrap/blob/v1.1.0/LICENSE,MPL-2.0 github.com/hashicorp/go-multierror,https://github.com/hashicorp/go-multierror/blob/v1.1.1/LICENSE,MPL-2.0 diff --git a/backend/third_party_licenses/cache_server.csv b/backend/third_party_licenses/cache_server.csv index e7e0220887..e96669bb7b 100644 --- a/backend/third_party_licenses/cache_server.csv +++ b/backend/third_party_licenses/cache_server.csv @@ -29,7 +29,6 @@ github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.5.9/LICENS github.com/google/go-containerregistry/pkg/name,https://github.com/google/go-containerregistry/blob/v0.15.2/LICENSE,Apache-2.0 github.com/google/gofuzz,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0 github.com/google/uuid,https://github.com/google/uuid/blob/v1.3.0/LICENSE,BSD-3-Clause -github.com/grpc-ecosystem/grpc-gateway,https://github.com/grpc-ecosystem/grpc-gateway/blob/v1.16.0/LICENSE.txt,BSD-3-Clause github.com/grpc-ecosystem/grpc-gateway/v2,https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.11.3/LICENSE.txt,BSD-3-Clause github.com/hashicorp/errwrap,https://github.com/hashicorp/errwrap/blob/v1.1.0/LICENSE,MPL-2.0 github.com/hashicorp/go-multierror,https://github.com/hashicorp/go-multierror/blob/v1.1.1/LICENSE,MPL-2.0 diff --git a/backend/third_party_licenses/persistence_agent.csv b/backend/third_party_licenses/persistence_agent.csv index 92b4841f2c..fc24850fb2 100644 --- a/backend/third_party_licenses/persistence_agent.csv +++ b/backend/third_party_licenses/persistence_agent.csv @@ -33,7 +33,6 @@ github.com/google/go-containerregistry/pkg/name,https://github.com/google/go-con github.com/google/gofuzz,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0 github.com/google/uuid,https://github.com/google/uuid/blob/v1.3.0/LICENSE,BSD-3-Clause github.com/gorilla/mux,https://github.com/gorilla/mux/blob/v1.8.0/LICENSE,BSD-3-Clause -github.com/grpc-ecosystem/grpc-gateway,https://github.com/grpc-ecosystem/grpc-gateway/blob/v1.16.0/LICENSE.txt,BSD-3-Clause github.com/grpc-ecosystem/grpc-gateway/v2,https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.11.3/LICENSE.txt,BSD-3-Clause github.com/hashicorp/errwrap,https://github.com/hashicorp/errwrap/blob/v1.1.0/LICENSE,MPL-2.0 github.com/hashicorp/go-multierror,https://github.com/hashicorp/go-multierror/blob/v1.1.1/LICENSE,MPL-2.0 diff --git a/backend/third_party_licenses/swf.csv b/backend/third_party_licenses/swf.csv index 8cea957935..945171efab 100644 --- a/backend/third_party_licenses/swf.csv +++ b/backend/third_party_licenses/swf.csv @@ -29,7 +29,6 @@ github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.5.9/LICENS github.com/google/go-containerregistry/pkg/name,https://github.com/google/go-containerregistry/blob/v0.15.2/LICENSE,Apache-2.0 github.com/google/gofuzz,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0 github.com/google/uuid,https://github.com/google/uuid/blob/v1.3.0/LICENSE,BSD-3-Clause -github.com/grpc-ecosystem/grpc-gateway,https://github.com/grpc-ecosystem/grpc-gateway/blob/v1.16.0/LICENSE.txt,BSD-3-Clause github.com/grpc-ecosystem/grpc-gateway/v2,https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.11.3/LICENSE.txt,BSD-3-Clause github.com/hashicorp/errwrap,https://github.com/hashicorp/errwrap/blob/v1.1.0/LICENSE,MPL-2.0 github.com/hashicorp/go-multierror,https://github.com/hashicorp/go-multierror/blob/v1.1.1/LICENSE,MPL-2.0 diff --git a/go.mod b/go.mod index f264fcfd7f..d39dc75ddb 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 github.com/jinzhu/gorm v1.9.12 github.com/kubeflow/pipelines/api v0.0.0-20211026071850-2e3fb5efff56 github.com/lestrrat-go/strftime v1.0.4 diff --git a/sdk/python/kfp_tekton/_client.py b/sdk/python/kfp_tekton/_client.py index 279044084c..b777dee27a 100644 --- a/sdk/python/kfp_tekton/_client.py +++ b/sdk/python/kfp_tekton/_client.py @@ -198,7 +198,7 @@ def wait_for_run_completion(self, run_id: str, timeout: int): 'invalidtaskresultreference'} while True: try: - get_run_response = self._run_api.get_run(run_id=run_id) + get_run_response = self._run_api.run_service_get_run(run_id=run_id) is_valid_token = True except ApiException as api_ex: # if the token is valid but receiving 401 Unauthorized error @@ -219,6 +219,33 @@ def wait_for_run_completion(self, run_id: str, timeout: int): return get_run_response time.sleep(5) + def get_pipeline_id(self, name) -> Optional[str]: + """Find the id of a pipeline by name. + + Args: + name: Pipeline name. + + Returns: + Returns the pipeline id if a pipeline with the name exists. + """ + pipeline_filter = json.dumps({ + 'predicates': [{ + 'op': _FILTER_OPERATIONS['EQUALS'], + 'key': 'name', + 'string_value': name, + }] + }) + result = self._pipelines_api.pipeline_service_list_pipelines(filter=pipeline_filter) + if result.pipelines is None: + return None + if len(result.pipelines) == 1: + return result.pipelines[0].id + elif len(result.pipelines) > 1: + raise ValueError( + 'Multiple pipelines with the name: {} found, the name needs to be unique' + .format(name)) + return None + def create_experiment( self, name: str, @@ -263,7 +290,7 @@ def create_experiment( name=name, description=description, resource_references=resource_references) - experiment = self._experiment_api.create_experiment(body=experiment) + experiment = self._experiment_api.experiment_service_create_experiment(experiment=experiment) if self._is_ipython(): import IPython @@ -272,6 +299,32 @@ def create_experiment( % (self._get_url_prefix(), experiment.id)) IPython.display.display(IPython.display.HTML(html)) return experiment + + def get_kfp_healthz(self) -> kfp_server_api.V1GetHealthzResponse: + """Gets healthz info of KFP deployment. + + Returns: + response: json formatted response from the healtz endpoint. + """ + count = 0 + response = None + max_attempts = 5 + while not response: + count += 1 + if count > max_attempts: + raise TimeoutError( + 'Failed getting healthz endpoint after {} attempts.'.format( + max_attempts)) + try: + response = self._healthz_api.healthz_service_get_healthz() + return response + # ApiException, including network errors, is the only type that may + # recover after retry. + except kfp_server_api.ApiException: + # logging.exception also logs detailed info about the ApiException + logging.exception( + 'Failed to get healthz info attempt {} of 5.'.format(count)) + time.sleep(5) def list_experiments( self, @@ -296,7 +349,7 @@ def list_experiments( A response object including a list of experiments and next page token. """ namespace = namespace or self.get_user_namespace() - response = self._experiment_api.list_experiment( + response = self._experiment_api.experiment_service_list_experiment( page_token=page_token, page_size=page_size, sort_by=sort_by, @@ -332,22 +385,22 @@ def get_experiment(self, raise ValueError( 'Either experiment_id or experiment_name is required') if experiment_id is not None: - return self._experiment_api.get_experiment(id=experiment_id) + return self._experiment_api.experiment_service_get_experiment(id=experiment_id) experiment_filter = json.dumps({ 'predicates': [{ 'op': _FILTER_OPERATIONS['EQUALS'], 'key': 'name', - 'stringValue': experiment_name, + 'string_value': experiment_name, }] }) if namespace: - result = self._experiment_api.list_experiment( + result = self._experiment_api.experiment_service_list_experiment( filter=experiment_filter, resource_reference_key_type=kfp_server_api.models .v1_resource_type.V1ResourceType.NAMESPACE, resource_reference_key_id=namespace) else: - result = self._experiment_api.list_experiment( + result = self._experiment_api.experiment_service_list_experiment( filter=experiment_filter) if not result.experiments: raise ValueError( @@ -420,7 +473,7 @@ def run_pipeline( name=job_name, service_account=service_account) - response = self._run_api.create_run(body=run_body) + response = self._run_api.run_service_create_run(run=run_body) if self._is_ipython(): import IPython @@ -529,7 +582,7 @@ def create_recurring_run( trigger=trigger, max_concurrency=max_concurrency, service_account=service_account) - return self._job_api.create_job(body=job_body) + return self._job_api.job_service_create_job(job=job_body) def _create_job_config( self, @@ -633,7 +686,7 @@ def list_runs(self, """ namespace = namespace or self.get_user_namespace() if experiment_id is not None: - response = self._run_api.list_runs( + response = self._run_api.run_service_list_runs( page_token=page_token, page_size=page_size, sort_by=sort_by, @@ -642,7 +695,7 @@ def list_runs(self, resource_reference_key_id=experiment_id, filter=filter) elif namespace: - response = self._run_api.list_runs( + response = self._run_api.run_service_list_runs( page_token=page_token, page_size=page_size, sort_by=sort_by, @@ -651,7 +704,7 @@ def list_runs(self, resource_reference_key_id=namespace, filter=filter) else: - response = self._run_api.list_runs( + response = self._run_api.run_service_list_runs( page_token=page_token, page_size=page_size, sort_by=sort_by, @@ -678,7 +731,7 @@ def list_recurring_runs(self, A response object including a list of recurring_runs and next page token. """ if experiment_id is not None: - response = self._job_api.list_jobs( + response = self._job_api.job_service_list_jobs( page_token=page_token, page_size=page_size, sort_by=sort_by, @@ -687,12 +740,40 @@ def list_recurring_runs(self, resource_reference_key_id=experiment_id, filter=filter) else: - response = self._job_api.list_jobs( + response = self._job_api.job_service_list_jobs( page_token=page_token, page_size=page_size, sort_by=sort_by, filter=filter) return response + + def get_recurring_run(self, job_id: str) -> kfp_server_api.V1Job: + """Get recurring_run details. + + Args: + job_id: id of the recurring_run. + + Returns: + A response object including details of a recurring_run. + + Raises: + kfp_server_api.ApiException: If recurring_run is not found. + """ + return self._job_api.job_service_get_job(id=job_id) + + def get_run(self, run_id: str) -> kfp_server_api.V1Run: + """Get run details. + + Args: + run_id: id of the run. + + Returns: + A response object including details of a run. + + Raises: + kfp_server_api.ApiException: If run is not found. + """ + return self._run_api.run_service_get_run(run_id=run_id) def list_pipeline_versions( self, @@ -716,7 +797,7 @@ def list_pipeline_versions( kfp_server_api.ApiException: If pipeline is not found. """ - return self._pipelines_api.list_pipeline_versions( + return self._pipelines_api.pipeline_service_list_pipeline_versions( page_token=page_token, page_size=page_size, sort_by=sort_by, @@ -762,3 +843,167 @@ def create_run_from_pipeline_func(self, run_name, experiment_name, namespace) finally: os.remove(pipeline_package_path) + + def _get_workflow_json(self, run_id): + """Get the workflow json. + + Args: + run_id: run id, returned from run_pipeline. + + Returns: + workflow: Json workflow + """ + get_run_response = self._run_api.run_service_get_run(run_id=run_id) + workflow = get_run_response.pipeline_runtime.workflow_manifest + workflow_json = json.loads(workflow) + return workflow_json + + def upload_pipeline( + self, + pipeline_package_path: str = None, + pipeline_name: str = None, + description: str = None, + ) -> kfp_server_api.V1Pipeline: + """Uploads the pipeline to the Kubeflow Pipelines cluster. + + Args: + pipeline_package_path: Local path to the pipeline package. + pipeline_name: Optional. Name of the pipeline to be shown in the UI. + description: Optional. Description of the pipeline to be shown in the UI. + + Returns: + Server response object containing pipleine id and other information. + """ + + response = self._upload_api.pipeline_service_upload_pipeline( + pipeline_package_path, name=pipeline_name, description=description) + if self._is_ipython(): + import IPython + html = 'Pipeline details.' % ( + self._get_url_prefix(), response.id) + IPython.display.display(IPython.display.HTML(html)) + return response + + def upload_pipeline_version( + self, + pipeline_package_path, + pipeline_version_name: str, + pipeline_id: Optional[str] = None, + pipeline_name: Optional[str] = None, + description: Optional[str] = None, + ) -> kfp_server_api.V1PipelineVersion: + """Uploads a new version of the pipeline to the Kubeflow Pipelines + cluster. + + Args: + pipeline_package_path: Local path to the pipeline package. + pipeline_version_name: Name of the pipeline version to be shown in the UI. + pipeline_id: Optional. Id of the pipeline. + pipeline_name: Optional. Name of the pipeline. + description: Optional. Description of the pipeline version to be shown in the UI. + + Returns: + Server response object containing pipleine id and other information. + + Raises: + ValueError when none or both of pipeline_id or pipeline_name are specified + kfp_server_api.ApiException: If pipeline id is not found. + """ + + if all([pipeline_id, pipeline_name + ]) or not any([pipeline_id, pipeline_name]): + raise ValueError('Either pipeline_id or pipeline_name is required') + + if pipeline_name: + pipeline_id = self.get_pipeline_id(pipeline_name) + kwargs = dict( + name=pipeline_version_name, + pipelineid=pipeline_id, + ) + + if description: + kwargs['description'] = description + try: + response = self._upload_api.pipeline_service_upload_pipeline_version( + pipeline_package_path, **kwargs) + except kfp_server_api.exceptions.ApiTypeError as e: + # ToDo: Remove this once we drop support for kfp_server_api < 1.7.1 + if 'description' in e.message and 'unexpected keyword argument' in e.message: + raise NotImplementedError( + 'Pipeline version description is not supported in current kfp-server-api pypi package. Upgrade to 1.7.1 or above' + ) + else: + raise e + + if self._is_ipython(): + import IPython + html = 'Pipeline details.' % ( + self._get_url_prefix(), response.id) + IPython.display.display(IPython.display.HTML(html)) + return response + + def get_pipeline(self, pipeline_id: str) -> kfp_server_api.V1Pipeline: + """Get pipeline details. + + Args: + pipeline_id: id of the pipeline. + + Returns: + A response object including details of a pipeline. + + Raises: + kfp_server_api.ApiException: If pipeline is not found. + """ + return self._pipelines_api.pipeline_service_get_pipeline(id=pipeline_id) + + def delete_pipeline(self, pipeline_id): + """Delete pipeline. + + Args: + pipeline_id: id of the pipeline. + + Returns: + Object. If the method is called asynchronously, returns the request thread. + + Raises: + kfp_server_api.ApiException: If pipeline is not found. + """ + return self._pipelines_api.pipeline_service_delete_pipeline(id=pipeline_id) + + def delete_pipeline_version(self, version_id: str): + """Delete pipeline version. + + Args: + version_id: id of the pipeline version. + + Returns: + Object. If the method is called asynchronously, returns the request thread. + + Raises: + Exception if pipeline version is not found. + """ + return self._pipelines_api.pipeline_service_delete_pipeline_version( + version_id=version_id) + + def list_pipelines(self, + page_token='', + page_size=10, + sort_by='', + filter=None) -> kfp_server_api.V1ListPipelinesResponse: + """List pipelines. + + Args: + page_token: Token for starting of the page. + page_size: Size of the page. + sort_by: one of 'field_name', 'field_name desc'. For example, 'name desc'. + filter: A url-encoded, JSON-serialized Filter protocol buffer + (see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). + + Returns: + A response object including a list of pipelines and next page token. + """ + return self._pipelines_api.pipeline_service_list_pipelines( + page_token=page_token, + page_size=page_size, + sort_by=sort_by, + filter=filter) diff --git a/sdk/python/requirements.in b/sdk/python/requirements.in index 402bc43e9c..da1e464dde 100644 --- a/sdk/python/requirements.in +++ b/sdk/python/requirements.in @@ -1,3 +1,3 @@ kfp>=1.8.10,<1.8.23 -kfp-tekton-server-api>=1.5.0 +kfp-tekton-server-api==1.8.0rc8 PyYAML>=6,<7 diff --git a/sdk/python/requirements.txt b/sdk/python/requirements.txt index f02b22f479..d463dac1a4 100644 --- a/sdk/python/requirements.txt +++ b/sdk/python/requirements.txt @@ -74,7 +74,7 @@ kfp-pipeline-spec==0.1.16 # via kfp kfp-server-api==1.3.0 # via kfp -kfp-tekton-server-api==1.5.0 +kfp-tekton-server-api==1.8.0rc8 # via -r requirements.in kubernetes==12.0.1 # via kfp diff --git a/sdk/python/setup.py b/sdk/python/setup.py index 28cb5faad8..82903590d7 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -60,7 +60,7 @@ # accordingly. REQUIRES = [ "kfp>=1.8.10,<1.8.23", - "kfp-tekton-server-api>=1.5.0", + "kfp-tekton-server-api==1.8.0rc8", "PyYAML>=6,<7" ]